Here's an extended example flow that should work in the live environment:
- Send Pay request with actionType=CREATE
- Send SetPaymentOptions request using the returned payKey
- Redirect the user to approve the payment
- Receive IPN
- Send PaymentDetails request using the returned payKey
- Send GetPaymentOptions request using the returned payKey
- Send ExecutePayment request using the returned payKey
Everything works fine, till the last step. Somehow Payment is set to COMPLETED state as soon as the user approves the payment.
What am I doing wrong? I have used different card to accept the payment, and no paypal account so that I wouldn't be treated as the same user. Here are the details after user accepts the payment:
[status] => COMPLETED
[trackingId] =>
[payKey] => AP-XXXXXXXXX
[actionType] => CREATE
[feesPayer] => EACHRECEIVER