PAYPAL rest api支付细节参数代码

 1 {
 2   "id": "PAY-1B56960729604235TKQQIYVY",
 3   "create_time": "2017-09-22T20:53:43Z",
 4   "update_time": "2017-09-22T20:53:44Z",
 5   "state": "created",
 6   "intent": "sale",
 7   "payer": {
 8     "payment_method": "paypal"
 9   },
10   "transactions": [
11     {
12       "amount": {
13         "total": "30.11",
14         "currency": "USD",
15         "details": {
16           "subtotal": "30.00",
17           "tax": "0.07",
18           "shipping": "0.03",
19           "handling_fee": "1.00",
20           "insurance": "0.01",
21           "shipping_discount": "-1.00"
22         }
23       },
24       "description": "The payment transaction description.",
25       "custom": "EBAY_EMS_90048630024435",
26       "invoice_number": "48787589673",
27       "item_list": {
28         "items": [
29           {
30             "name": "hat",
31             "sku": "1",
32             "price": "3.00",
33             "currency": "USD",
34             "quantity": "5",
35             "description": "CNC Foam Cutting Machine",
36             "tax": "0.01"
37           },
38           {
39             "name": "handbag",
40             "sku": "product34",
41             "price": "15.00",
42             "currency": "USD",
43             "quantity": "1",
44             "description": "CNC Foam Cutting Machine",
45             "tax": "0.02"
46           }
47         ],
48         "shipping_address": {
49           "recipient_name": "CNC Foam Cutting Machine",
50           "line1": "4th Floor",
51           "line2": "Unit #34",
52           "city": "San Jose",
53           "state": "CA",
54           "phone": "011862212345678",
55           "postal_code": "95131",
56           "country_code": "US"
57         }
58       }
59     }
60   ],
61   "links": [
62     {
63       "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-1B56960729604235TKQQIYVY",
64       "rel": "self",
65       "method": "GET"
66     },
67     {
68       "href": "https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-60385559L1062554J",
69       "rel": "approval_url",
70       "method": "REDIRECT"
71     },
72     {
73       "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-1B56960729604235TKQQIYVY/execute",
74       "rel": "execute",
75       "method": "POST"
76     }
77   ]
78 }

 客户需要在网站CNC Foam Cutting Machine集成PAYPAL支付,一开始搞了个简单的, 就只支付总金额和货币代码,其他细节没有,现在客户要求加上订单详情,添加手续费之类的。

参考以上代码,添加支付细节,应该是没问题的.

转载于:https://www.cnblogs.com/cannovo/p/11079593.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值