rajib / custompaytm
1.0.0
2021-08-30 17:41 UTC
README
这是一个简单的自定义php PAYTM网关集成。
# 安装 composer require rajib/custompaytm # 使用 require_once DIR . '/vendor/autoload.php'; use rajib\PayTM\PayTM;
创建即时
$config['environment']='local'; // for pruduction 'production'
$config['merchant_id']='your merchant id';
$config['merchant_key']='your merchant key';
$config['merchant_website']='merchant website';
$config['industry_type']='type';
$config['chanel']='chanel';
$paytm = new PayTM($config);
For sending payment request
$data=[
'order_id'=>'order_id', // Order id must be unique
'user_id'=>'user_id',
'amount'=>10.00,
'call_back_url'=>'' // where recieved response
]; $paytm->pay($data);
Recieved Responce In call back
$config['environment']='local'; // for pruduction 'production'
$config['merchant_id']='your merchant id';
$config['merchant_key']='your merchant key';
$config['merchant_website']='merchant website';
$config['industry_type']='type';
$config['chanel']='chanel';
$paytm = new PayTM($config);
$responce = $paytm->recived($_POST);