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

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

问题描述

使用自适应支付 API 我使用 API 方法获得了支付密钥 Pay 使用这些参数:

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

然后我用这个 URL 启动了嵌入式支付流程:https://www.sandbox.paypal.com/webapps/adaptivepayment/flow/pay?expType=light&payKey=...

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

灯箱再次关闭后,当我调用PaymentDetails 付款键上的方法,它给了我(以及其他值):

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

很明显付款已经执行了,虽然我没有调用 ExecutePay 方法.

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

docs 状态(在PayRequest Fields"主题下):

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

actionType xs:string

(必填) Pay 请求是否支付给接收方,或者支付请求被设置为创建支付请求,但不履行付款直到 ExecutePayment 被调用.

(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.

允许的值为:
[...]
CREATE – 使用此选项通过 SetPaymentOptions 设置付款指令,然后在稍后执行付款ExecutePayment.

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.

我错过了什么?

推荐答案

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

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

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

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.

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

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.

如果您要进行明确的付款(发件人必须前往 PayPal 网站批准付款),那么您只需在将用户转至 PayPal 之前拨打这些额外电话即可.

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天全站免登陆