Paypal integration

My client is adamant about to using stripe and wants to integrate his payment gateway using PayPal only. Is there any tutorial that I can follow to integrate the payment system with PayPal.

I am able to understand the process upto creating the order on PayPal using API’s just not very sure about how to know if payment completed successfully and wait till we get response. If I can get complete process tutorial our if any of you have already done it. Please share.
Thanks in advance.

(I am not sure, but if anyone is interested I can pay fir this help.)

1 Like

Hi Alex,

This link might be useful for you (https://developer.paypal.com/docs/checkout/standard/integrate/)

Step 0 [Client-side]: Setup UI for payment. Use the sample frontend HTML code in the link.

Step 1 [Server-side]: create order API: You first generate Access Token using the client ID and secrete.
The endpoint for sandbox account is https://api-m.sandbox.paypal.com/v1/oauth2/token. The create order API will use the access token obtained from the first action to generate an Order ID. This Order ID is returned to the front-end to for the payer to use to approve the order.

Step 2 [Client Side]: The Javascript client code will use the order ID returned by the create order API to allow the payer to login to Paypal and approve payment. Once the payer approves the payment, the Javascript client code will again send a request to the capture order API on the server to finalize the transaction.

Step 3 [Server-side]: capture order API: the capture order API uses the Order ID to capture payment and store order information. https://api-m.sandbox.paypal.com/v2/checkout/orders/ORDER_ID_HERE/capture

I hope this helps you. If you need any further assistance, please feel free to direct message me.

2 Likes

This may help

And this

Or

Or this