How do I use Paypal on my website with PHP and MySQL?
I'm develo开发者_如何学Cping 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.
精彩评论