1. Go to this page and download the library: Download sirumobile/payum-siru 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/ */
sirumobile / payum-siru example snippets
use Payum\Core\GatewayFactoryInterface;
use Siru\PayumSiru\PayumSiruGatewayFactory;
use Payum\Core\PayumBuilder;
use Payum\Core\Payum;
/** @var Payum $payum */
$payum = (new PayumBuilder())
->addDefaultStorages()
->addGatewayFactory('siru_checkout', function(array $config, GatewayFactoryInterface $coreGatewayFactory) {
return new PayumSiruGatewayFactory($config, $coreGatewayFactory);
})
->addGateway('siru_checkout', [
'factory' => 'siru_checkout',
# These are only example values. Replace these with values you received from Siru Mobile
'merchant_id' => 123,
'merchant_secret' => 'yoursecret',
'variant' => 'variant2',
'purchase_country' => 'FI',
'service_group' => 2,
'tax_class' => 3,
])
->getPayum()
;
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.