In This tutorial we are going to integrate the paytm gateway with website. As we know that Paytm is providing a wallet which is highly popular wallet system in India and it growing very fast, maximum People uses Paytm wallet on daily bases like to recharge their mobile phones, bills etc. Paytm is also entered in Banking sector. So, Paytm payment gateway can be a right choice for that. Paytm getaway is easy to integrate with website. And it is linked with many services which make the online transaction convenient users.
You can also check
Integration of Paytm Payment Gateway on the website is quite simple :
Table of Contents
Step1: Download Paytm Payment Gateway PHP Kit
First, We need to download the Paytm Payment Gateway PHP KIT. Then we have extract the files and past PaytmKit folder in document root of your server.
Step2: Request for paytm merchant key, paytm merchant mid and other Details
For paytm payment gateway integration we needs PAYTM_MERCHANT_KEY, PAYTM_MERCHANT_MID
PAYTM_MERCHANT_WEBSITE and other necessary details. so, we needs to request it from Paytm. So now we have to login paytm business account . Select to Payment Gateway for website/App.
For getting all the details from paytm we needs to completely fill these form.
After completing successfully, the Paytm will provide us PAYTM_MERCHANT_KEY, PAYTM_MERCHANT_MID, PAYTM_MERCHANT_WEBSITE.
Step3: Update Paytm Gateways Configuration
Now open config_paytm.php file from the PaytmKit/lib folder and update the below constant values:
Then we have to past the constant value key provided by the paytm
Steps4: Create Form with Required Field
Now we have to create a form with required fields(ORDER_ID, CUST_ID, INDISTRY_TYPE_ID,CHANNEL_ID and TXN_AMOUNT ) with values. As we have Paytmkit, so we just need to pass form action to pgRedirect.php.
<form method="post" action="pgRedirect.php"> <label>ORDER_ID:</label> <input id="ORDER_ID" tabindex="1" maxlength="20" size="20"name="ORDER_ID" autocomplete="off"value="<?php echo "ORDS" . rand(10000,99999999)?>"> <label>CUSTID :</label> <input id="CUST_ID" tabindex="2" maxlength="12" size="12" name="CUST_ID" autocomplete="off" value="CUST001"> <label>INDUSTRY_TYPE_ID :</label> <input id="INDUSTRY_TYPE_ID" tabindex="4" maxlength="12" size="12" name="INDUSTRY_TYPE_ID" autocomplete="off" value="Retail"> <label>Channel :</label> <input id="CHANNEL_ID" tabindex="4" maxlength="12" size="12" name="CHANNEL_ID" autocomplete="off" value="WEB"> <label>txnAmount:</label> <input title="TXN_AMOUNT" tabindex="10"type="text" name="TXN_AMOUNT"value="1"> <input value="CheckOut" type="submit" onclick=""> </form>
You can also go through the official Paytm Api documentation for more information. and to know more about how Paytm payment gateway working.
I hope this tutorial helped you to learn about Paytm Payment Gateway Integration using PHP. To get the latest news and updates follow us on twitter & facebook, subscribe to our YouTube channel. And If you have any query then please let us know by using comment
Gurjit Singh says
Thanks for sharing this useful and interesting article.
Abhishek Kumar says
It will be glad for me that you like the post.
Thanks
Thank you for sharing this information with us
Thank you Narendra modi
That you like the post.
keep visiting