If you want to include the PayPal feature to your website then you can use PHP to integrate PayPal. For this, you have to include some files that will allow you to integrate the PayPal feature which may include 4 files.
- constants.php– this file contains the API user details like user name, password, proxy port version, and the signature.
- CallerService.php– all the PayPal services are included in this file which allows you to use and access the PayPal services.
- Confirmation.php- this file will provide you with the details of the minimum required fields for making the payment which will return the success or failure status of your payment.
- PayPal_entry.php– this page will allow you to send the user details to PayPal which acts as an adapter.
To continue with the process you have to download the SDK file for PayPal and extract the files. You will have 4 files on extracting but you have to change the content of the constants, PHP file. The script of constants.php will be given as below-
<?php define('API_USERNAME', 'ENTER USER NAME HERE'); define('API_PASSWORD', ENTER PASSWORD HERE'); define('API_SIGNATURE', ENTER API SIGNATURE HERE'); define('API_ENDPOINT', 'https://api-3t.paypal.com/nvp'); define('USE_PROXY',FALSE); define('PROXY_HOST', '127.0.0.1'); define('PROXY_PORT', '808'); define('PAYPAL_URL', 'https://www.PayPal.com/webscr&cmd=_express-checkout&token='); define('VERSION', '53.0'); ?>
You have to make changes for the name, password, and the API signature and now you have successfully integrated the PayPal into your webpage.
People are also reading: