I have a web application with client in Angular2 and server REST API in node js with express, both hosted on separate servers. Trying to integrate nodejs with PayPal with node-rest-paypal SDK. The problem is how do I redirect back to client once payment is completed. Below is the flow I am following.
client sends pay info -> server -> create PayPal payment -> back to client with PayPal URL -> client redirects to PayPal -> payment completed/cancelled by user ->back to server -> execute/cancel payment -> how to redirect back to client, and with results?
Return and cancel URLs are configured to redirect to node server.
One thing I could think of is to send push notification to client with help of node socket.io. But I am not sure, if that is the only and best way to tackle this problem. Please guide me in the right direction, even if I am missing some basic thing here.
Thanks in advance.
via Alok Jha
No comments:
Post a Comment