Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
382 views
in Technique[技术] by (71.8m points)

paypal - Adaptive Payments payment COMPLETED although actionType is CREATE

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

We ended up just using the Preapproval API and calling Pay with that. In the response I got to my e-mail I was told:

"PayPal does not allow you to hold any amount of money in somebody else's PayPal account     and that is why we have Preapproval API."

I'm still not sure why Create appears to make the charge without requiring an ExecutePayment call, but for my workflow (which I hope is valuable to you), the Preapproval API is the way to go.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...