Skip to content

Repository files navigation

Supporting Payum

Payum is an MIT-licensed open source project with its ongoing development made possible entirely by the support of community and our customers. If you'd like to join them, please consider:


Skeleton

The Payum extension to rapidly build new extensions.

  1. Create new project
$ composer create-project payum/skeleton
  1. Replace all occurrences of payum with your vendor name. It may be your github name, for now let's say you choose: acme.
  2. Replace all occurrences of skeleton with a payment gateway name. For example Stripe, Paypal etc. For now let's say you choose: paypal.
  3. Register a gateway factory to the payum's builder and create a gateway:
<?phpusePayum\Core\PayumBuilder;
usePayum\Core\GatewayFactoryInterface;
$defaultConfig = [];
$payum = (newPayumBuilder)
->addGatewayFactory('paypal', function(array$config, GatewayFactoryInterface$coreGatewayFactory) {
returnnew \Acme\Paypal\PaypalGatewayFactory($config, $coreGatewayFactory);
})
->addGateway('paypal', [
'factory' => 'paypal',
'sandbox' => true,
])
->getPayum()
;
  1. While using the gateway implement all method where you get Not implemented exception:
<?phpusePayum\Core\Request\Capture;
$paypal = $payum->getGateway('paypal');
$model = new \ArrayObject([
// ...
]);
$paypal->execute(newCapture($model));

Resources

License

Skeleton is released under the MIT License.

About

This extension Easier new extension development. Use it as base for your new gateway extension.

Resources

Stars

9 stars

Watchers

3 watching

Forks

Releases

Used by

Contributors

Languages