pixers/payum-paymill

Paymill gateway for Payum

v2.0 2016-12-06 10:48 UTC

This package is auto-updated.

Last update: 2024-10-23 02:36:01 UTC


README

Build Status

The Payum extension for Paymill.

Instalation

The preferred way to install the library is using composer.

Run:

php composer.phar require "pixers/payum-paymill"

Symfony Integration (payum-bundle < 2.0)

Add PaymillGatewayFactory to payum:

<?php
// src/Acme/PaymentBundle/AcmePaymentBundle.php

namespace Acme\PaymentBundle;

use Payum\Paymill\Bridge\Symfony\PaymillGatewayFactory;
use Symfony\Component\HttpKernel\Bundle\Bundle;
use Symfony\Component\DependencyInjection\ContainerBuilder;

class AcmePaymentBundle extends Bundle
{
    public function build(ContainerBuilder $container)
    {
        parent::build($container);

        $extension = $container->getExtension('payum');
        $extension->addPaymentFactory(new PaymillGatewayFactory());
    }
}

Configuration in config.yml:

payum:
    gateways:
        ...
        paymill_gateway:
            paymill:
                sandbox: true
                api_private_key: LIVE_PRIVATE_KEY
                api_public_key: LIVE_PUBLIC_KEY
                test_private_key: TEST_PRIVATE_KEY
                test_public_key: TEST_PUBLIC_KEY
        ...

Symfony Integration (payum-bundle >= 2.0)

Add PaymillGatewayFactory to payum in services.yml:

    paymill_gateway:
        class: Payum\Core\Bridge\Symfony\Builder\GatewayFactoryBuilder
        arguments: [Payum\Paymill\PaymillGatewayFactory]
        tags:
            - { name: payum.gateway_factory_builder, factory: paymill_gateway }

Configuration in config.yml:

payum:
    gateways:
        paymill_gateway:
            factory: paymill
            sandbox: true
            api_private_key: LIVE_PRIVATE_KEY
            api_public_key: LIVE_PUBLIC_KEY
            test_private_key: TEST_PRIVATE_KEY
            test_public_key: TEST_PUBLIC_KEY

Resources

License

Copyright 2016 PIXERS Ltd - www.pixersize.com

Licensed under the BSD 3-Clause