unisharp / payment
more payment for taiwan pay
Installs: 1 544
Dependents: 1
Suggesters: 0
Security: 0
Stars: 3
Watchers: 11
Forks: 0
Open Issues: 0
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-11-18 17:02:04 UTC
README
Provide Cathay, TaiwanPay and more ways to pay
Installation
composer require unisharp/payment dev-master
Available Gateway
Usages
Initial the gateway
$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', ]);
Generate post form
$cathay->newOrder( $order->sn, $order->total_price, $order->name, $order->note ); return $cathay->genForm(true);
Process order result/information
$cathay = UniSharp\Payment\Responses\CathayResponse::create([ 'hashKey' => 'c7fe1bfba42369ec1add502c9917e14d', 'hashIV' => '' ]);
Check the payment response
// Check resonse content $result = $cathay->processOrder('xml'); // Check response success $cathay->rspOk();
More details on (voicetube/taiwan-payment-gateway)[https://github.com/voicetube/Taiwan-Payment-Gateway]