PayPal Sandbox Classic API Express Checkout NVP 内部服务器错误 (500)

PayPal Sandbox Classic API Express Checkout NVP Internal Server Error (500)

快速总结

我正在使用 PHP 开发一个 e-commerce 站点。它使用 PayPal 进行付款。我已经成功地使用了(从通过 SetExpressCheckout 发送请求字符串到 DoExpressCheckoutPayment 到 GetExpressCheckoutDetails 到在 MySQL 数据库中存储支付细节)PayPal 的沙盒模式和他们的经典 API Express Checkout (NVP) 从上次晚些时候开始年到现在。直到昨晚一切正常,网站的 PayPal 部分没有发生重大变化。现在,我在每次付款请求时都会在 https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=[TOKEN] 收到 "Internal Server Error"。

演练:

我看到的:

Paypal SetExpressCheckout return:

Array
(
    [TOKEN] => XX-XXXXXXXXXXXXXXXXX
    [TIMESTAMP] => 2015-03-28T20:27:25Z
    [CORRELATIONID] => XXXXXXXXXXXXX
    [ACK] => Success
    [VERSION] => 109.0
    [BUILD] => 15840636
)

上面 link 处的 PayPal 沙盒错误消息:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@paypal.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

为什么我找不到答案:

内部服务器错误意味着 PayPal 服务器内部。这是 PayPal 的 "Help! I give up!" 错误消息。

这不排除您做错了什么导致 PayPal 的代码离开绿色路径进入树林并被熊吃掉的可能性,但无论如何:按照错误页面上的说明进行操作并联系贝宝支持。他们应该能够查找您的关联 ID 并查看发生了什么。然后他们可以让您知道您是否可以通过在您的端进行更改来解决该问题,或者您的代码是否一切正常并且这 100% 是他们的问题。然后他们可以改进他们的代码,以便下一个可能会犯与您类似的错误的人得到更好的反馈。

(虽然像这样的页面通常显示给您的客户,而不是您,但 PayPal 通常只提供相对通用的失败消息。)

如果你想在等待 PayPal 回复你的同时多做一些工作,我会检查一些其他的事情:你验证了 API 似乎确实像它一样工作索赔。检查是明智的,但错误出在网络重定向上,因此请关注这一点:如果您传递已知的伪造令牌,您会得到什么?在另一台计算机上或清除 cookie 后会发生什么?如果您尝试使用同一对帐户进行按钮付款(不是快速结账),您会得到什么?

在通过日志向 PayPal 报告此问题后,他们的回应是确认这是他们这边的已知问题。

Dear Philip,

Thank you for contacting PayPal Merchant Technical Services about the internal server error on the sandbox environment. This is a known issue currently that is being investigated and hopefully will be resolved soon. I will let you know when I have confirmation the issue is fixed. Thank you.

Sincerely,

Mike

Merchant Technical Support

PayPal, an eBay Company

来自贝宝的更新:

Dear Philip, The Sandbox issue should be resolved now and you should not be seeing the Internal Server 500 error. If you haave any other issues please let us know, https://www.paypal.com/mts

Sincerely,

Mike

Merchant Technical Support

PayPal, an eBay Company

我已经测试过,它似乎已修复。