自适应支付流程中断 [英] Adaptive payments flow is broken

查看:121
本文介绍了自适应支付流程中断的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于几天以来,自适应付款(预先批准和链接付款)似乎已失效. 当我们将用户发送到Paypal来完成订单(链接)或授权预先批准(预先批准)时,他们会收到一个通用的无效交易"错误.测试了流程,我们得到了相同的错误,在控制台上,我们可以在paypal对象目录中的checkout.js文件上看到此错误:

Since few days the adaptive payments (both preapprovals and chained) seems to be broken. When we send the user to paypal to complete the order (chained) or to authorize the preapproval (preapprovals), they get a generic "invalid transaction" error. Tested the flow, we get the same error and looking to the console we can see this error on the checkout.js file in the paypal object directory:

Uncaught TypeError: PAYPAL.AP.Subflow is not a constructor
at checkout.js:11
(anonymous) @ checkout.js:11

似乎在贝宝(PayPal)方面出现了问题. 有人遇到同样的问题吗?解决方法?

Seems something has broken on paypal side. Anyone with the same issue? Workarounds?

干杯,菲尔

推荐答案

我们终于找到了问题所在.

We've finally figured out what was wrong.

尝试对svcs端点的调用进行完整调试,我们发现自几天(2013年以来首次)以来,我们开始收到来自Paypal服务器对SOAP请求的奇怪响应,如下所示:

Trying the complete debugging of the call to the svcs endpoint we've discovered that since few days (first time from 2013), we started getting an odd response from the paypal server to our SOAP request as:

{"faultstring":未知内容编码","faultcode":"HTTP"}

{"faultstring":"Unknown Content-Encoding","faultcode":"HTTP"}

然后,我们考虑了对Paypal服务器的调用的传输"中的某些问题,并尝试在标头中添加一些内容.

We've then thought to some issue in the "transportation" of the call to paypal servers and we've tryed to add something in the headers.

首先,我们发现在HTTP标头中请求了一些以前从未使用过的行,例如:

First, we discovered that in our http header request some line that we've never used before was missing, for example:

"X-PAYPAL-DEVICE-IPADDRESS:". $ _SERVER ['REMOTE_ADDR']. "\ r \ n";

"X-PAYPAL-DEVICE-IPADDRESS: " . $_SERVER['REMOTE_ADDR'] . "\r\n" ;

但这并不能解决问题. 然后,我们在soap客户数组中添加了新行:

But this didn't solve the issue. Then we've added a new line in the soap client array:

压缩" => SOAP_COMPRESSION_ACCEPT,

'compression' => SOAP_COMPRESSION_ACCEPT,

添加此代码可以解决问题,但是没有人向我们建议过这部分代码的要求.可能这是一个Linux问题,也许paypal用新的服务器更改了某些服务器,而较旧的服务器接受了SOAP请求,即使它没有使用压缩"参数,在较新的环境中,这似乎也是必需的.

Adding this solved the issue but no one ever adviced us about the requirement of this part of the code. Probably, this is a linux issue, maybe paypal has changed some server with a newer one and while the older accepted the SOAP request even if it was not with this "compression" parameter, in the newer environment it seems required.

无论如何,添加此行后一切恢复正常,我们对Pay操作仍然有一个奇怪的时间响应(长),而对于Preapproval操作来说一切都很顺利,但这可能取决于管理一个或另一个的不同Paypal服务器操作.

Anyway, everything is back to normality adding this line, we just still have an odd time response (long) for the Pay operation while everyting is smooth for the Preapproval operation but this might depend on different paypal servers managing one or the other operation.

这篇关于自适应支付流程中断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆