0 && mb_strlen($arg,$encoding) > $precision) $arg = mb_substr($precision,0,$precision,$encoding); } // define padding if ($size > 0) { $arglen = mb_strlen($arg, $encoding); if ($arglen < $size) { if($filler==='') $filler = ' '; if ($align == '-') $padding_post = str_repeat($filler, $size - $arglen); else $padding_pre = str_repeat($filler, $size - $arglen); } } // escape % and pass it forward $newformat .= $padding_pre . str_replace('%', '%%', $arg) . $padding_post; } else { // another type, pass forward $newformat .= "%$sign$filler$align$size$precision$type"; $newargv[] = array_shift($argv); } $format = strval($post); } // Convert new format back from UTF-8 to the original encoding $newformat = mb_convert_encoding($newformat, $encoding, 'UTF-8'); return vsprintf($newformat, $newargv); } } mb_internal_encoding( 'UTF-8' ); #setlocale ( LC_ALL, 'et_EE.utf8' ); if(!empty($_GET)) extract($_GET); if(!empty($_POST)) extract($_POST); $data = sprintf("%03s", $ver) . sprintf("%-10s", "$id") . sprintf("%012s", $ecuno) . sprintf("%06s", $receipt_no) . sprintf("%012s", $eamount) . sprintf("%3s", $cur) . $respcode . $datetime . mb_sprintf("%-40s", $msgdata) . mb_sprintf("%-40s", $actiontext); function hex2str($hex) { for($i=0;$i"; echo "Signature check OK "; } elseif ($ok == 0) { echo " "; echo "Signature NOT OK "; } else { echo " "; echo "error checking signature "; } echo " "; // free the key from memory openssl_free_key($pubkeyid); if ($respcode == 000) { echo " "; } ; if ($respcode > 0) { echo " ";}; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo " Tshekk nr $receipt_no Summa ($cur) $eamount senti Vastuskood: $respcode msgdata: $msgdata $actiontext "; echo " "; echo " "; echo "Tagasi maksma"; echo " "; echo " "; ?>