PC 카카오페이 추가

This commit is contained in:
chicpro
2015-09-15 18:05:29 +09:00
parent 508dbe35ca
commit 7c86e41701
16 changed files with 1403 additions and 10 deletions

View File

@ -0,0 +1,21 @@
<?php
include_once('./_common.php');
include_once(G5_LIB_PATH.'/json.lib.php');
include(G5_SHOP_PATH.'/kakaopay/incKakaopayCommon.php');
include(G5_SHOP_PATH.'/kakaopay/lgcns_CNSpay.php');
$Amt = (int)preg_replace('#[^0-9]#', '', $_POST['Amt']);
$ediDate = trim($_POST['ediDate']);
////////위변조 처리/////////
//결제요청용 키값
$cnspay_lib = new CnsPayWebConnector($LogDir);
$md_src = $ediDate.$MID.$Amt;
$salt = hash("sha256",$merchantKey.$md_src,false);
$hash_input = $cnspay_lib->makeHashInputString($salt);
$hash_calc = hash("sha256", $hash_input, false);
$hash_String = base64_encode($hash_calc);
die(json_encode(array('hash_String' => $hash_String, 'error' => '')));
?>