justlease/payum-ems

EMS Pay gateway for Payum

0.2.4 2023-04-20 13:44 UTC

This package is auto-updated.

Last update: 2024-10-20 16:59:32 UTC


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,
]);