简体   繁体   English

使用API​​ 401错误的Bigcommerce处理付款,代码为10001

[英]Bigcommerce Process Payment with api 401 error with code 10001

i just started working with bigcommrce payment API and unable to solve the error 401 unauthorized. 我刚刚开始使用bigcommrce付款API,无法解决未经授权的错误401。

here is the sample data i have tried 这是我尝试过的样本数据

{
 "payment": {
 "instrument": {},
 "payment_method_id": "cod",
 "amount": 81,
 "currency_code": "PKR"
 }
}

and

{
"payment": {
"instrument": {
  "type": "card",
  "number": "4111111111111111",
  "cardholder_name": "BP",
  "expiry_month": 12,
  "expiry_year": 2020,
  "verification_value": "411"
  },
 "payment_method_id": "authorizenet.card",
 "save_instrument": true
 }
}

but still getting the response of 401 I have set the authorization token (Payment Access Token) already with the other two headers. 但仍然收到401的响应,我已经使用其他两个标头设置了授权令牌(付款访问令牌)。

One likely cause of a 401 is the formatting of the payment access token header. 401的一个可能原因是付款访问令牌标头的格式。 It needs to be: 它必须是:

Authorization: PAT token.goes.here , with PAT in all caps and a space between the word PAT and the token. Authorization: PAT token.goes.here ,所有大写字母带有PAT,单词PAT和令牌之间有一个空格。 Hope that helps! 希望有帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM