Oauth 2.0 401支付Paypal信用卡时发生未经授权的错误
我想让一个用户接受使用贝宝信用卡付款。因此,我已经从应用程序中授权用户,并按此链接中所述拨打电话 这是我从本地机器发出的卷曲请求Oauth 2.0 401支付Paypal信用卡时发生未经授权的错误,oauth-2.0,paypal,Oauth 2.0,Paypal,我想让一个用户接受使用贝宝信用卡付款。因此,我已经从应用程序中授权用户,并按此链接中所述拨打电话 这是我从本地机器发出的卷曲请求 curl -v https://api.sandbox.paypal.com/v1/payments/payment \ -H "Content-Type:application/json" \ -H "Authorization:Bearer 22SKUmLAeeKccfG-FmJdFiT97FLQnjSbeDHDN0hHdEQ" \ -d '{
curl -v https://api.sandbox.paypal.com/v1/payments/payment \
-H "Content-Type:application/json" \
-H "Authorization:Bearer 22SKUmLAeeKccfG-FmJdFiT97FLQnjSbeDHDN0hHdEQ" \
-d '{
"intent":"sale",
"payer":{
"payment_method":"credit_card",
"funding_instruments":[
{
"credit_card":{
"number":"4417119669820331",
"type":"visa",
"expire_month":11,
"expire_year":2018,
"cvv2":"874",
"first_name":"Joe",
"last_name":"Shopper",
"billing_address":{
"line1":"52 N Main ST",
"city":"Johnstown",
"country_code":"US",
"postal_code":"43210",
"state":"OH"
}
}
}
]
},
"transactions":[
{
"amount":{
"total":"7.47",
"currency":"USD",
"details":{
"subtotal":"7.41",
"tax":"0.03",
"shipping":"0.03"
}
},
"description":"This is the payment transaction description."
}
]
}'
我得到一个错误“401未授权”
谁能帮我一下我在上面的电话中遗漏了什么。或者进行信用卡支付需要任何其他范围。尝试获取新的访问令牌,并将其作为通话的一部分: 401通常意味着您没有正确的访问令牌或它已过期