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:
The Payum extension to rapidly build new extensions.
- Create new project
$ composer create-project payum/skeleton- Rename the package to your own: the
Payum\Skeletonnamespace, theSkeletonprefix of the class names, andpayum/skeletonincomposer.json. LeavePayum\Coreas it is. The steps below use the names before renaming. - Add the PSP's credentials to
SkeletonConfigasreadonlyconstructor arguments, and validate them in its constructor. - 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()
;- 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().
Skeleton is released under the MIT License.