我正在使用Paypal REST API进行付款。使用沙盒凭据时,所有工作正常,但是当我切换到LIVE凭证时,它会发出如下错误: 请求paypal API:
{
"body": {
"intent": "sale",
"payer": {
"payment_method": "credit_card",
"funding_instruments": [
{
"credit_card_token": {
"credit_card_id": "CARD-7314506536077511MK7WL121",
"payer_id": "57ecbbed656c78519a28382c"
}
}
]
},
"transactions": [
{
"amount": {
"currency": "USD",
"total": 10
},
"description": "Payment taken from customer Neha for booking #SR1032 and to be send to SP Neha and SP paypal Id hello@y.bom"
}
]
},
"header": {
"x-pp-ads-performed": "false",
"content-length": "374",
"pp_remote_addr": "54.244.2.156",
"paypal-request-id": "2afb7a93-0cc2-4ab2-b216-45b8de908f9f",
"pp_geo_loc": "US",
"x-pp-silover": "name=LIVE3.API.1&silo_version=880&app=platformapiserv&TIME=2734681175&HTTP_X_PP_AZ_LOCATOR=",
"host": "api.paypal.com",
"accept": "application/json",
"client-auth": "No cert",
"connection": "close",
"x-pp-idempotencyid": "eabb84d3ef438_1475149730",
"x-slr-orig-script_uri": "https://api.paypal.com/v1/payments/payment/",
"x-pp-slingshot-targetapp": "platformapiserv",
"x-pp-corrid": "eabb84d3ef438",
"user-agent": "PayPalSDK/PayPal-node-SDK 1.6.9 (node v4.5.0-x64-linux; OpenSSL 1.0.2h)",
"content-type": "application/json",
"authorization": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx9T1G"
},
"additional_properties":
来自paypal服务器的回复
{
"status": 401,
"duration_time": 49,
"body": {
"message": "Unauthorized payment.",
"debug_id": "eabb84d3ef438",
"information_link": "https://developer.paypal.com/webapps/developer/docs/api/#UNAUTHORIZED_PAYMENT",
"name": "UNAUTHORIZED_PAYMENT"
},
"additional_properties": {},
"header": {
"Content-Length": "191",
"Content-Language": "*",
"CORRELATION-ID": "eabb84d3ef438",
"Date": "Thu, 29 Sep 2016 11:48:50 GMT",
"Connection": "close",
"Paypal-Debug-Id": "eabb84d3ef438",
"PROXY_SERVER_INFO": "host=dcg12javapapi7866.dcg12.slc.paypalinc.com;threadId=704",
"Content-Type": "application/json"
}
}