dpsoft/mellat
Composer 安装命令:
composer require dpsoft/mellat
包简介
Mellat bank online payment - درگاه پرداخت بانک ملت به زبان PHP
README 文档
README
Mellat bank transaction library based on php soap extension.
Installation
You can install the package via composer:
composer require dpsoft/mellat
Usage
1- Request transaction and redirect to bank:
try{ $mellat = new \Dpsoft\Mellat\Mellat($terminalId, $userName, $userPassword); $response = $mellat->request($amount); //save $response info like token($response['token']) and orderId($response['order_id']) then redirect to bank echo "redirecting to bank..."; $response->redirectToBank(); }catch(\Throwable $e){ echo "error: ".$e->getMessage(); }
2- Handle bank response:
try{ $mellat = new \Dpsoft\Mellat\Mellat($terminalId, $userName, $userPassword); $response = $mellat->verify(); //successful payment. save $response info like reference id($response['reference_id']) echo "successful payment.Thanks..."; }catch(\Throwable $e){ echo "error: ".$e->getMessage(); }
Testing
composer test
Security
If you discover any security related issues, please email sadeghpm@gmail.com instead of using the issue tracker.
Credits
License
The GNU GPLv3. Please see License File for more information.
统计信息
- 总下载量: 1.48k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2019-12-03