连锁付款无法完成 [英] Chained payment cannot be completed

查看:70
本文介绍了连锁付款无法完成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想想我只是在这里遗漏了一些明显的东西,但是我似乎无法完成连锁支付(使用

I'd like to think I'm just missing something obvious here, but I can't seem to get a chained payment to complete (using the PHP SDK in the sandbox). I am able to get a successful response, and when I redirect the user to PayPal the transaction details show up fine, but when the user attempts to complete the payment they get the dreaded error:

您的付款无法完成.请返回参与的网站,然后重试.

令人沮丧的是,我转储了正在发送的请求数据,并将其与

What's frustrating is that I've dumped the request data that is being sent, and compared it to the data in the example given in the documentation and tweaked my request until they were effectively identical, and still no dice. I'm also not seeing anything at all on any of the accounts to indicate that payment was attempted, pending or failed.

这是发送的内容:

requestEnvelope.errorLanguage=en_US
&clientDetails.ipAddress=127.0.0.1
&clientDetails.applicationId=APP-80W284485P519543T
&actionType=PAY
&cancelUrl=http%3A%2F%2Fdomain.com%2Fpaypal%2Fcancel
&currencyCode=USD
&feesPayer=EACHRECEIVER
&memo=Test+Payment
&receiverList.receiver(0).amount=3.25
&receiverList.receiver(0).email=merchant%40domain.com
&receiverList.receiver(0).primary=1
&receiverList.receiver(1).amount=1.5
&receiverList.receiver(1).email=seller%40domain.com
&senderEmail=buyer%40domain.com
&returnUrl=http%3A%2F%2Fdomain.com%2Fpaypal%2Freturn

响应对我来说还不错:

PayPal\Types\AP\PayResponse Object
(
    [responseEnvelope] => PayPal\Types\Common\ResponseEnvelope Object
        (
            [timestamp] => 2013-07-28T23:25:52.676-07:00
            [ack] => Success
            [correlationId] => bf1ba2c8a50d4
            [build] => 6941298
        )

    [payKey] => AP-XXXXXXXXXXXXXXXXC
    [paymentExecStatus] => CREATED
    [payErrorList] => 
    [paymentInfoList] => 
    [sender] => 
    [defaultFundingPlan] => 
    [warningDataList] => 
    [error] => 
)

我还尝试将操作类型设置为PAY_PRIMARY,因为我指定了主要收件人,所以无论如何,这是我的理想选择.

I also tried setting the action type to PAY_PRIMARY since I am specifying a primary recipient, and that's ideally what I'm after anyways.

更新:由于我仍然没有收到我在PayPal上打开的关于此问题的票证的回复,并且没有人对此问题发表评论,因此我做了一些进一步的测试.如果我使用API​​资源管理器生成了相同的请求,则交易将正常完成.但是完全相同的请求通过API失败.我已经验证(通过复制和粘贴生成的标头和请求正文),API Explorer和SDK代码生成的请求之间的 only 区别如下:

UPDATE: Seeing as I still have not received a response on the ticket I opened with PayPal regarding this, and nobody has commented on this question, I did some further testing. If I generate the same request with the API explorer, the transaction completes normally. But the exact same request fails through the API. I have verified (by copying and pasting the generated headers and request body) that the only differences between the request generated by the API Explorer and the SDK code are as follows:

  • 资源管理器创建的标题在名称和值之间有一个空格
  • API资源管理器不包含应用程序ID
  • 我的API调用 包含标头和请求正文中的应用程序ID
  • The headers created by the explorer have a space between the name and values
  • The API Explorer does not include the application ID
  • My API call does include the application ID in both the header and request body

如果我删除了应用程序ID引用,则SDK API调用仍然无法正常运行,该ID是为了解决此问题而添加的.

The SDK API call still does not work if I remove the application ID reference, which was added in an attempt to solve this issue to begin with.

我不明白为什么SDK(由PayPal提供)生成的付款无法完成,但是当浏览器调用它时,确切的调用仍然可以正常工作.任何帮助或建议,将不胜感激.

I do not understand why the payment generated by the SDK (which is provided by PayPal) fails to complete, yet the exact call works fine when the explorer calls it. Any help or advice would be appreciated.

推荐答案

因此,在通过PayPal的商家技术支持解决了近一个月的问题之后(大多数时候根本没有任何反应),并等待了将近两周的时间响应升级后,结果证明问题出在SDK配置.

So after nearly a month of fighting this issue with PayPal's merchant technical support (most of the time not getting any responses at all) and waiting nearly two weeks for a response on an escalation, it turns out the issue stems from the SDK configuration.

尽管在整个API文档和SDK代码中,应用程序ID均引用为 applicationId ,但显然,SDK要求将其作为 acct1.AppId 输入到配置文件中.我在遇到有关配置SDK的维基页面后才发现此问题,甚至24小时前都不存在.

Although throughout the API docs and SDK code the Application ID is referenced as applicationId, apparently the SDK requires it to be entered in the config file as acct1.AppId instead. I only discovered this after coming across this wiki page on configuring the SDK, which didn't even exist 24 hours ago.

更新配置后,我便可以无误地授权付款.

Once I updated my config, I was able to authorize the payment without error.

这篇关于连锁付款无法完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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