PHP code example of ekyna / payum-payzen

1. Go to this page and download the library: Download ekyna/payum-payzen 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/ */

    

ekyna / payum-payzen example snippets


use Ekyna\Component\Payum\Payzen\Api\Api;
use Ekyna\Component\Payum\Payzen\PayzenGatewayFactory;

$factory = new PayzenGatewayFactory();

$gateway = $factory->create([
    'site_id'     => '132456',
    'certificate' => '132456',
    'ctx_mode'    => Api::MODE_PRODUCTION,
    'hash_mode'   => Api::HASH_MODE_SHA256,
    'directory'   => __DIR__ . '/payzen-cache',
    'endpoint'    => Api::ENDPOINT_SYSTEMPAY, // default value, see `Api::ENDPOINT_*` constants for more
    'endpoint_url'    => // null default value, add custom endpoint not in  `Api::ENDPOINT_*` constants 
]);

// Register your convert payment action
// $gateway->addAction(new \Acme\ConvertPaymentAction());