group-icon
PHP Programming
Group for all things PHP, Coding Help, Problems and Solutions
108 Members
Join this group to post and comment.
DHIRAJ LOTLIKAR
DHIRAJ LOTLIKAR
Information Technology
27 Jan 2019

How to integrate paypal with our website using PHP?

Paypal is a payment processing system and with the help of php we can integrate paypal with our website. Paypal integration file system included 4 configuration files as shown below,

1) constants.php: This file has included API username , password and signature.

2) CallerService.php : This files includes paypal services and services which are used to call paypal services.

3) confirmation.php : This consist of a form with minimum fields required to make payment process and it will return success or failure in payment process.

4) Paypal_entry.php : It tranfers data from user to paypal. It acts as an adapter between paypal and user.

The user have to download a Paypal SDK file  and extract a zip file. The zip file contains four php file we don't have to make any changes except the constant.php.

The constant.php file contains the following code as shown

 define('API_USERNAME', 'YOUR USER NAME HERE');   

define('API_PASSWORD', 'YOUR PASSWORD HERE');   

define('API_SIGNATURE', 'YOUR 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'); 

?>

The user have to declare its username, password and signature in the above code provided which are placed in constant,php.