1. Go to this page and download the library: Download brainlabsweb/laravel-paytm library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
brainlabsweb / laravel-paytm example snippets
sh
php artisan vendor:publish --provider="Brainlabsweb\Paytm\PaytmServiceProvider"
\Brainlabsweb\Paytm\Paytm::verify(); // returns true/false
OR
paytm()->verify();
\Brainlabsweb\Paytm\Paytm::response(); // returns paytm response array
OR
paytm()->response();
Make POST REQUEST with param $order_id
\Brainlabsweb\Paytm\Paytm::getTransactionStatus($order_id); // returns paytm response array
OR
paytm()->getTransactionStatus($order_id);
$data = [
'ORDERID' => 'order_id',
'REFID' => 'ref1', // should be unique everytime
'TXNID' => 'TXNID' // will get as response when made a transaction
'REFUNDAMOUNT' => '1',
'COMMENT' => 'SOME TEXT' // THIS IS OPTIONAL PARAMTER
];
\Brainlabsweb\Paytm\Paytm::refund($data); // returns paytm response array
OR
paytm()->refund($data);
$data = [
'ORDERID' => 'order_id',
'REFID' => 'ref1', // This is REFID for which refund status is being inquired
];
\Brainlabsweb\Paytm\Paytm::refundStatus($data); // returns paytm response array
OR
paytm()->refundStatus($data);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.