如何使用Paypal Adeptive获取paykey并在结帐中成功结帐?

如何使用Paypal Adeptive获取paykey并在结帐中成功结帐?,paypal,paypal-sandbox,paypal-adaptive-payments,paypal-subscriptions,Paypal,Paypal Sandbox,Paypal Adaptive Payments,Paypal Subscriptions,我使用paypal adaptive并行支付,使用light box,这样用户就可以驻留在我自己的站点上,而无需重定向 我只是想当我点击付款按钮时,我会在表格中获得动态键,然后邮寄表格灯箱打开,我从发件人处获得付款,并将钱分成两个帐户 paypal business account: mohsin@balianti.com that is my site admin account as well. who will receive 10% from total amount. sanbox

我使用paypal adaptive并行支付,使用light box,这样用户就可以驻留在我自己的站点上,而无需重定向

我只是想当我点击付款按钮时,我会在表格中获得动态键,然后邮寄表格灯箱打开,我从发件人处获得付款,并将钱分成两个帐户

paypal business account: 
mohsin@balianti.com that is my site admin account as well. who will receive 10% from total amount.

sanbox account that i created in mohsin@balianti.com sandbox account options: mmskit@outlook.com that will receive 90% of total money.

so mohsin@balianti.com as a site admin and holding business account will receive 10% while other receiver will receive 90%.
means total money will split in both accounts.
希望你能明白我的意思

问题在于:

1- i am not getting paykey from paypal.
2- i am unable to do the transaction in light box.
3- i am unable to slipt the money in 2 receivers and so unable to complete to process.
我的HTML代码:

<html>
<head>
<script src="https://www.paypalobjects.com/js/external/dg.js" type="text/javascript"></script>
</head>

<body>
<!--https://www.sandbox.paypal.com/webapps/adaptivepayment/flow/pay?expType=light&payKey=AP-5S482348KH512131U-->
<form action="https://www.sandbox.paypal.com/webapps/adaptivepayment/flow/pay?expType=light&payKey=NOT KNOW HOW TO GET THIS PAY KEY ON THE BUTTON CLICK" target="PPDGFrame" class="standard">
<label for="buy">Buy Now:</label>
<input type="image" id="submitBtn" value="Pay with PayPal" src="https://www.paypalobjects.com/en_US/i/btn/btn_paynowCC_LG.gif">
</form>

<script type="text/javascript" charset="utf-8">
var embeddedPPFlow = new PAYPAL.apps.DGFlow({trigger: 'submitBtn'});
</script>

</body>

</html>
这是您的API签名:

API Username: mohsin_api1.balianti.com
API Password: DAQQ3QK5LTHHWGYV
Signature: Ad9JZLf8.13dlHmFgFft2NVbaPK4AvTXPIYEMvf.CyBXiGxnrmbQG4l2
将上面的PayPal设置复制并粘贴到Magento配置页面的API/集成部分

您已成功保存您的首选项。在您的网站上设置付款数据传输时,请使用以下身份令牌。 A9XxF-vXyH3-kPYVX0dDDcojmBxvMidXnmn846gxQD0ehzXM4Xjva0VL6RW

http://developer.paypal.com
mohsin@balianti.com
m@h$!nBali
请帮我解决整个问题。我正在等待认真的答复


谢谢大家。

我在这里的服务器上运行了您的代码

我注意到的第一件事是,在加载$PayPalResult时,您已经将下面的所有内容都注释掉了,因此该结果实际上没有任何变化。没有输出到屏幕或返回到请求客户端

当我用我的凭证运行它并查看实际结果时,这就是我得到的结果

[Errors] => Array
    (
        [0] => Array
            (
                [Receiver] => 
                [Category] => Application
                [Domain] => PLATFORM
                [ErrorID] => 520009
                [ExceptionID] => 
                [Message] => Account mohsin@balianti.com is restricted
                [Parameter] => mohsin@balianti.com
                [Severity] => Error
                [Subdomain] => Application
            )

    )

[Ack] => Failure
[Build] => 10273932
[CorrelationID] => 471e9fbfa0053
[Timestamp] => 2014-03-29T09:45:56.631-07:00
因此,您在这方面使用的接收方帐户似乎有问题。当我进一步研究时,我发现在同一笔付款中,您的主要和次要接收者设置了相同的接收者

一旦我用我自己的沙箱账户中的两封单独的电子邮件替换了你的收件人电子邮件地址,我得到了成功的回复

[Ack] => Success
[Build] => 10273932
[CorrelationID] => 9afd1342ebf17
[Timestamp] => 2014-03-29T09:50:00.472-07:00
[PayKey] => AP-8FY50816521434738
[PaymentExecStatus] => CREATED
于是我回去尝试你的账户作为接收者,同时尝试了我的一个账户,但最后我还是犯了同样的错误,账户被限制了

所以,我不知道为什么这个帐户会受到限制,特别是在沙箱上。不过,它看起来不像一个沙箱电子邮件帐户。是一个吗?在沙盒上进行测试时,需要确保使用的是沙盒帐户

如果您实际访问了live server,并且收到了相同的错误,那么您需要帮助解决该帐户的问题

但是,如果您正在运行live,则可能会出现不同的错误。要检查您是否需要查看返回到$PayPalResult的实际结果。同样,您已经在代码中注释掉了所有这些内容,因此它甚至不会将结果返回给您的客户端请求。

请参阅:

Array
(
    [Errors] => Array
        (
            [0] => Array
                (
                    [Receiver] => 
                    [Category] => Application
                    [Domain] => PLATFORM
                    [ErrorID] => 580022
                    [ExceptionID] => 
                    [Message] => Invalid request parameter: payKey cannot be null
                    [Parameter] => payKey
                    [Severity] => Error
                    [Subdomain] => Application
                )

        )

    [Ack] => Failure
    [Build] => 10273932
    [CorrelationID] => 2d63bc22401c7
    [Timestamp] => 2014-04-15T02:27:08.040-07:00
    [PaymentExecStatus] => 
    [XMLRequest] => ReturnAllen_US
    [XMLResponse] => 2014-04-15T02:27:08.040-07:00Failure2d63bc22401c710273932580022PLATFORMApplicationErrorApplicationInvalid request parameter: payKey cannot be nullpayKeynull
)
odftetretArray
(
    [0] => Array
        (
            [Receiver] => 
            [Category] => Application
            [Domain] => PLATFORM
            [ErrorID] => 580022
            [ExceptionID] => 
            [Message] => Invalid request parameter: payKey cannot be null
            [Parameter] => payKey
            [Severity] => Error
            [Subdomain] => Application
        )

)

@Andrew K.Angell请帮助……您是否自行运行Pay.php以确保通过PayPal返回的PayKey获得有效响应?我已尝试自行运行该文件,但没有收到PayPal的任何响应。拜托,看在上帝的份上,我的截止日期已经晚了,因为这个问题,请编辑我的代码并编写一些工作代码这对我很有帮助。我正在使用你的库。出于某种原因,请帮助我解决这个问题,因为我对adeptive paypal非常陌生。亲爱的先生,我在我的沙盒帐户中创建了2个新帐户,但它们在lightbox中仍然出现相同的错误。你能为我写一个可选代码吗?请,可以给我在lightbox的结果,并在两个接收器,这是一个网站管理员意味着购物车管理员和其他人的接收器分配的钱。我要编辑我的整个代码你。请参考我的沙盒验光。我现在正在张贴我的全部表格和证明。先生,请帮我优化密码mohsin@balianti.com是类型为business的沙盒帐户。因此,它的商业帐户。我想要的是,主网站管理员谁有一个商业帐户收到10%,其他接收者收到90%,并在同一时间到两个帐户的钱。我想所有这些在灯箱,所以发送登录在灯箱和付款通过,网站管理员得到10%,其他接收者收到90%。请用这种方式编辑我的全部代码。请,我亲爱的安德鲁先生,请把我的整个问题再读一遍。非常感谢你的帮助。我现在已经和你分享了全部信息。请帮我解决这个问题。我的客户现在真的失去了线索。请。凭据不会显示在这里,因为当您使用自适应支付时,它们会在标头中发送,而不是在API请求中发送。您只需再次检查您的值,并确认您发布到了正确的端点。谢谢您,亲爱的先生。请让我查一下。我在使用你们的课程,但不确定我做错了什么。亲爱的先生,我已经向您发送了电子邮件。如果您要求我提供所有文件,我可以与您共享我的所有文件,并在以后的请求中通过附件向您发送电子邮件。
[Errors] => Array
    (
        [0] => Array
            (
                [Receiver] => 
                [Category] => Application
                [Domain] => PLATFORM
                [ErrorID] => 520009
                [ExceptionID] => 
                [Message] => Account mohsin@balianti.com is restricted
                [Parameter] => mohsin@balianti.com
                [Severity] => Error
                [Subdomain] => Application
            )

    )

[Ack] => Failure
[Build] => 10273932
[CorrelationID] => 471e9fbfa0053
[Timestamp] => 2014-03-29T09:45:56.631-07:00
[Ack] => Success
[Build] => 10273932
[CorrelationID] => 9afd1342ebf17
[Timestamp] => 2014-03-29T09:50:00.472-07:00
[PayKey] => AP-8FY50816521434738
[PaymentExecStatus] => CREATED
Array
(
    [Errors] => Array
        (
            [0] => Array
                (
                    [Receiver] => 
                    [Category] => Application
                    [Domain] => PLATFORM
                    [ErrorID] => 580022
                    [ExceptionID] => 
                    [Message] => Invalid request parameter: payKey cannot be null
                    [Parameter] => payKey
                    [Severity] => Error
                    [Subdomain] => Application
                )

        )

    [Ack] => Failure
    [Build] => 10273932
    [CorrelationID] => 2d63bc22401c7
    [Timestamp] => 2014-04-15T02:27:08.040-07:00
    [PaymentExecStatus] => 
    [XMLRequest] => ReturnAllen_US
    [XMLResponse] => 2014-04-15T02:27:08.040-07:00Failure2d63bc22401c710273932580022PLATFORMApplicationErrorApplicationInvalid request parameter: payKey cannot be nullpayKeynull
)
odftetretArray
(
    [0] => Array
        (
            [Receiver] => 
            [Category] => Application
            [Domain] => PLATFORM
            [ErrorID] => 580022
            [ExceptionID] => 
            [Message] => Invalid request parameter: payKey cannot be null
            [Parameter] => payKey
            [Severity] => Error
            [Subdomain] => Application
        )

)