TestPayment.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using SinochemCloudClient.Legacy;
  2. using SinochemCloudClient.Models;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace TestSinochemCloudClient.Legacy
  9. {
  10. public class TestPayment
  11. {
  12. private static string url = "http://10.26.5.222:8008/1/CarFushion/pay";
  13. public static void TestNormalCase()
  14. {
  15. Payment payment = new Payment(url);
  16. PaymentRequest request = new PaymentRequest
  17. {
  18. dept_No = "testing site",
  19. card_No = "2009059500000166290",
  20. password = "111111",
  21. code = "35",
  22. price = 5.66,
  23. lpm = 10,
  24. amount = 56.6,
  25. gas_Up_Time = DateTime.Now.ToString(),
  26. rear_Pump_Code = "",
  27. off_Line_Sign = "0",
  28. tradeDateTime = DateTime.Now.ToString(),
  29. mac = "1a2b3c",
  30. token = "1234556"
  31. };
  32. Console.WriteLine("before send payment");
  33. payment.SendRequest(request);
  34. Console.WriteLine("got payment messasge code" + payment.Response.code);
  35. }
  36. }
  37. }