码迷,mamicode.com
首页 > 其他好文 > 详细

paypal支付

时间:2016-08-26 10:18:29      阅读:373      评论:0      收藏:0      [点我收藏+]

标签:

curl -v https://api.sandbox.paypal.com/v1/oauth2/token \
-H "Accept: application/json" \
-H "Accept-Language: en_US" \
-u "l1nBOzhwEbXGyvXDsenBv2ISkeyHIFQFws2m2R8bLmMXn1:EIHouCN8EnQPb3yhgNK9UdcpmLukFpik4HKiXrMhw9GCX1rW" \
-d "grant_type=client_credentials"
//返回的结果
{"scope":"https://uri.paypal.com/services/subscriptions https://api.paypal.com/v1/payments/.* https://api.paypal.com/v1/vault/credit-card https://uri.paypal.com/services/applications/webhooks openid https://uri.paypal.com/payments/payouts https://api.paypal.com/v1/vault/credit-card/.*","nonce":"2016-08-26T01:06:34Z7Ai81-WzKSiBdgjN1R4Tl1CfsYVIB9r69zoRqKOkb90","access_token":"A101.H-4awV8i9LoBfMCVyBwfost0YT3pKWP9tZMHm4DRjzTuTi_j.7tAAmBPmz4X8XtpjLY74vRRRzqa","token_type":"Bearer","app_id":"APP-80W28P519543T","expires_in":32400}

curl -v https://api.sandbox.paypal.com/v1/payments/payment \
-H "Content-Type: application/json" \
-H "Authorization: Bearer Access-Token" \
-d ‘{
"intent":"sale",
"redirect_urls":{
"return_url":"http://example.com/your_redirect_url.html",
"cancel_url":"http://example.com/your_cancel_url.html"
},
"payer":{
"payment_method":"paypal"
},
"transactions":[
{
"amount":{
"total":"7.47",
"currency":"USD"
}
}
]
}‘

paypal支付

标签:

原文地址:http://www.cnblogs.com/ch459742906/p/5809057.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!