dpsoft/zibal
Composer 安装命令:
composer require dpsoft/zibal
包简介
Zibal online payment - درگاه پرداخت آسان پرداخت به زبان PHP
README 文档
README
Installation
You can install the package via composer:
composer require dpsoft/zibal
Usage
copy sample directory to server. Open request.php in browser and bala balah ...
Request
try { $zibal = new \Dpsoft\Zibal\Zibal($merchant); $result = $zibal->request($callbackUrl,$amount); //save amount and invoice id to forther use $_SESSION['amount']=$amount; $_SESSION['token']=$result['token']; $zibal->redirectToBank(); exit(); }catch (Throwable $exception){ echo $exception->getMessage(); }
Response
try { $zibal = new \Dpsoft\Zibal\Zibal($merchant); $result = $zibal->verify($_SESSION['amount'],$_SESSION['token']); //save result. The keys are: card_number,transaction_id and token for example $result['token'] echo "Successfull transaction."; }catch (Throwable $exception){ echo "Error in transaction: "; }
Testing
composer test
Security
If you discover any security related issues, please email info@dpsoft.ir instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 1.47k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 4
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-07-07