【发布时间】:2016-07-08 06:09:41
【问题描述】:
我已在我的 iOS 应用上安装并使用了 PayPal 移动 SDK。 我通过应用程序处理单笔付款,然后将售后 PayPal 确认字典传递到我的服务器进行确认(按照 PayPal 的指示)
但是,当我尝试在服务器上确认销售时,我收到 “发生内部服务错误”。
这是 PayPal 确认 JSON:
"paypalConfirmation" : {
"response" : {
"id" : "APAYPALSALECONFIRMATIONID",
"state" : "approved",
"create_time" : "2016-03-21T15:18:36Z",
"intent" : "sale"
},
"client" : {
"environment" : "mock",
"product_name" : "PayPal iOS SDK",
"paypal_sdk_version" : "2.14.0",
"platform" : "iOS"
},
"response_type" : "payment"
}
这是我服务器上的 node.js 代码:
//I am using the PayPal Node.js SDK
paypal.sale.get("APAYPALSALECONFIRMATIONID", function (error, sale) {
if (error) {
console.log(error);
context.fail('There was an error confirming the payment');
} else {
console.log('Verifying sale...');
compareSaleWithPost(order, sale, context);
}
});
这是错误:
{ [Error: Response Status : 500]
response:
{ name: 'INTERNAL_SERVICE_ERROR',
message: 'An internal service error has occurred',
information_link: 'https://developer.paypal.com/docs/a/#INTERNAL_SERVICE_ERROR',
debug_id: '***********',
httpStatusCode: 500 },
httpStatusCode: 500 }
我知道还有其他关于此错误的问题,但它们指的是信用卡付款以及数字或负面测试设置的问题。
我关闭了负面测试,这是针对 PayPal 帐户交易而不是信用卡交易。我正在使用沙盒模式
【问题讨论】:
-
也许确实是他们内部的错误,稍后解决?
-
paypal 状态页面上没有提到沙盒已关闭。我倾向于错误在我身边只是不确定是什么
标签: ios iphone paypal paypal-sandbox paypal-rest-sdk