sevming/union-pay
Composer 安装命令:
composer require sevming/union-pay
包简介
Union pay
README 文档
README
Installing
$ composer require sevming/union-pay -vvv
Usage
<?php use Sevming\UnionPay\UnionPay;; $unionPay = new UnionPay([ 'log' => [ 'default' => 'prod', 'channels' => [ 'prod' => [ 'driver' => 'daily', 'path' => 'unionpay.log', 'level' => 'info', ], ], ], 'msg_src' => '', 'msg_src_id' => '', 'mid' => '', 'tid' => '', 'inst_mid' => '', 'key' => '', 'notify_url' => '', 'return_url' => '', ]); // 支付 $paymentUrl = $unionPay->web->wxpay([ 'merOrderId' => date('YmdHis'), 'totalAmount' => 1 ]); header('location:' . $paymentUrl); exit; // 异步通知 $result = $unionPay->web->verify(); // 响应银联 $unionPay->web->success();
Contributing
You can contribute in one of three ways:
- File bug reports using the issue tracker.
- Answer questions or fix bugs on the issue tracker.
- Contribute new features or update the wiki.
The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.
License
MIT
统计信息
- 总下载量: 56
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-04-21