How to intergrate paypal into an application?
Im planning to allow people to create premium accounts on a site. There is a simple registration form, at the end of which I want to direct people to paypal where they will make a payment, and then be sent back to my site with their newly created account now activated (if transaction went thru).
I dont want a fully hosted solution ("Website Payments Pro")开发者_JAVA百科, but something where you leave the site, and then come back to it after payment.
Everything you need to get started
- View sample code
- View all tech docs
- Download SDKs
- API Reference
Using the PayPal API, you'll be able to send users to PayPal to handle payments. Once the transaction has been completed it will then send a response to a script on your site, which you can then act on accordingly. For example, update a particular user's status as 'Paid' or 'Unpaid' in your members database table.
You want to look at PayPal IPN. With that, you can send these pages URLs as hidden fields and PayPal will then return the user to the page you submitted for success, failed, IPN handler etc.
Yes that's possible, look into the "Buy now"-method on PayPal, they have an off-site payment possibility and they have on-site payment. It's up to you how much you want to spend on both time and percentage on each sale.
精彩评论