결제 모듈 변경 작업 중

This commit is contained in:
chicpro
2013-03-26 14:30:33 +09:00
parent 0a74a5d230
commit 1f9c362292
7 changed files with 127 additions and 43 deletions

View File

@ -117,14 +117,15 @@ if ($od_settle_case == "무통장")
}
else if ($od_settle_case == "계좌이체")
{
include "./kcp/pp_ax_hub.php";
include G4_SHOP_PATH.'/kcp/pp_ax_hub.php';
$od_temp_bank = $i_amount;
$od_temp_point = $i_temp_point;
$od_escrow1 = $tno;
$od_receipt_bank = $amount;
$od_receipt_point = $i_temp_point;
$od_receipt_time = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3 \\4:\\5:\\6", $app_time);
$od_bank_time = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3 \\4:\\5:\\6", $app_time);
$od_bank_account = $od_settle_case;
$od_deposit_name = $od_name;
$bank_name = iconv("cp949", "utf8", $bank_name);
@ -134,12 +135,13 @@ else if ($od_settle_case == "계좌이체")
}
else if ($od_settle_case == "가상계좌")
{
include "./kcp/pp_ax_hub.php";
include G4_SHOP_PATH.'/kcp/pp_ax_hub.php';
$od_temp_bank = $i_amount;
$od_temp_point = $i_temp_point;
$od_receipt_point = 0;
$od_escrow1 = $tno;
$od_receipt_amount = 0;
$bankname = iconv("cp949", "utf8", $bankname);
$depositor = iconv("cp949", "utf8", $depositor);
@ -148,28 +150,30 @@ else if ($od_settle_case == "가상계좌")
}
else if ($od_settle_case == "휴대폰")
{
include "./kcp/pp_ax_hub.php";
include G4_SHOP_PATH.'/kcp/pp_ax_hub.php';
$od_temp_bank = $i_amount;
$od_temp_point = $i_temp_point;
$od_escrow1 = $tno;
$od_receipt_hp = $amount;
$od_receipt_point = $i_temp_point;
$od_receipt_time = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3 \\4:\\5:\\6", $app_time);
$od_hp_time = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3 \\4:\\5:\\6", $app_time);
$od_bank_account = $commid.' '.$mobile_no;
$same_amount_check = true;
$pg_receipt_amount = $amount;
}
else if ($od_settle_case == "신용카드")
{
include "./kcp/pp_ax_hub.php";
include G4_SHOP_PATH.'/kcp/pp_ax_hub.php';
$od_temp_card = $i_amount;
$od_temp_point = $i_temp_point;
$od_escrow1 = $tno;
$od_receipt_card = $amount;
$od_receipt_point = $i_temp_point;
$od_receipt_time = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3 \\4:\\5:\\6", $app_time);
$od_card_time = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3 \\4:\\5:\\6", $app_time);
$card_name = iconv("cp949", "utf8", $card_name);
$od_bank_account = $card_name;
$same_amount_check = true;
@ -183,7 +187,7 @@ else
// 주문금액과 결제금액이 일치하는지 체크
if($same_amount_check) {
if((int)$i_amount !== (int)$pg_receipt_amount) {
include "./kcp/pp_ax_hub_cancel.php"; // 결제취소처리
include G4_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php'; // 결제취소처리
die("Receipt Amount Error");
}
@ -230,6 +234,10 @@ $sql = " insert {$g4['yc4_order_table']}
od_receipt_hp = '$od_receipt_hp',
od_receipt_point = '$od_receipt_point',
od_bank_account = '$od_bank_account',
od_bank_time = '$od_bank_time',
od_card_time = '$od_card_time',
od_hp_time = '$od_hp_time',
od_escrow1 = '$od_escrow1',
od_shop_memo = '',
od_hope_date = '$od_hope_date',
od_time = '".G4_TIME_YMDHIS."',
@ -256,11 +264,14 @@ if ($is_member && $od_receipt_point) {
insert_point($member['mb_id'], (-1) * $od_receipt_point, "주문번호 $od_id 결제");
}
// PG 결제내역기록
include_once(G4_SHOP_PATH.'/kcp/pp_ax_hub_result.php');
$od_memo = nl2br(htmlspecialchars2(stripslashes($od_memo))) . " ";
include_once('./ordermail1.inc.php');
include_once('./ordermail2.inc.php');
include_once(G4_SHOP_PATH.'/ordermail1.inc.php');
include_once(G4_SHOP_PATH.'/ordermail2.inc.php');
// SMS BEGIN --------------------------------------------------------
// 쇼핑몰 운영자가 수신자가 됨
@ -287,14 +298,17 @@ if ($default['de_sms_use2'] && $receive_number)
// SMS END --------------------------------------------------------
// order_confirm 에서 사용하기 위해 tmp에 넣고
// orderview 에서 사용하기 위해 tmp에 넣고
set_session('ss_temp_uq_id', $tmp_uq_id);
// ss_uq_id 기존자료 세션에서 제거
if (get_session("ss_direct"))
set_session("ss_uq_direct", "");
else
set_session("ss_uq_id", "");
// 주문번호제거
set_session('ss_order_uniqid', '');
goto_url(G4_SHOP_URL.'./orderinquiryview.php?od_id='.$od_id.'&uq_id='.$tmp_uq_id);
// ss_uq_id 기존자료 세션에서 제거
if (get_session('ss_direct'))
set_session('ss_uq_direct', '');
else
set_session('ss_uq_id', '');
goto_url(G4_SHOP_URL.'/orderinquiryview.php?od_id='.$od_id.'&uq_id='.$tmp_uq_id);
?>