|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /home/queenjbs/yuchun/ |
Upload File : |
<?php
/**
아래 설정 된 값은 테스트용 mid: 1849705C64 에 대한 secretKey 입니다.
테스트로만 진행 하시고 발급 받으신 값으로 변경 하셔야 됩니다.
*/
//$secretKey = "35306BB73805B2559083802F9C333838";//가맹점 secretkey
//$reqURL = "https://secureapi.eximbay.com/Gateway/BasicProcessor.krp";//EXIMBAY TEST 서버 요청 URL입니다.
$secretKey = "D408C367330362B31EF330818A9C0733"; // 실제 키
$reqURL = "https://secureapi.eximbay.com/Gateway/BasicProcessor.krp";//EXIMBAY TEST
$fgkey = "";//fgkey검증키 관련
$sortingParams = "";//파라미터 정렬 관련
foreach($_POST as $Key=>$value) {
$hashMap[$Key] = $value;
}
$size = count($hashMap);
ksort($hashMap);
$counter = 0;
foreach ($hashMap as $key => $val) {
if ($counter == $size-1){
$sortingParams .= $key."=" .$val;
}else{
$sortingParams .= $key."=" .$val."&";
}
++$counter;
}
//echo $sortingParams;
//exit;
$linkBuf = $secretKey. "?".$sortingParams;
$fgkey = hash("sha256", $linkBuf);
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body leftmargin="0" topmargin="0" align="center" onload="javascript:document.regForm.submit();">
<form name="regForm" method="post" action="<?php echo $reqURL; ?>">
<input type="hidden" name="fgkey" value="<?php echo $fgkey; ?>" /> <!--�ʼ� ��-->
<?php
foreach($_POST as $Key=>$value) {
?>
<input type="hidden" name="<?php echo $Key;?>" value="<?php echo $value;?>">
<?php } ?>
</form>
</body>
</html>