How to Integrate Paytm Payment Gateway in PHP

In this article we have explained about How to Integrate Paytm Payment Gateway in PHP.  Paytm payment gateway is a easy to integrate with PHP. In many peoples are using Paytm in India. Paytm is a famous for online transaction in India.

See our demo video on Youtube:


Step 1:

First create a merchant account in Paytm

Step 2:

Get your sandbox and live credentials.

how-to-integrate-paytm-payment-gateway-in-php

Step 3:

Download Paytm payment gateway kit for integration. Click here to download paytm script php

paytm-payment-gateway-kit

Step 4:

Update your sandbox keys in lib/config_paytm.php

Paytm for website use WEB_STAGING 

Paytm for Mobile App use APP_STAGING

Enable below codes in config_paytm.php

Step 5:

Set callback url in pgRedirect.php

Step 6:

Basic form available in TxnTest.php. Here we can send amount and other custom parameters to Paytm payment process.

paytm-form-in-html

Step 7:

Checkout the form.

paytm-checkout

Step 8:

Paytm Test Credentials

For Credit card/Debit card Credentials

  • Card Number -: Any valid VISA or MASTER card number
  • Expiry Date-: Any future date from transaction date
  • CVV-: Any three digit number
  • OTP-: 123123 (To test successful transaction)

For Wallet Credentials:

  • Mobile Number – 7777777777
  • Password – Paytm12345
  • OTP – 489871
  • After every 5 minutes, the Wallet balance is topped up to Rs. 7,000

Step 9:

In response page you will receive Paytm Txn ID then you can that transaction status in TxnStatus.php

Thanks for reading this article. If you have any queries and please comment in the below.

Comments

comments

phpexpertise

I’m Blogger and Programming Blog, Tutorials, PHP, MySQL, jQuery, Laravel, Wordpress and Codeigniter