unisharp/payment

more payment for taiwan pay

Package info

github.com/UniSharp/unisharp-payment

pkg:composer/unisharp/payment

Statistics

Installs: 1 545

Dependents: 1

Suggesters: 0

Stars: 3

Open Issues: 0

dev-master / 1.0.x-dev 2018-08-08 10:30 UTC

Requires

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 7f064b6c869001ebd2e98de1e4b4700b42a1fe6c

  • UniSharp <opensource.woop@unisharp.com>

UniSharp

This package is not auto-updated.

Last update: 2026-06-16 00:26:08 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]