Integrating PayPal to your site (Simplest way!) |
| Integrating PayPal is the simplest, cheapest and fastest payment Gateway youcan find on the market today! You must, however, comply with a few rules: This can take up to a month if you do not have on-line banking access... Now, for the integration: As PayPal will return to your site at the end of the transaction, it is a good idea to keep track of your visitor, through a login, a session, or an IP address. We will use the user's IP address in this sample, stored in $ip, but anything else will do! Here is your IP: 38.107.191.80 Whatever you sell, you must endup with just a "total to pay", which you will store in the variable $amount. You have all the info you need to process a payment! To this effect, you make a form that collects the payment value: (We set the $amount = 1 "unit", here, "Euro", but you can change it! Should you wish your client NOT to be able to change it, set the field to "disabled") You can proceed with the payment all the way through, but on this exercise, funds will be paid to MY account! :-)... until you change the PPBUSINESS define in the code! |