náhrada EPC QR za CZ SPD QR, úprava generátoru kódu
This commit is contained in:
parent
573b4a7901
commit
57f5f13472
2 changed files with 79 additions and 56 deletions
|
|
@ -30,5 +30,10 @@ function czqrpay_iban_to_cz($iban)
|
|||
function czqrpay_build_spd($account, $amount, $vs, $msg)
|
||||
{
|
||||
$amount = number_format($amount, 2, '.', '');
|
||||
return "SPD*1.0*ACC:$account*AM:$amount*CC:CZK*X-VS:$vs*MSG:$msg";
|
||||
|
||||
// odstranit diakritiku
|
||||
$msg = iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $msg);
|
||||
$msg = preg_replace('/[^A-Za-z0-9 .,-]/', '', $msg);
|
||||
|
||||
return "SPD*1.0*ACC:$account*AM:$amount*CC:CZK*X-VS:$vs*MSG:$msg*";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue