Now a days PayPal is weirdly used and popular payment processing platform to process credit cards. It is very easy to integrate PayPal payment pro API to your php shopping cart. It requires API Username, API password and API signature which you can get from PayPal site.
Files Included in this project.
You need to change the file with your API username, password and signature which you get from PayPal. You can also set URL for sandbox mode and regular payment. Please change the following.
define('API_USERNAME', 'YOUR USER NAME HERE'); define('API_PASSWORD', 'YOUR PASSWORD HERE'); define('API_SIGNATURE', 'YOUR API SIGNATURE HERE');
Please change the following for sandbox mode and regular mode.
Regular payment: define('API_ENDPOINT', 'https://api-3t.paypal.com/nvp'); define('PAYPAL_URL', 'https://www.paypal.com/webscr&amp;amp;cmd=_express-checkout&amp;amp;token='); Sandbox mode: define('API_ENDPOINT', 'https://api-3t.sandbox.paypal.com/nvp'); define('PAYPAL_URL', 'https://www.sandbox.paypal.com/webscr &amp;amp;cmd=_express-checkout&amp;amp;token=');
No need to change anything in this file.
This is the sample file that contains a form with minimum fields required to process a payment. On payment success or failure PayPal will return success/ failure message to this page.
This page process user data to PayPal.