PHP code example of pimcore / payment-provider-datatrans

1. Go to this page and download the library: Download pimcore/payment-provider-datatrans 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/ */

    

pimcore / payment-provider-datatrans example snippets



$url = 'http://'. $_SERVER["HTTP_HOST"] . "/en/checkout/payment-status?mode=";
$config = [
    // checkout config
    'language' => $language
    , 'refno' => $paymentInformation->getInternalPaymentId()
    , 'useAlias' => true
    , 'reqtype' => 'CAA'    // Authorisation and settlement

    // system
    , 'successUrl' => $url . 'success'
    , 'errorUrl' => $url . 'error'
    , 'cancelUrl' => $url . 'cancel'
];
bash
php bin/console pimcore:bundle:enable PimcorePaymentProviderDatatransBundle
php bin/console pimcore:bundle:install PimcorePaymentProviderDatatransBundle