【发布时间】:2017-02-07 14:53:08
【问题描述】:
根据PayPal Developer Documentation,在进行 REST 调用时,我需要提供“访问令牌”,我无法在我的 PayPal 帐户的 PayPal 控制面板中找到它。
curl -v https://api.sandbox.paypal.com/v1/payments/payment \
-H "Content-Type:application/json" \
-H "Authorization: Bearer Access-Token" \
-d '{
"intent": "sale",
"payer":
{
"payment_method": "credit_card",
"funding_instruments": [
{
"credit_card":
{
"number": "4012888888881881",
"type": "mastercard",
"expire_month": 12,
"expire_year": 2018,
"cvv2": 111,
"first_name": "Betsy",
"last_name": "Buyer"
}
}]
},
"transactions": [
{
"amount":
{
"total": "7.47",
"currency": "USD"
},
"description": "This is the payment transaction description."
}]
}'
如何获取实时(非沙盒)PayPal 帐户的“访问令牌”?
【问题讨论】: