Search code examples
paypalpaypal-sandboxpaypal-rest-sdk

PayPal Checkout Integration


I am hoping someone here can help me as I have been on to PayPal technical support who haven't been very helpful.

I am integrating PayPal checkout, following the instructions here: https://developer.paypal.com/docs/checkout/standard/integrate/

I wish to collect the paypal transaction ID in my database, send order confirmation emails etc... so as such I need to implement the optional step 5 described in this integration guide, which essentially means creating two routes on my server, one to call "create order" and one to call "capture order" - as per the sample code here: https://developer.paypal.com/demo/checkout/#/pattern/server

I have got this working successfully however I wish to know 2 things:

  1. How can I see the 3D Secure flow - PayPal tell me know to worry about it as they handle it within the popup window but I would like to see the flow. I have tried test cards that should invoke the 3DS flow but they dont show any 3DS flow, just complete the payment.

  2. The response to the capture order end point can return multiple statuses (COMPLETED, APPROVED, VOIDED, PAYER_ACTION_REQUIRED etc). Is it only the "COMPLETED" status that means a fully completed payment (and therefore I should complete the order)? What happens if it returns "PAYER_ACTION_REQUIRED" - which means 3DS check needed - will PayPal handle this and then re-execute my route?

Any help or advice would be greatly appreciated.


Solution

  • For the normal, 'Standard' integration, you don't have to test 3DS. The PayPal page/iframe already takes care of everything about it.

    [Only for the 'Advanced' integration -- where you are implementing individual hosted card fields with your own styling -- do you need to implement and test 3DS yourself]


    PAYER_ACTION_REQUIRED only happens with Advanced. All you need to do on the server end after the capture is check for COMPLETED and the existence of the Capture Id you're going to store for accounting purposes.