tink/omnipay-paytm
Composer 安装命令:
composer require tink/omnipay-paytm
包简介
paytm driver for the Omnipay PHP payment processing library
README 文档
README
Paytm driver for the Omnipay PHP payment processing library
Omnipay is a framework agnostic, multi-gateway payment processing library for PHP 5.3+. This package implements Paytm support for Omnipay.
Usage
Begin Transaction
$gateway = Omnipay::create('Paytm_Express'); $gateway->setMid('TRANSS******'); $gateway->setKey('6u*****'); $gateway->setIndustryTypeId('Retail'); $gateway->setChannelId('WEB'); $gateway->setWebSite('WEB_STAGING'); $gateway->setEnvironment('staging'); $params = [ 'orderId' => 'ORDS83028539', 'CustID' => 'CUST001', 'amount' => 1 ]; $response = $gateway->purchase($params)->send(); $response->redirect();
Transaction Notify
$gateway = Omnipay::create('Paytm_Express'); $gateway->setMid('TRANSS********'); $gateway->setKey('6u*******'); $response = $gateway->completePurchase(['request_params' => $_REQUEST])->send(); if ($response->isPaid()) { // 成功 ... } elseif ($response->isFailure()) { // 失败 ... } else { // 进行中 ... }
Order Query
$gateway = Omnipay::create('Paytm_Express'); $gateway->setMID('TRANSS********'); $response = $gateway->queryOrder(['orderId' => 'xxx'])->send(); if ($response->isPaid()) { ... } elseif ($response->isFailure()) { ... } else { ... }
统计信息
- 总下载量: 88
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-04-23