Skip to content

SPAYD messages for QR code payments generation.

License

Notifications You must be signed in to change notification settings

sunfoxcz/spayd-php

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spayd-php

SPAYD messages for QR code payments generation.

Original author

Code is forked from Shoptet/spayd-php repository just for Packagist package generation.

Example

use Sunfox\Spayd\Spayd;
use Sunfox\Spayd\Model\CzechAccount;
use Sunfox\Spayd\Utilities\IbanUtilities;

$spayd = new Spayd;
$spayd->add('AM', $actuarial->price);
$spayd->add('CC', $actuarial->currency);
$spayd->add('X-VS', $actuarial->variableSymbol);

if ($actuarial->supplier->iban) {
	$spayd->add('ACC', "{$actuarial->supplier->iban}+{$actuarial->supplier->swift}");
} else {
	$account = new CzechAccount("{$actuarial->supplier->accountNumber}/{$actuarial->supplier->bankCode}");
	$spayd->add('ACC', IbanUtilities::computeIbanFromBankAccount($account));
}

echo (string) $spayd;

About

SPAYD messages for QR code payments generation.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%