1<?
if (!defined(
"B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !==
true)
die();?><?
3if(!function_exists(
"bx_hmac"))
5 function bx_hmac($algo,
$data,
$key, $raw_output =
false)
7 $algo = mb_strtolower($algo);
8 $pack =
"H".mb_strlen($algo(
"test"));
10 $opad = str_repeat(chr(0x5C), $size);
11 $ipad = str_repeat(chr(0x36), $size);
13 if (mb_strlen(
$key) > $size) {
14 $key = str_pad(pack($pack, $algo(
$key)), $size, chr(0x00));
16 $key = str_pad(
$key, $size, chr(0x00));
19 $lenKey = mb_strlen(
$key) - 1;
20 for (
$i = 0;
$i < $lenKey;
$i++) {
25 $output = $algo($opad.pack($pack, $algo($ipad.$data)));
54 $server_url =
"https://3ds.eximb.com:443/cgi-bin/cgi_test";
63$var = unpack(
"H*r",
ToUpper(mb_substr(md5(uniqid(30)), 0, 8)));
67$time = gmdate(
"YmdHis", time());
89<form name=
"cardform" action=
"<?=$server_url?>" method=
"post">
90 <input type=
"hidden" name=
"TRTYPE" VALUE=
"<?=$trtype?>">
91 <input type=
"hidden" name=
"AMOUNT" value=
"<?=$amount?>">
92 <input type=
"hidden" name=
"CURRENCY" value=
"<?=$currency?>">
93 <input type=
"hidden" name=
"ORDER" value=
"<?=$order?>">
94 <input type=
"hidden" name=
"DESC" value=
"<?=htmlspecialcharsbx($desc)?>">
95 <input type=
"hidden" name=
"MERCH_NAME" value=
"<?=htmlspecialcharsbx($m_name)?>">
96 <input type=
"hidden" name=
"MERCH_URL" value=
"<?=htmlspecialcharsbx($m_url)?>">
97 <input type=
"hidden" name=
"MERCHANT" value=
"<?=htmlspecialcharsbx($merchant)?>">
98 <input type=
"hidden" name=
"TERMINAL" value=
"<?=htmlspecialcharsbx($terminal)?>">
99 <input type=
"hidden" name=
"EMAIL" value=
"<?=htmlspecialcharsbx($email)?>">
100 <input type=
"hidden" name=
"LANG" value=
"">
101 <input type=
"hidden" name=
"BACKREF" value=
"<?=$backref?>">
102 <input type=
"hidden" name=
"NONCE" value=
"<?=$nonce?>">
103 <input type=
"hidden" name=
"P_SIGN" value=
"<?=$sign?>">
104 <input type=
"hidden" name=
"TIMESTAMP" value=
"<?=$time?>">
105 <input type=
"submit" class=
"btn btn-primary" value=
"<?=GetMessage("PAY_BUTTON
")?>" name=
"send_button">
static GetParamValue($key, $defaultValue=null)
htmlspecialcharsbx($string, $flags=ENT_COMPAT, $doubleEncode=true)
GetLangFileName($before, $after, $lang=false)
if(mb_strlen($order)< 6) $desc
if(!function_exists("bx_hmac")) $amount
if(empty($signedUserToken)) $key