尽管actionType为CREATE,但Adaptive Payments的付款已完成 [英] Adaptive Payments payment COMPLETED although actionType is CREATE

查看:73
本文介绍了尽管actionType为CREATE,但Adaptive Payments的付款已完成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用自适应支付API 我使用API​​方法 Pay 具有以下参数:

actionType:                      CREATE
receiverList.receiver(0).email:  ...
receiverList.receiver(0).amount: 5
currencyCode:                    EUR
cancelUrl:                       ...
returnUrl:                       ...
requestEnvelope.errorLanguage:   en_US

然后,我使用以下URL开始嵌入式薪酬流程: > https://www.sandbox.paypal.com/webapps/adaptivepayment/flow/pay?expType = light& payKey = ...

再次关闭灯箱后,当我调用 PaymentDetails 付款键上的方法,它(除其他值外)为我提供了

paymentInfoList.paymentInfo(0).transactionStatus: COMPLETED
status:                                           COMPLETED
actionType:                                       CREATE

虽然我没有调用 ExecutePay 方法.

文档状态(在"PayRequest字段"主题下):

actionType xs:string

(必需)付款请求是向收款人付款还是向付款人付款 设置了付款请求以创建付款请求,但未满足 直到ExecutePayment被调用为止.

允许的值为:
[...]
CREATE –使用此选项可以通过SetPaymentOptions设置付款说明,然后在以后的时间执行付款 ExecutePayment.

我想念什么?

解决方案

(我知道问这个问题已经三年了,但是由于另一个用户引用了这个问题,我还是会回答这个问题.)

简而言之,如果您将发件人发送到PayPal网站,并且他们批准了付款,则无论您将actionType设置为什么,付款都将立即完成.

设置actionType=CREATE的目的是给您一点时间,使您在付款完成之前针对Paykey进行其他API调用.当您执行隐式付款时,它尤其有用-例如,发件人和API调用者是同一方的付款(并且您已设置sender.useCredentials=true,在senderEmail中设置了电子邮件地址或设置了安全sender.accountId中的商家帐户ID),或您使用发件人之前已批准的预先批准的付款.由于通常会立即完成这些类型的付款(如果您设置了actionType=PAY),因此设置actionType=CREATE会给您一点时间,以便在付款完成之前针对该付款进行其他API调用(例如SetPaymentOptions).

但是,如果您要进行显式付款(发件人必须转至PayPal网站以批准付款),则只需先进行这些附加呼叫,然后再将用户转移到PayPal.

Using the Adaptive Payments API I acquired a pay key using the API method Pay with these parameters:

actionType:                      CREATE
receiverList.receiver(0).email:  ...
receiverList.receiver(0).amount: 5
currencyCode:                    EUR
cancelUrl:                       ...
returnUrl:                       ...
requestEnvelope.errorLanguage:   en_US

Then I started the embedded pay flow with this URL: https://www.sandbox.paypal.com/webapps/adaptivepayment/flow/pay?expType=light&payKey=...

After the lightbox is closed again, when I call the PaymentDetails method on the pay key, it gives me (among other values):

paymentInfoList.paymentInfo(0).transactionStatus: COMPLETED
status:                                           COMPLETED
actionType:                                       CREATE

So apparently the payment is already executed, though I did not call the ExecutePay method yet.

The docs state (under the topic "PayRequest Fields"):

actionType xs:string

(Required) Whether the Pay request pays the receiver or whether the Pay request is set up to create a payment request, but not fulfill the payment until the ExecutePayment is called.

Allowable values are:
[...]
CREATE – Use this option to set up the payment instructions with SetPaymentOptions and then execute the payment at a later time with the ExecutePayment.

What did I miss?

解决方案

(I know it's been three years since this question was asked, but since another user referenced this question, I'll answer it anyway.)

In short, if you send the sender over to the PayPal website, and they approve the payment, the payment will complete immediately, regardless of what you set actionType to.

The purpose of setting actionType=CREATE is to give you a little bit of time to make additional API calls against the paykey before the payment completes. It's primarily useful when you're doing implicit payments -- e.g., those payments where the sender and the API caller are the same party (and you've set sender.useCredentials=true, set your email address in senderEmail, or set your secure merchant account ID in sender.accountId), or those payments where you're using a preapproval that the sender has previously approved. Since these types of payments would normally complete right away (if you set actionType=PAY), setting actionType=CREATE gives you a little bit of time to make other API calls against the payment (such as SetPaymentOptions) before the payment completes.

If you're doing an explicit payment (where the sender has to go to the PayPal website to approve the payment), however, you'd just make those additional calls before sending the user over to PayPal.

这篇关于尽管actionType为CREATE,但Adaptive Payments的付款已完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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