corneltek / esunacq
EsunBank ACQ Payment API
1.0.0
2016-05-11 03:43 UTC
Requires
- php: >=5.4.0
- corneltek/curlkit: ^1.0
This package is auto-updated.
Last update: 2024-11-29 05:26:28 UTC
README
This payment library isn't tight coupled to the frameworks, models or db connections, you can use this library to build up the forms or verify the response separately.
Installation
composer require corneltek/esunacq
Usage
For the config variables, please check your documentation from Esunbank.
AuthRequestBuilder
use EsunBank\ACQ\AuthRequestBuilder; use EsunBank\ACQ\TxnType; $builder = new AuthRequestBuilder('MAC KEY', [ 'MID' => '...', 'CID' => '...', 'U' => '/path/to/response', ]); $formFields = $builder->formFields('ORDER' . time(), 200, TxnType::INSTALLMENT, $ic = '...', $bpf = '...');
AuthResponseVerifier
use EsunBank\ACQ\AuthResponseVerifier; $verifier = new AuthResponseVerifier('MAC KEY', [ 'MID' => '...', ]); $this->assertTrue($verifier->verify($_REQUEST));
See examples
for more details.