PHP code example of pixers / payum-dotpay

1. Go to this page and download the library: Download pixers/payum-dotpay library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

pixers / payum-dotpay example snippets




namespace Acme\PaymentBundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Payum\Bundle\PayumBundle\DependencyInjection\Compiler\BuildRegistryPass;
use Payum\Bundle\PayumBundle\DependencyInjection\Compiler\BuildGatewayFactoryPass;
use Pixers\Payum\Dotpay\DependencyInjection\Factory\Gateway\DotpayGatewayFactory;

class AcmePaymentBundle extends Bundle
{

    /**
     * Add Dotpay Gateway to PaymentBundle
     *
     * @param ContainerBuilder $container
     */
    public function build(ContainerBuilder $container)
    {
        /** @var $extension PayumExtension */
        $extension = $container->getExtension('payum');

        $extension->addGatewayFactory(new DotpayGatewayFactory());

        $container->addCompilerPass(new BuildRegistryPass());
        $container->addCompilerPass(new BuildGatewayFactoryPass());
    }

}

payum:
    gateways:
        dotpay_checkout:
            dotpay:
                id: company_id_from_dotpay_panel
                method: 'POST'|'GET'                // (optional) default=GET
                URLC: '//some_url',                 // (optional)
                url: '//some_url',                  // (optional)
                endpoint: 'https://ssl.dotpay.pl/', //(optional)
                type: 0|1|2|3,                      // (optional) default=3 
                PIN: hjkert543dgt67yh,              // for URLC callbacks (must be set before in dotpay panel) (optional)
                ip: 195.150.9.37                    // this dotpay ip calls to URLC (optional)

    dotpay_checkout:
        class: Payum\Core\Bridge\Symfony\Builder\GatewayFactoryBuilder
        arguments: [Pixers\Payum\Dotpay\DotpayGatewayFactory]
        tags:
            - { name: payum.gateway_factory_builder, factory: dotpay }

payum:
    gateways:
        dotpay_checkout:
            factory: dotpay
            id: company_id_from_dotpay_panel
            method: 'POST'|'GET'                // (optional) default=GET
            URLC: '//some_url',                 // (optional)
            url: '//some_url',                  // (optional)
            endpoint: 'https://ssl.dotpay.pl/', // (optional)
            type: 0|1|2|3,                      // (optional) default=3 
            PIN: hjkert543dgt67yh,              // for URLC callbacks (must be set before in dotpay panel) (optional)
            ip: 195.150.9.37                    // this dotpay ip calls to URLC (optional)
bash
php composer.phar