Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular 2 paypal

Tags:

angular

paypal

I am setting up a new ecommerce project with angular 2 and firebase. My issue is how to integrate a paypal button and when customers click on it, they will be redirected to paypal and pay then redirect back to my site. At the moment I manage to get tnhem back either they pay or cancel with a given return url as instructed in this github repo: https://github.com/musale/angular2-paypal The problem is how to get data from paypal to assure that payment was successful before we can proceed with the order. I understand that we can get them either by paypal IPN or PDT but dont know how to with angular 2 firebase. Solutions, examples or suggestions would be apreciated.

like image 245
sugarme Avatar asked Oct 30 '22 19:10

sugarme


1 Answers

Thanks all for the solutions and here is our delayed solution: as Firebase controls the backend, it is impossible to setup a payment system on it, we setup a light-weight nodejs express server hosted on google cloud platform which can communicate with paypal to receive IPN data from paypal each time our customer makes a payment. The IPN data will be used to check with realtime data from Firebase and updates payment status to client side.

like image 170
sugarme Avatar answered Nov 15 '22 06:11

sugarme