Paytm is very popular payment gateway in india for mobile payment and as well as for website online payment. paytm is very simple and flat pricing for all business, like you will sold a goods in 100(INR) then you will receive amount around 97.66(INR). Paytm is the safest and secured payment gateways in India for online transaction.
Paytm payment charges on amount is very nominal. Paytm supports friction-less payment flow ensures lowest user drop and highest transaction success rates in Industry.Settlement of all your transaction funds automatically to your bank account on T+1 day. Paytm support INR currency only.
You can check other recommended tutorial of Payment Gateway,
- How to Integrate Authorize.net Payment Gateway in PHP
- Paypal Payment Gateway Integration with PHP
- Paytm Payment Gateway Integration Using PHP
- CCAvenue Payment Gateway Integration Using PHP
- EBS Payment Gateway Integration Using PHP
How to use Paytm with PHP
This tutorial help to integrate Paytm Payment Gateway with PHP. I will follow following steps to add paytm gateway.We will create a folder into xampp 'd:/xampp/htdocs/paytm_gateway'
, this is our main project folder that will keep all files and libs.
Step 1: We will download Paytm Payment Gateway PHP Library.We will extract and save into 'd:/xampp/htdocs/paytm_gateway'
folder.
Step 2: We will open config_paytm.php
file, the location is 'd:/xampp/htdocs/paytm_gateway/Paytm_Web_Sample_Kit_PHP-master\PaytmKit\lib\'
.We will change account configuration values.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
define('PAYTM_ENVIRONMENT', 'TEST'); // PROD define('PAYTM_MERCHANT_KEY', 'xxxxxxxxxxxxxxxxxxxxxxxx'); //Change this constant's value with Merchant key downloaded from portal define('PAYTM_MERCHANT_MID', 'xxxxxxxxxxxxxxxxxxxxxxx'); //Change this constant's value with MID (Merchant ID) received from Paytm define('PAYTM_MERCHANT_WEBSITE', 'xxxxxxx'); //Change this constant's value with Website name received from Paytm <pre> <strong>Step 3:</strong> We will create bootstrap from to input amount which will pay using paytm payment gateway, There are some required filed we need to send with amount like <em>cust_id</em>, <em>order_id</em>, <em>payment_type</em> etc. <pre> <form class="form-inline" method="post" action="pgRedirect.php"> <input id="ORDER_ID" tabindex="1" maxlength="20" size="20" name="ORDER_ID" type="hidden" autocomplete="off" value="<?php echo "ORDS" . rand(10000,99999999)?>"> <input id="CUST_ID" tabindex="2" maxlength="12" size="12" name="CUST_ID" type="hidden" autocomplete="off" value="CUST001"> <input id="INDUSTRY_TYPE_ID" tabindex="4" maxlength="12" size="12" type="hidden" name="INDUSTRY_TYPE_ID" autocomplete="off" value="Retail"> <input id="CHANNEL_ID" tabindex="4" maxlength="12" size="12" type="hidden" name="CHANNEL_ID" autocomplete="off" value="WEB"> <div class="form-group"> <label for="exampleInputName2">Amount : </label> <div class="input-group"> <span class="input-group-addon">$</span> <input type="text" class="form-control" aria-label="Amount (to the nearest ruppes)" name="TXN_AMOUNT" id="TXN_AMOUNT"> </div> </div> <button type="submit" id="name="TXN_AMOUNT"" name="TXN_AMOUNT" class="btn btn-primary"><i class="fa fa-paypal">Pay using Paytm</button> </form> |
I hope its help you, feel free to ask questions using comment section.