Skip to content

The Payum extension. 玉山銀行金流

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

recca0120/payum-esunbank

Repository files navigation

Esunbank

StyleCI Build Status Total Downloads Latest Stable Version Latest Unstable Version License Monthly Downloads Daily Downloads Scrutinizer Code Quality Code Coverage

The Payum extension to rapidly build new extensions.

  1. Create new project
$ composer create-project payum-tw/esunbank
  1. Replace all occurrences of payum with your vendor name. It may be your github name, for now let's say you choose: esunbank.
  2. Replace all occurrences of esunbank with a payment gateway name. For example Stripe, Paypal etc. For now let's say you choose: esunbank.
  3. 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();
  1. 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.

About

The Payum extension. 玉山銀行金流

Topics

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Packages

No packages published

Languages