antqa/payum-perfectmoney

The Payum extension. It provides Perfectmoney payment integration.

1.0.1 2016-03-13 01:55 UTC

This package is auto-updated.

Last update: 2024-10-28 04:31:21 UTC


README

Build Status Total Downloads Latest Stable Version

The Payum extension. It provides Perfect Money payment integration.

Installation

$ composer require antqa/payum-perfectmoney

Configuration

<?php

use Payum\Core\PayumBuilder;
use Payum\Core\Payum;

$payum = (new PayumBuilder)
    ->addGatewayFactory('perfectmoney', function(array $config, GatewayFactoryInterface $coreGatewayFactory) {
        return new \Antqa\Payum\Perfectmoney\PerfectMoneyGatewayFactory($config, $coreGatewayFactory)
    })
    ->addGateway('perfectmoney', [
        'factory' => 'perfectmoney',
        'sandbox' => true,
        'alternate_passphrase' => 'place here',
        'payee_account' => 'place here',
        'display_name' => 'place here',
    ])
    ->getPayum()
;

Payment

Additional parameters

use Payum\Core\Model\PaymentInterface;
use Antqa\Payum\Perfectmoney\Api;

/** @var PaymentInterface $payment */
$payment->setDetails([
    Api::FIELD_SUGGESTED_MEMO => sprintf('Payment - %s', $product),
    Api::FIELD_PAYMENT_URL_METHOD = 'POST',
    Api::FIELD_NOPAYMENT_URL_METHOD = 'POST',
]);

Symfony integration

#services.yml

app.payum.perfectmoney.factory_builder:
    class: Payum\Core\Bridge\Symfony\Builder\GatewayFactoryBuilder
    arguments:
        - Antqa\Payum\Perfectmoney\PerfectMoneyGatewayFactory
    tags:
        - { name: payum.gateway_factory_builder, factory: perfectmoney }

Configuration

#config.yml

payum:
    gateways_v2:
        perfectmoney:
            factory: perfectmoney
            payee_account: %perfectmoney_account%
            alternate_passphrase: %perfectmoney_alternate_passphrase%
            sandbox: %payment_sandbox%
            display_name: place_here

License

Payum Perfect Money is released under the MIT License.