SalesRefundPush.cs 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using WdtSdk;
  7. namespace SalesRefundPush
  8. {
  9. class SalesRefundPush
  10. {
  11. static void Main(string[] args)
  12. {
  13. WdtClient client = new WdtClient();
  14. client.sid = "";
  15. client.appkey = "";
  16. client.appsecret = "";
  17. client.gatewayUrl = "http://121.41.177.115/openapi2/sales_refund_push.php";
  18. var api_refund_list = new[]
  19. {
  20. new
  21. {
  22. tid = "45678987654323456",
  23. shop_no = "api_test",
  24. platform_id = "127",
  25. refund_no = "4567899876543243",
  26. type = "3",
  27. status = "wait_seller_agree",
  28. refund_fee = "23",
  29. alipay_no = "4567887654",
  30. buyer_nick = "ceshi",
  31. refund_time = "2019-01-17 12:12:12",
  32. reason = "ceshi",
  33. desc = "ceshi",
  34. order_list = new[]
  35. {
  36. new{
  37. oid = "34567890987654",
  38. num = "3"
  39. }
  40. },
  41. },
  42. new
  43. {
  44. tid = "5678765432134",
  45. shop_no = "api_test",
  46. platform_id = "127",
  47. refund_no = "765432345673",
  48. type = "3",
  49. status = "wait_seller_agree",
  50. refund_fee = "23",
  51. alipay_no = "4567887654",
  52. buyer_nick = "ceshi",
  53. refund_time = "2019-01-17 12:12:12",
  54. reason = "ceshi",
  55. desc = "ceshi",
  56. order_list = new[]
  57. {
  58. new{
  59. oid = "678876543234",
  60. num = "3"
  61. }
  62. },
  63. }
  64. };
  65. string json = api_refund_list.ToJsonString();
  66. client.putParams("api_refund_list", json);
  67. string result = client.wdtOpenapi();
  68. Console.WriteLine(result);
  69. Console.ReadKey();
  70. }
  71. }
  72. }