Development & Design

How to Integrate Paypal Payment System in PHP & MySQL

I received a tutorial requests from my reader that asked to me how to implement payment gateway system with Paypal API. In this tutorial I want to explain how to work with Paypal Sandbox test accounts for payment system development and sending arguments while click buy now button. It’s simple and very easy to integrate in your web projects.

PayPalPaymennt

Step 1

Create a Paypal Sandbox account at https://developer.paypal.com/

 

Step 2

Now create test accounts for payment system. Take a look at Sandbox menu left-side topSandbox->Test Accounts

PayPal1

Step 3

Here I have created two accounts Buyer (personal) and Seller (merchant/business)

PayPal2

index.php

Contains PHP code. Displaying products, product image, product name and product price. Here you have to give your business(seller) $paypal_id id. Modify paypal button form returnand cancel_return URLs.

success.php

Paypal payment success return file. Getting Paypal argument like item_number. Paypal datasuccess.php?tx=83437E384950D&st=Completed&amt=10.00&cc=USD&cm=&item_number=1

cancel.php

Paypal API cancel_return file.

 Step 4

When your web application test payment system workflow is completed. Change the form action development API URLs to original API URLs and give valid $paypal_id seller email id.

Previous ArticleNext Article
Send this to a friend