sirumobile / payum-siru
Payum extension for Siru Mobile payment gateway
0.1.0
2022-11-16 09:08 UTC
Requires
- php: >=8.0
- ext-json: *
- payum/core: ^1.5
- psr/log: ^2.0|^3.0
- sirumobile/siru-php-sdk: ^1.0
Requires (Dev)
- php-http/guzzle6-adapter: ^1.0
- phpstan/phpstan: ^1.8
- phpstan/phpstan-phpunit: ^1.1
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2025-03-16 14:40:08 UTC
README
This library allows the use of Siru Mobile payments with Payum.
Requirements
- PHP 8.0+
- API credentials from Siru Mobile
Installation
composer require sirumobile/payum-siru
Configuration
You need your API credentials and integration details from Siru Mobile. See EXAMPLE for more complete example of the payment flow.
<?php use Payum\Core\GatewayFactoryInterface; use Siru\PayumSiru\PayumSiruGatewayFactory; use Payum\Core\PayumBuilder; use Payum\Core\Payum; /** @var Payum $payum */ $payum = (new PayumBuilder()) ->addDefaultStorages() ->addGatewayFactory('siru_checkout', function(array $config, GatewayFactoryInterface $coreGatewayFactory) { return new PayumSiruGatewayFactory($config, $coreGatewayFactory); }) ->addGateway('siru_checkout', [ 'factory' => 'siru_checkout', # These are only example values. Replace these with values you received from Siru Mobile 'merchant_id' => 123, 'merchant_secret' => 'yoursecret', 'variant' => 'variant2', 'purchase_country' => 'FI', 'service_group' => 2, 'tax_class' => 3, ]) ->getPayum() ;