Skip to content
PayumPublic

About

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

Resources

Stars

9 stars

Watchers

3 watching

Forks

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. Rename the package to your own: the Payum\Skeleton namespace, the Skeleton prefix of the class names, and payum/skeleton in composer.json. Leave Payum\Core as it is. The steps below use the names before renaming.
  2. Add the PSP's credentials to SkeletonConfig as readonly constructor arguments, and validate them in its constructor.
  3. Register the gateway with its config:
<?php

use Payum\Core\PayumBuilder;
use Payum\Skeleton\SkeletonConfig;

$payum = (new PayumBuilder())
    ->addDefaultStorages()
    ->registerGateway('skeleton', new SkeletonConfig(sandbox: true))
    ->getPayum()
;
  1. Implement every handler method that throws Payum\Core\Exception\NotImplementedException. A handler takes the API through its constructor, and Payum autowires it:
public function __construct(
    private readonly SkeletonApi $api,
) {
}

Remove the handlers for operations your PSP does not support from SkeletonGateway::handlers().

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