div-looper/payum-cashnpay

Payum 扩展,增加了对 CASH'nPAY 支付网关的支持。

v1.0.0 2016-01-04 03:54 UTC

This package is not auto-updated.

Last update: 2024-09-14 18:25:54 UTC


README

为 Payum 添加对 CASH'nPAY 支付网关支持的扩展。

安装

composer require div-looper/payum-cashnpay

ACMEPaymentBundle.php

namespace ACME\Bundle\PaymentBundle;

use DivLooper\Payum\CashnPay\Bridge\Symfony\CashnPayGatewayFactory;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;

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

        /** @var $extension \Payum\Bundle\PayumBundle\DependencyInjection\PayumExtension */
        $extension = $container->getExtension('payum');
        $extension->addGatewayFactory(new CashnPayGatewayFactory());
    }
}

config.yml

gateways:
    ...
    fawry:
        cashnpay:
            product_id: "00000000"
            secret_key: "0x0xX0x0"
            sandbox: true
    ...

许可证

Payum-CASHnPAY 在 MIT 许可证下发布。