Skip to main content

How To Integrate Paytm Payment Gateway In PHP With Demo & Download

Paytm Payment Gateway is the perfect choice for accepting payment online. It is safe, secure and easy to integrate into website and mobile application. Nowadays Paytm wallet to wallet is a very famous way to transfer money, and many businesses use it. Paytm also charges a very low transaction fee on the total transaction amount, so it is also one of the major benefits of Paytm payment gateway.

Benefits of using Paytm payment gateway

1) Easy To integrate with any programming language
2) Payment Gateway kit available in multiple languages
3) Secure and safe transactions
4) Low Transaction fee
5) Dedicated 24*7 customer support

See Also :
How To Integrate Payu Money Payment Gateway Using PHP

CCavenue Payment Gateway Integration Using PHP

So now we start coding parts so follow the below steps for integrating the Paytm payment gateway

  • First you have to go the Paytm Merchant site for registering the merchant account and get the details like merchant key , merchant mid etc

  • Go to this link and download the latest Paytm payment gateway kit.
  • Open config_paytm.php(it is the configuration file of Paytm payment gateway ) file from the PaytmKit/lib folder and update the below constant values,
  • define('PAYTM_ENVIRONMENT', 'TEST') – We have intially setup the enviorment mode TEST for testing ,if everything is working fine then we change the Envoirment and set the value PROD
  • define('PAYTM_MERCHANT_KEY', 'xxxxxxxxxxxxxxxxxxxxxxxx') – Set the your own merchant key that you have recieved from paytm
  • define('PAYTM_MERCHANT_MID', 'xxxxxxxxxxxxxxxxxxxxxxx') – Set the your own merchant MID that you have recieved from paytm
  • define('PAYTM_MERCHANT_WEBSITE', 'xxxxxxx') – Change this constant’s value with Website name received from Paytm

TxnTest.php (Payment Form For Input The Data)

Create an HTML form with all the required fields. In form action we call pgredirect.php, it will handle all the details like checksum and other details

I hope this tutorial helpful for you, if you have any issue with integration, please comment below ,also please share this post in social media.


Recomended Tutorial

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.