我使用 Paypal SDK 接受信用卡。付款成功后,我收到 PayPalPayment 对象,其中包含付款确认:
{
"proof_of_payment": {
"rest_api": {
"state": "approved",
"payment_id": "API-PAYMENT-ID-1843"
}
},
"payment": {
"short_description": "Hipster t-shirt",
"amount": "9.95",
"currency_code": "USD"
},
"client": {
"platform": "iOS",
"paypal_sdk_version": "1.0.0",
"environment": "live",
"product_name": "PayPal iOS SDK"
}
}
要验证付款,我需要进行 API 调用:
curl https://api.sandbox.paypal.com/v1/payments/payment/PAY-5YK922393D847794YKER7MUI \
-H "Content-Type:application/json" \
-H "Authorization:Bearer ENxom5Fof1KqAffEsXtxwEDa6E1HTEK__KVdIsaCYF8C"
我需要那个Authorization:Bearer
参数,我怎么得到它?
当我尝试在没有它的情况下进行 API 调用时,我得到空响应。
谢谢。