PHP code example of liagkos / diasrf

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

    

liagkos / diasrf example snippets




use Liagkos\Banks\Dias\RF;

$merchantId        = '1234'; // leading '9' is ignored
$paymentIdentifier = '123456789012345';

$RF = RF::create($merchantId, $paymentIdentifier);



use Liagkos\Banks\Dias\RF;

$merchantId        = '1234';
$paymentIdentifier = '123456789012345';
$value             = 15.22;

$RF = RF::create($merchantId, $paymentIdentifier, $value);



use Liagkos\Banks\Dias\RF;

$merchantId        = '1234';
$paymentIdentifier = '123456789012345';

$RF = RF::create($merchantId, $paymentIdentifier, 0, 'fixed');



use Liagkos\Banks\Dias\RF;

$paymentCode = 'RF8912349123456789012345';

$isValid = RF::check($merchantId, $paymentIdentifier);