【发布时间】:2017-07-23 01:17:42
【问题描述】:
我能够获得 oAuth 请求和响应
https://developer.paypal.com/docs/integration/direct/make-your-first-call/
但是当我运行它时总是给出 401 Unauthorized
在Postman下面如何执行?
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"
}
}
]
}'
【问题讨论】: