Question

I'm trying to integrate PayPal Classic API NVP to our website but I'm having issues with the SetExpressCheckout API call.

I'm using the useraction=commit parameter for the payer to confirm the sale directly at PayPal.

My issue is after "Pay now" is clicked, PayPal redirects to the URL I send as RETURNURL but I don't see the transaction on the sandbox account or by using TransactionSearch.

These are the parameters I send for checkout:

METHOD=SetExpressCheckout
EMAIL=payerEmail
SOLUTIONTYPE=Sole
RETURNURL=myReturnUrl
CANCELURL=myCancelUrl
PAYMENTREQUEST_0_AMT=30.00
PAYMENTREQUEST_0_ITEMAMT=30.00
PAYMENTREQUEST_0_CURRENCYCODE=USD
PAYMENTREQUEST_0_CUSTOM=myCustomId
PAYMENTREQUEST_0_PAYMENTACTION=Sale
L_PAYMENTREQUEST_0_QTY0=1
L_PAYMENTREQUEST_0_AMT0=30.00
L_PAYMENTREQUEST_0_NAME0=myProduct

After payment, PayPal redirects to

myReturnUrl?token={Token}&PayerID={PayerId}
Était-ce utile?

La solution

It's normal. The transaction is set, but you need to complete it using the DoExpressCheckoutPayment api operation.

More information and an example here: https://devtools-paypal.com/guide/expresscheckout/dotnet?success=true&token=EC-7BD474648D4932937&PayerID=WNW7LMW2UXQJG

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top