The Payum extension to rapidly build new extensions.
$ composer create-project payum-tw/mypay
payum
with your vendor name. It may be your github name, for now let's say you choose: acme
.mypay
with a payment gateway name. For example Stripe, Paypal etc. For now let's say you choose: mypay
.<?php
use Payum\Core\PayumBuilder;
use Payum\Core\GatewayFactoryInterface;
$defaultConfig = [];
$payum = (new PayumBuilder)
->addGatewayFactory('mypay', function(array $config, GatewayFactoryInterface $coreGatewayFactory) {
return new \PayumTW\Allpay\AllpayGatewayFactory($config, $coreGatewayFactory);
})
->addGateway('mypay', [
'factory' => 'mypay',
'MerCode' => null,
'MerKey' => null,
'MerName' => null,
'Account' => null,
'sandbox' => true,
])
->getPayum()
;
Not implemented
exception:<?php
use Payum\Core\Request\Capture;
$mypay = $payum->getGateway('mypay');
$model = new \ArrayObject([
// ...
]);
$mypay->execute(new Capture($model));
Skeleton is released under the MIT License.