简体   繁体   中英

How do I use Paypal on my website with PHP and MySQL?

I'm developing a website with PHP and MySQL. How can I make it so that if you click the Paypal button and pay successfully it will change a string in the database from "Personal" to "Professional"?

Assuming you're talking about PayPal Website Payments Standard (if you're not paying a monthly fee, you are), then you need to use Instant Payment Notification . You can either enable it account-wide from the profile tab of your account, or per payment button/link by setting the notify_url parameter.

PayPal will send an HTTP POST to your notify URL when a payment is completed. Your script at that URL should verify that the POST is authentic, then update the appropriate row in the database now that you know it's paid for.

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