Angular 2 paypal

前端 未结 2 1699
日久生厌
日久生厌 2021-01-05 22:30

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

2条回答
  •  孤街浪徒
    2021-01-05 22:50

    After user finish paying in PayPal, you can send them back to your website, then put loading message on the screen. Meanwhile you will have interval that will ask your server if the transaction was completed.

    Using PayPal IPN, PayPal will make http call to desired URL after a transaction was made, then you need to pick up the POST data that contain the info about the transaction, send it back to PayPal to verified that they send it, and after that do what you want with the information.

    • When you create the form for the PayPal button use 'custom' hidden fields for identification of the transaction (for example it can be user ID) PayPal we'll send this data back with the IPN so when you pick it up you can tie it to the correct user.

    • You need to define your IPN URL inside your PayPal settings

提交回复
热议问题