prochito / payum-siampay
The Payum extension for SiamPay
Installs: 49
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:project
Requires
- payum/core: ~1.0@dev
- php-http/client-common: ^1.2
- php-http/guzzle6-adapter: ^1.0
- php-http/message-factory: ^1.0
- phpunit/phpunit: 5.5.*
This package is not auto-updated.
Last update: 2025-01-16 05:13:10 UTC
README
The Payum extension to rapidly build new extensions.
- Create new project
$ composer create-project payum/skeleton
- Replace all occurrences of
payum
with your vendor name. It may be your github name, for now let's say you choose:acme
. - Replace all occurrences of
skeleton
with a payment gateway name. For example Stripe, Paypal etc. For now let's say you choose:paypal
. - 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('paypal', function(array $config, GatewayFactoryInterface $coreGatewayFactory) { return new \Acme\Paypal\PaypalGatewayFactory($config, $coreGatewayFactory); }) ->addGateway('paypal', [ 'factory' => 'paypal', 'sandbox' => true, ]) ->getPayum() ;
- While using the gateway implement all method where you get
Not implemented
exception:
<?php use Payum\Core\Request\Capture; $paypal = $payum->getGateway('paypal'); $model = new \ArrayObject([ // ... ]); $paypal->execute(new Capture($model));
Resources
License
Skeleton is released under the MIT License.