You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

107 lines
4.1 KiB

  1. # 获取authorization
  2. ---
  3. * {domain}/online/v3/secure-pay
  4. ### Request
  5. ```json
  6. {
  7. "amount": "100",
  8. "callbackUrl": "https://example.com/webhook?transactionNo={transactionNo}&status={status}&amount={amount}&time={time}&reference={reference}&note={note}",
  9. "currency": "USD",
  10. "description": "029e9b9b0b4e5cae68bf559b6333f466",
  11. "ipnUrl": "https://example.com/webhook",
  12. "merchantNo": "202333",
  13. "note": "029e9b9b0b4e5cae68bf559b6333f466",
  14. "reference": "029e9b9b0b4e5cae68bf559b6333f466",
  15. "settleCurrency": "USD",
  16. "storeNo": "301854",
  17. "terminal": "YIP",
  18. "vendor": "creditcard",
  19. "verifySign": "ece4311b16c46435af3fb974ddbc2d43"
  20. }
  21. ```
  22. ### Response
  23. * authorization是用来在付款页面调用braintree js sdk,用户填信用卡信息
  24. * [HTML付款页面示例](./static/braintree-sample.html)
  25. ```json
  26. {
  27. "result":
  28. {
  29. "amount": "100.00",
  30. "authorization": "eyJraWQiOiJ6dSIsImFsZyI6IlJTMjU2In0.eyJmbHgiOnsicGF0aCI6Ii9mbGV4L3YyL3Rva2VucyIsImRhdGEiOiJkVnc4amZSc2ZFQVI2VWlyVFBWcVhCQUFFR09OZkVZZmNxVjZyeUttOHU4LzhYVnZzN01Edmt1NzBCQXZxR09zSWZVOVcwT21KNVVWM3N6bHIxekh5K01RMWxQMDZZYnh4Y0Y3cDhnUWVOeUhhaEZNamUxQnBydW5tMVppYjZnWDA3amQiLCJvcmlnaW4iOiJodHRwczovL3Rlc3RmbGV4LmN5YmVyc291cmNlLmNvbSIsImp3ayI6eyJrdHkiOiJSU0EiLCJlIjoiQVFBQiIsInVzZSI6ImVuYyIsIm4iOiJzUnR5Y0lvcU1aRmVEMGM2bG9VbFZ4NWdoaDlLX0w5bm11dllhdkRVVV9TdTVHRGFmZmt4NGRqM0MzQ2pwRlZMUkFrdXJ4LT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-FmnUmbZMVzGvNPE01g_JB77j1l48hSbjv7uV3PR5_3j40cqRsQe2OTgutJxen7p2JrVcURHYKs1vZNG5o8nyXo06rIQKCZU4FR0lF2RymO336IjcjLMQebvVGFndSB7KnODQru9f4qAwzSkYCxLSUa0p7U7DdRIldOsw4-svP70-NKLBQ",
  31. "currency": "USD",
  32. "reference": "029e9b9b0b4e5cae68bf559b6333f466",
  33. "timestamp": "2022-10-20T03:54:36Z",
  34. "transactionNo": "302605577756087512"
  35. },
  36. "ret_code": "000100",
  37. "ret_msg": "success"
  38. }
  39. ```
  40. # 确认付款
  41. ---
  42. * {domain}/creditpay/v3/process
  43. ### Request
  44. |name|value|
  45. |---|---|
  46. |Credit Card|credit_card|
  47. |PayPal|paypal_account|
  48. |Venmo|venmo_account|
  49. |Google Pay|android_pay_card|
  50. |Apple Pay|apple_pay_card|
  51. |SAMSUNG Pay|samsung_pay_card|
  52. ```json
  53. {
  54. "addressLine1": "123 main st",
  55. "addressLine2": "",
  56. "city": "Hometown",
  57. "country": "United States of America",
  58. "countryCode": "US",
  59. "deviceData": "{\"correlation_id\":\"536e2d7c63f918ae8b2eb0cb5ee1eee3\"}",
  60. "email": "[email protected]",
  61. "firstName": "John",
  62. "lastName": "Doe",
  63. "merchantNo": "202333",
  64. "paymentMethod": "credit_card",
  65. "paymentMethodNonce": "tokencc_bf_ks72qn_fwtdcm_56ynkm_ckx8n2_2z2",
  66. "postalCode": "90012",
  67. "state": "CA",
  68. "storeNo": "301854",
  69. "transactionNo": "302607078131745403",
  70. "verifySign": "91a7786e708668ca35a5197bbea237cc"
  71. }
  72. ```
  73. ### Response
  74. ```json
  75. {
  76. "result":
  77. {
  78. "reference": "31d59e06821dbf31e14569f44bac976a",
  79. "amount": "100.00",
  80. "supUserid": "1111",
  81. "transactionNo": "302607078131745403",
  82. "vendorId": "b2sewrxq",
  83. "currency": "USD",
  84. "paymentTime": "2022-10-20T04:19:56Z",
  85. "status": "success"
  86. },
  87. "ret_msg": "success",
  88. "ret_code": "000100"
  89. }
  90. ```