PHPPost your Personal Home Pages Programing Tutorial Here
Notices
Welcome to the Aio® forum.
You are currently viewing AIOFORUM as a guest which gives you VERY limited access to view most discussions, Applications, Latest Movies & Tutorials and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload and Download content and access many other special features. Registration is fast, simple and absolutely free so please, Join our community today!
If you have any problems with the registration process or your account login, please use Contact us.
There are several PHP scripts and classes to process PayPal payments using their native IPN (Internet payment notification) feature. Because the whole process is based on the data you need to send via a web form to the PayPal payment processor these script look very similar.
The payment / notification process is shown via the following graphic:
Inside the form there are several required values to process a payment. PayPal gives the advice to post them all to get everything working. The following variables get some special attention:
Quote:
business
Quote:
= your PayPal email address cmd = single payments or subscription service (_xclick or _xclick-subscriptions) return = the URL where the buyer get back after the payment is processed cancel_return = the URL where the buyer get back if he has cancelled the payment notify_url = the location where your IPN script is located rm = how you need the data submitted from PayPal to your IPN script (1=get, 2=post) currency_code = the currency you accept for your payment lc = the country version of PayPal where your buyer is send to
There are much more variables, but we think that the other variables (product, order and shipment information) speak for themselves. Find a complete form provided with the example files.
To run some IPN enabled payment process we need a small script which will double check if the data which is send to the IPN script is valid according the data which is stored on the PayPal server. This feature is very important if your e-commerce accepts automatic payments.
The following code is able to check if the payment is valid against the PayPal server. Use this test to decide if the payment is valid or not.