나이스페이 결제수단 추가
This commit is contained in:
@ -191,7 +191,7 @@ if (in_array($_POST['ct_status'], $status_cancel)) {
|
||||
$sql = " select * from {$g5['g5_shop_order_table']} where od_id = '$od_id' ";
|
||||
$od = sql_fetch($sql);
|
||||
|
||||
if($od['od_tno'] && ($od['od_settle_case'] == '신용카드' || $od['od_settle_case'] == '간편결제' || $od['od_settle_case'] == 'KAKAOPAY') || ($od['od_pg'] == 'inicis' && is_inicis_order_pay($od['od_settle_case']) )) {
|
||||
if ($od['od_tno'] && is_cancel_shop_pg_order($od)) {
|
||||
switch($od['od_pg']) {
|
||||
case 'lg':
|
||||
include_once(G5_SHOP_PATH.'/settle_lg.inc.php');
|
||||
@ -243,6 +243,32 @@ if (in_array($_POST['ct_status'], $status_cancel)) {
|
||||
$pg_res_msg = 'curl 로 데이터를 받지 못했습니다.';
|
||||
}
|
||||
|
||||
break;
|
||||
case 'nicepay':
|
||||
include_once(G5_SHOP_PATH.'/settle_nicepay.inc.php');
|
||||
$cancel_msg = '쇼핑몰 운영자 승인 취소';
|
||||
|
||||
$tno = $od['od_tno'];
|
||||
|
||||
$cancelAmt = $od['od_receipt_price'];
|
||||
|
||||
// 0:전체 취소, 1:부분 취소(별도 계약 필요)
|
||||
$partialCancelCode = 0;
|
||||
|
||||
|
||||
include G5_SHOP_PATH.'/nicepay/cancel_process.php';
|
||||
|
||||
if (isset($result['ResultCode'])) {
|
||||
// 실패했다면
|
||||
if ($result['ResultCode'] !== '2001') {
|
||||
$pg_res_cd = $result['ResultCode'];
|
||||
$pg_res_msg = $result['ResultMsg'];
|
||||
}
|
||||
} else {
|
||||
$pg_res_cd = '';
|
||||
$pg_res_msg = 'curl 로 데이터를 받지 못하거나 통신에 실패했습니다.';
|
||||
}
|
||||
|
||||
break;
|
||||
case 'KAKAOPAY':
|
||||
include_once(G5_SHOP_PATH.'/settle_kakaopay.inc.php');
|
||||
@ -296,7 +322,7 @@ if (in_array($_POST['ct_status'], $status_cancel)) {
|
||||
|
||||
// PG 취소요청 성공했으면
|
||||
if($pg_res_cd == '') {
|
||||
$pg_cancel_log = ' PG 신용카드 승인취소 처리';
|
||||
$pg_cancel_log = ' PG '.$od['od_settle_case'].' 승인취소 처리';
|
||||
$sql = " update {$g5['g5_shop_order_table']}
|
||||
set od_refund_price = '{$od['od_receipt_price']}'
|
||||
where od_id = '$od_id' ";
|
||||
|
||||
Reference in New Issue
Block a user