unisharp / payment
更多台湾支付方式
dev-master / 1.0.x-dev
2018-08-08 10:30 UTC
Requires
- php: ^7.0
- voicetube/taiwan-payment-gateway: dev-master
Requires (Dev)
- codedungeon/phpunit-result-printer: ^0.6.0
- mockery/mockery: ^0.9.4
- phpunit/phpunit: ^7.0
- sebastian/diff: ^3.0.0
This package is not auto-updated.
Last update: 2024-09-09 15:54:19 UTC
README
提供国泰世华、台湾支付及更多支付方式
安装
composer require unisharp/payment dev-master
可用网关
使用方法
初始化网关
$cathay = UniSharp\Payment\Gateways\CathayGateway::create([ 'hashKey' => 'c7fe1bfba42369ec1add502c9917e14d', 'hashIV' => '', 'merchantId' => '123456789', 'version' => '', 'actionUrl' => 'https://sslpayment.uwccb.com.tw/EPOSService/Payment/OrderInitial.aspx', 'returnUrl' => 'https://localhost/payment/confirm', 'notifyUrl' => 'https://localhost/payment/notify', 'clientBackUrl' => 'https://localhost/payment/return', 'paymentInfoUrl'=> 'https://localhost/payment/information', ]);
生成表单
$cathay->newOrder( $order->sn, $order->total_price, $order->name, $order->note ); return $cathay->genForm(true);
处理订单结果/信息
$cathay = UniSharp\Payment\Responses\CathayResponse::create([ 'hashKey' => 'c7fe1bfba42369ec1add502c9917e14d', 'hashIV' => '' ]);
检查支付响应
// Check resonse content $result = $cathay->processOrder('xml'); // Check response success $cathay->rspOk();
更多详情请见 (voicetube/taiwan-payment-gateway)[https://github.com/voicetube/Taiwan-Payment-Gateway]