VnPay-Demo.postman_collection.json 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. {
  2. "info": {
  3. "name": "VnPay Demo API",
  4. "description": "越南支付对接Demo接口测试集合",
  5. "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  6. },
  7. "item": [
  8. {
  9. "name": "测试服务状态",
  10. "request": {
  11. "method": "GET",
  12. "header": [],
  13. "url": {
  14. "raw": "http://localhost:8080/demo/test",
  15. "protocol": "http",
  16. "host": ["localhost"],
  17. "port": "8080",
  18. "path": ["demo", "test"]
  19. },
  20. "description": "检查服务是否正常运行"
  21. }
  22. },
  23. {
  24. "name": "API支付请求",
  25. "request": {
  26. "method": "POST",
  27. "header": [
  28. {
  29. "key": "Content-Type",
  30. "value": "application/x-www-form-urlencoded"
  31. }
  32. ],
  33. "body": {
  34. "mode": "urlencoded",
  35. "urlencoded": [
  36. {
  37. "key": "tradeType",
  38. "value": "SCAN_PAY",
  39. "description": "支付类型"
  40. },
  41. {
  42. "key": "version",
  43. "value": "1.0",
  44. "description": "版本号"
  45. },
  46. {
  47. "key": "channel",
  48. "value": "ALI_PAY",
  49. "description": "支付渠道"
  50. },
  51. {
  52. "key": "mchNo",
  53. "value": "M1234567890",
  54. "description": "商户号"
  55. },
  56. {
  57. "key": "mchOrderNo",
  58. "value": "ORDER{{$timestamp}}",
  59. "description": "商户订单号(自动生成时间戳)"
  60. },
  61. {
  62. "key": "body",
  63. "value": "测试商品",
  64. "description": "商品描述"
  65. },
  66. {
  67. "key": "amount",
  68. "value": "10000",
  69. "description": "金额(单位:分)"
  70. },
  71. {
  72. "key": "currency",
  73. "value": "VND",
  74. "description": "货币类型"
  75. },
  76. {
  77. "key": "timePaid",
  78. "value": "{{$timestamp}}",
  79. "description": "支付时间"
  80. },
  81. {
  82. "key": "remark",
  83. "value": "测试备注",
  84. "description": "备注信息"
  85. },
  86. {
  87. "key": "notifyUrl",
  88. "value": "http://localhost:8080/demo/notify/getPayInfo",
  89. "description": "异步通知地址"
  90. },
  91. {
  92. "key": "callbackUrl",
  93. "value": "http://localhost:8080/callback",
  94. "description": "同步回调地址"
  95. },
  96. {
  97. "key": "merchantName",
  98. "value": "测试商户",
  99. "description": "商户名称"
  100. },
  101. {
  102. "key": "goodsId",
  103. "value": "GOODS001",
  104. "description": "商品ID"
  105. },
  106. {
  107. "key": "goodsDesc",
  108. "value": "这是一个测试商品",
  109. "description": "商品描述"
  110. },
  111. {
  112. "key": "showUrl",
  113. "value": "http://localhost:8080/goods/001",
  114. "description": "商品展示URL"
  115. },
  116. {
  117. "key": "memberId",
  118. "value": "USER123456",
  119. "description": "会员ID"
  120. },
  121. {
  122. "key": "bankType",
  123. "value": "BANK_CARD",
  124. "description": "银行类型"
  125. },
  126. {
  127. "key": "cardType",
  128. "value": "DEBIT",
  129. "description": "卡类型"
  130. },
  131. {
  132. "key": "orderPeriod",
  133. "value": "30",
  134. "description": "订单过期时间(分钟)"
  135. },
  136. {
  137. "key": "paySecret",
  138. "value": "bf183091a6654c339b7b452a996c4ce5",
  139. "description": "支付密钥"
  140. }
  141. ]
  142. },
  143. "url": {
  144. "raw": "http://localhost:8080/demo/apiPay",
  145. "protocol": "http",
  146. "host": ["localhost"],
  147. "port": "8080",
  148. "path": ["demo", "apiPay"]
  149. },
  150. "description": "发起支付请求"
  151. }
  152. },
  153. {
  154. "name": "异步通知测试",
  155. "request": {
  156. "method": "POST",
  157. "header": [
  158. {
  159. "key": "Content-Type",
  160. "value": "application/json"
  161. }
  162. ],
  163. "body": {
  164. "mode": "raw",
  165. "raw": "{\n \"mchNo\": \"M1234567890\",\n \"mchOrderNo\": \"ORDER20240130001\",\n \"amount\": \"10000\",\n \"status\": \"1\",\n \"payTime\": \"20240130120500\",\n \"transactionId\": \"PAY20240130120500001\",\n \"sign\": \"需要根据实际参数计算\"\n}"
  166. },
  167. "url": {
  168. "raw": "http://localhost:8080/demo/notify/getPayInfo",
  169. "protocol": "http",
  170. "host": ["localhost"],
  171. "port": "8080",
  172. "path": ["demo", "notify", "getPayInfo"]
  173. },
  174. "description": "模拟支付平台发送的异步通知"
  175. }
  176. }
  177. ],
  178. "variable": [
  179. {
  180. "key": "baseUrl",
  181. "value": "http://localhost:8080"
  182. }
  183. ]
  184. }