paypal pro script in php


At first I develop the form where user give all information. I did not validate all form fields but when you use it for your website please validate all form fields then process in next step. I name it index.php

After click submit, using ajax post request all the form data will send to send.php. In send.php page I silently send all the value to paypal site using cURL. But here I need to put my paypal pro cardinal details like username, password, signature. When you create paypal pro account paypal will generate thin things for you. You can use this link also for creating paypal pro account. https://www.paypal.com/webapps/mpp/paypal-payments-pro or http://stackoverflow.com/questions/7820298/how-to-create-paypal-website-payment-pro-sandbox-account

The above code will send all your information to paypal, make your payment done and send a payment status information to my site. I check the status information, if it is ok then save it to database and also you can send mail to your user. After successful payment process I redirect the user to success page. If there is some error I show the error message to user.

Now make success.php page. Here i just simply show a message, but for you, you can show any thing you want.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s