justlease / payum-ems
EMS Pay gateway for Payum
0.2.4
2023-04-20 13:44 UTC
Requires
- php: ^7.1|^8.0
- payum/core: ^1.5
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.10
- php-http/guzzle6-adapter: ^1.1
README
This package provides integration with EMS Pay for Payum.
Installation
$ composer require justlease/payum-ems
Usage
If you're using Symfony, consider using justlease/payum-ems-bundle to configure the gateway.
Otherwise, see the example below on how to add the gateway.
<?php
use Payum\Core\GatewayFactoryInterface;
use Justlease\PayumEms\EmsOffsiteGatewayFactory;
/** @var \Payum\Core\PayumBuilder $payumBuilder */
$payumBuilder->addGatewayFactory('ems_offsite', function (array $config, GatewayFactoryInterface $gatewayFactory) {
return new EmsOffsiteGatewayFactory($config, $gatewayFactory);
});
$payumBuilder->addGateway('ems_offsite', [
'factory' => 'ems_offsite',
'store_name' => '123456789',
'shared_secret' => 'mysharedsecret',
'sandbox' => true,
'classic_mode' => \Justlease\PayumEms\Api::CLASSIC_MODE_PAYONLY,
'payment_method' => \Justlease\PayumEms\Api::PAYMENT_METHOD_IDEAL,
]);