payum-tw / esunbank
The Payum extension. 玉山銀行金流
Installs: 280
Dependents: 0
Suggesters: 1
Security: 0
Stars: 7
Watchers: 5
Forks: 9
Open Issues: 1
Type:project
Requires
- mobiledetect/mobiledetectlib: ^2.8
- payum/core: ^1.3.6
Requires (Dev)
- mockery/mockery: ~0.9.4|~1.0
- nesbot/carbon: ~1.20
- php-http/guzzle6-adapter: ^1.0
- phpunit/phpunit: ~4.8|~5.4|~6.1|~7.0
README
The Payum extension to rapidly build new extensions.
- Create new project
$ composer create-project payum-tw/esunbank
- Replace all occurrences of
payum
with your vendor name. It may be your github name, for now let's say you choose:esunbank
. - Replace all occurrences of
esunbank
with a payment gateway name. For example Stripe, Paypal etc. For now let's say you choose:esunbank
. - Register a gateway factory to the payum's builder and create a gateway:
<?php use Payum\Core\PayumBuilder; use Payum\Core\GatewayFactoryInterface; $defaultConfig = []; $payum = (new PayumBuilder) ->addGatewayFactory('esunbank', function(array $config, GatewayFactoryInterface $coreGatewayFactory) { return new \PayumTW\Esunbank\EsunbankGatewayFactory($config, $coreGatewayFactory); }) ->addGateway('esunbank', [ 'factory' => 'esunbank', // 特店代碼 'MID' => '', // MAC KEY 'M' => '', 'sandbox' => true, ]) ->getPayum();
- While using the gateway implement all method where you get
Not implemented
exception:
<?php use Payum\Core\Request\Capture; $esunbank = $payum->getGateway('esunbank'); $model = new \ArrayObject([ // ... ]); $esunbank->execute(new Capture($model));
Resources
License
Skeleton is released under the MIT License.