dongtuan5367
2016-09-29 10:19
浏览 275
已采纳

如何获取PayPal rest api的访问令牌 - Live服务器

According to the PayPal Developer Documentation, when making a REST call, I need to supply the 'Access-Token', which I am unable to locate inside the PayPal control panel in my PayPal account.

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."
  }]
}'

How can I obtain the 'Access-Token' for a live (not sandbox) PayPal account ?

图片转代码服务由CSDN问答提供 功能建议

根据 PayPal开发人员文档,在进行REST呼叫时,我需要提供”访问令牌“,我无法在PayPal控制面板中找到它 我的PayPal帐户。

  curl -v https://api.sandbox.paypal.com/v1/payments/payment \
 -H“Content-Type:application /  json“\
 -H”授权:持票人访问令牌“\
 -d'{
”“意图”:“销售”,
“付款人”:
 {
“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”:“买方”
} 
}] 
},
“”交易“:  [
 {
“金额”:
 {
“总数”:“7.47”,
“货币”:“美元”
  },
“description”:“这是付款交易说明。”
}] 
}'
   
 
 

如何获取'访问权限 - 令牌是否为实时(不是沙盒)PayPal帐户?

  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • dqwh26750 2016-09-29 10:25
    已采纳

    After a bit of googling I came here: Developer Paypal

    I hope this helps you.

    已采纳该答案
    打赏 评论

相关推荐 更多相似问题