简体   繁体   中英

Paypal : execute script when the donation is done

How can I execute a script PHP that give one point on a SQL database when the donation is done ?
I have a page for donation. Created with : https://developer.paypal.com/developer/accounts/

For example a page with the XXXXXXXXXXXXX ID.

<a href="https://www.sandbox.paypal.com/cgi-bin/webscr?
hosted_button_id=XXXXXXXXXXXXX&cmd=_s-xclick"></a>

When the user click, He is redirected on a PayPal page, for do the donation.

For example :

  1. The redirect success page is : www.test.com/sucess.php -> give one point.
  2. And the fail page is : www.test.com/error.php

Take a look at PayPal IPN . That's what you want to use to automate post-transaction procedures.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM