PHP code example of sol-parts / payum-monobank
1. Go to this page and download the library: Download sol-parts/payum-monobank 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/ */
sol-parts / payum-monobank example snippets
use Payum\Core\GatewayFactoryInterface;
use Payum\Core\PayumBuilder;
use SolParts\PayumMonobank\MonobankGatewayFactory;
$payum = (new PayumBuilder())
->addGatewayFactory('monobank', static function (array $config, GatewayFactoryInterface $coreGatewayFactory) {
return new MonobankGatewayFactory($config, $coreGatewayFactory);
})
->addGateway('monobank', [
'factory' => 'monobank',
'x-token' => 'your-merchant-token',
])
->getPayum();