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 withSetPaymentOptions
and then execute the payment at a later time with theExecutePayment
.
What did I miss?
actionType=CREATE
causes the payments to be made immediately after the buyer approves the payment on PayPal. – nickh