PHP code example of hubleto / pay-by-square-encoder

1. Go to this page and download the library: Download hubleto/pay-by-square-encoder 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/ */

    

hubleto / pay-by-square-encoder example snippets


$pbsEnc = new \Hubleto\Utilities\PayBySquareEncoder();
$pbsEnc->setAmount(9.99);
$pbsEnc->setIban("SK99 0000 0012 3456 7890");
$pbsEnc->setBic("ABCDEFGH");
$pbsEnc->setBeneficiaryName("The Beneficiary Ltd.");
$pbsEnc->setVariableSymbol("2020123456");
$pbsEnc->setConstantSymbol("0308");
$pbsEnc->setSpecificSymbol("1000");
$pbsEnc->setNote("Payment for the services");

$pbsEnc->setXzPath("/usr/bin/xz"); // set the path to your XZ utility
$encoded = $pbsEnc->getEncodedString();

// Now, use here the `$encoded` in your favourite QR code generator library.