【发布时间】:2015-02-24 18:28:11
【问题描述】:
我正在尝试使用 Paypal 进行非常简单的付款,从示例中这似乎非常简单。但我得到的只是一个非常无用的“内部错误”/ 520002 响应:(。
$config = array(
'mode' => 'sandbox',
'acct1.UserName' => 'myUsername',
'acct1.Password' => 'myPassword',
'acct1.Signature' => "mySignature"
);
$service = new AdaptivePaymentsService($config);
$requestEnvelope = new RequestEnvelope("en_US");
$receiver = new Receiver();
$receiver->email = "aValidEmailAddress@test.net";
$receiver->amount = 4;
$receiverList = new ReceiverList(array($receiver));
$payRequest = new PayRequest($requestEnvelope, "PAY", "http://somehost/cancel", "EUR", $receiverList, "http://somehost/return");
$payRequest->senderEmail = "anotherValidEmailAddress@test.net";
$payRequest->ipnNotificationUrl = "http://somehost/ipn2";
$response = $service->pay($payRequest);
回复:
{
"responseEnvelope":
{
"timestamp":"2014-12-27T21:58:18.816-08:00",
"ack":"Failure",
"correlationId":"5da19d03caba3",
"build":"13414382"
},
"payKey":null,
"paymentExecStatus":null,
"payErrorList":null,
"paymentInfoList":null,
"sender":null,
"defaultFundingPlan":null,
"warningDataList":null,
"error":
[
{
"errorId":"520002",
"domain":"PLATFORM",
"subdomain":"Application",
"severity":"Error",
"category":"Application",
"message":"Internal Error",
"exceptionId":null,
"parameter":null
}
]
}
凭据似乎是正确的,因为我似乎设法克服了与身份验证相关的错误。
任何帮助将不胜感激。
这是我从本地 Web 服务器运行的原始代码。 我只是将凭据和个人数据更改为垃圾。
已经尝试过一些事情,例如不同的货币、没有发件人电子邮件等(例如 Paypal 的示例代码)
干杯!
【问题讨论】:
-
你能解决这个问题吗?我有这个确切的问题。如果有人知道此错误,请提供帮助。谢谢
标签: php paypal paypal-adaptive-payments