diff --git a/adm/shop_admin/orderformcartupdate.php b/adm/shop_admin/orderformcartupdate.php index 577818dbb..32b8b55af 100644 --- a/adm/shop_admin/orderformcartupdate.php +++ b/adm/shop_admin/orderformcartupdate.php @@ -402,7 +402,7 @@ if (in_array($_POST['ct_status'], $status_cancel)) { if (isset($result['ResultCode'])) { // 실패했다면 - if ($result['ResultCode'] !== '2001') { + if (! in_array($result['ResultCode'], array('2001', '2211'), true)) { $pg_res_cd = $result['ResultCode']; $pg_res_msg = $result['ResultMsg']; } diff --git a/mobile/shop/nicepay/nicepay_result.php b/mobile/shop/nicepay/nicepay_result.php index 249046363..d58db5148 100644 --- a/mobile/shop/nicepay/nicepay_result.php +++ b/mobile/shop/nicepay/nicepay_result.php @@ -21,10 +21,18 @@ $amt = isset($_POST['Amt']) ? (int) preg_replace('/[^0-9]/', '', $_POST['Amt']) $reqReserved = isset($_POST['ReqReserved']) ? clean_xss_tags($_POST['ReqReserved']) : ''; // mall custom field $netCancelURL = isset($_POST['NetCancelURL']) ? clean_xss_tags($_POST['NetCancelURL']) : ''; // netCancelURL $Signature = isset($_POST['Signature']) ? clean_xss_tags($_POST['Signature']) : ''; // authentication signature - -if (isset($pp['pp_id']) && $pp['pp_id']) { //개인결제 - $session_order_id = get_session('ss_personalpay_id'); - $order_price = (int) $pp['pp_price']; + +if($authResultCode !== "0000"){ + //When authentication fail + $ResultCode = $authResultCode; + $ResultMsg = $authResultMsg; + + alert($ResultMsg.' 실패 코드 : '.$ResultCode); +} + +if (isset($pp['pp_id']) && $pp['pp_id']) { //개인결제 + $session_order_id = get_session('ss_personalpay_id'); + $order_price = (int) $pp['pp_price']; } else { $session_order_id = get_session('ss_order_id'); // 쇼핑몰 일반결제 } @@ -51,13 +59,27 @@ if (! function_exists('jsonRespDump')) { } } -if (! function_exists('nicepay_res')) { - function nicepay_res($key, $data, $default_val='') { - $response_val = isset($data[$key]) ? $data[$key] : $default_val; - - return ($response_val ? $response_val : $default_val); - } -} +if (! function_exists('nicepay_res')) { + function nicepay_res($key, $data, $default_val='') { + $response_val = isset($data[$key]) ? $data[$key] : $default_val; + + return ($response_val ? $response_val : $default_val); + } +} + +if (! function_exists('nicepay_expected_pay_result')) { + function nicepay_expected_pay_result($settle_case) { + $pay_results = array( + '신용카드' => array('PayMethod'=>'CARD', 'ResultCode'=>'3001'), + '간편결제' => array('PayMethod'=>'CARD', 'ResultCode'=>'3001'), + '계좌이체' => array('PayMethod'=>'BANK', 'ResultCode'=>'4000'), + '가상계좌' => array('PayMethod'=>'VBANK', 'ResultCode'=>'4100'), + '휴대폰' => array('PayMethod'=>'CELLPHONE', 'ResultCode'=>'A000') + ); + + return isset($pay_results[$settle_case]) ? $pay_results[$settle_case] : false; + } +} /* **************************************************************************************** @@ -132,8 +154,8 @@ if($authResultCode === "0000"){ $app_time = nicepay_res('AuthDate', $respArr); $pay_method = nicepay_res('PayMethod', $respArr); $od_app_no = $app_no = nicepay_res('AuthCode', $respArr); // 승인 번호 (신용카드, 계좌이체, 휴대폰) - $pay_type = $NICEPAY_METHOD[$pay_method]; - + $pay_type = isset($NICEPAY_METHOD[$pay_method]) ? $NICEPAY_METHOD[$pay_method] : ''; + // 승인된 코드가 아니면 결제가 되지 않게 합니다. if (! in_array($ResultCode, array('3001', '4000', '4100', 'A000', '7001'))) { alert($ResultMsg.' 코드 : '.$ResultCode, G5_SHOP_URL); @@ -171,9 +193,29 @@ if($authResultCode === "0000"){ alert("승인된 결제금액이 틀리므로 결제를 진행할수 없습니다.", G5_SHOP_URL); } + $nicepay_settle_case = ''; + if (isset($pp['pp_id']) && $pp['pp_id'] && isset($pp_settle_case)) { + $nicepay_settle_case = $pp_settle_case; + } else if (isset($od_settle_case)) { + $nicepay_settle_case = $od_settle_case; + } + + $expected_pay_result = nicepay_expected_pay_result($nicepay_settle_case); + if ($expected_pay_result && ($pay_method !== $expected_pay_result['PayMethod'] || $ResultCode !== $expected_pay_result['ResultCode'])) { + if($amount > 0 && $tno) { + $od_id = $moid; + $cancel_msg = '결제수단 불일치'; + $cancelAmt = $amount; + $partialCancelCode = 0; + include G5_SHOP_PATH.'/nicepay/cancel_process.php'; + } + + alert("선택한 결제수단과 승인된 결제수단이 일치하지 않아 결제를 진행할수 없습니다.", G5_SHOP_URL); + } + if ($ResultCode == '3001') { // 신용카드 - - $card_cd = nicepay_res('CardCode', $respArr); // 카드사 코드 + + $card_cd = nicepay_res('CardCode', $respArr); // 카드사 코드 $card_name = nicepay_res('CardName', $respArr); // 카드 종류 } else if ($ResultCode == '4100') { // 가상계좌 diff --git a/mobile/shop/nicepay/return_url_result.php b/mobile/shop/nicepay/return_url_result.php index 575b14e8f..02fd320f0 100644 --- a/mobile/shop/nicepay/return_url_result.php +++ b/mobile/shop/nicepay/return_url_result.php @@ -7,13 +7,36 @@ $authResultMsg = isset($_POST['AuthResultMsg']) ? clean_xss_tags($_POST['AuthRes $mid = isset($_POST['MID']) ? clean_xss_tags($_POST['MID']) : ''; // merchant id $moid = isset($_POST['Moid']) ? addslashes(clean_xss_tags(stripslashes($_POST['Moid']))) : ''; // order number +$session_order_id = get_session('ss_order_id'); +$session_personalpay_id = get_session('ss_personalpay_id'); + +if ($authResultCode !== '0000') { + $page_return_url = G5_SHOP_URL; + + if ($moid && ($session_order_id == $moid || $session_personalpay_id == $moid)) { + $sql = " select * from {$g5['g5_shop_order_data_table']} where od_id = '$moid' and dt_pg = 'nicepay' "; + $row = sql_fetch($sql); + + if (!empty($row)) { + $data = unserialize(base64_decode($row['dt_data'])); + + if(isset($data['pp_id']) && $data['pp_id']) { + $page_return_url = G5_SHOP_URL.'/personalpayform.php?pp_id='.$data['pp_id']; + } else { + $page_return_url = G5_SHOP_URL.'/orderform.php'; + if(isset($_SESSION['ss_direct']) && $_SESSION['ss_direct']) + $page_return_url .= '?sw_direct=1'; + } + } + } + + alert('오류 : '.$authResultMsg.' 코드 : '.$authResultCode, $page_return_url); +} + if ($default['de_nicepay_mid'] != $mid) { alert("요청한 상점 mid와 설정된 mid가 틀리므로 결제를 진행할수 없습니다.", G5_SHOP_URL); } -$session_order_id = get_session('ss_order_id'); -$session_personalpay_id = get_session('ss_personalpay_id'); - if (!$moid || ($session_order_id != $moid && $session_personalpay_id != $moid)) { alert("요청한 주문번호가 틀려서 결제를 진행할수 없습니다.", G5_SHOP_URL); } diff --git a/mobile/shop/orderformupdate.php b/mobile/shop/orderformupdate.php index d6e6bf434..7bd800184 100644 --- a/mobile/shop/orderformupdate.php +++ b/mobile/shop/orderformupdate.php @@ -728,9 +728,9 @@ if(! $result && (isset($exists_order['od_id']) && $od_id && $exists_order['od_id // 주문정보 입력 오류시 결제 취소 if(! $result || ! (isset($exists_order['od_id']) && $od_id && $exists_order['od_id'] === $od_id)) { if($tno) { - $cancel_msg = '주문정보 입력 오류 : '.$sql; - include G5_SHOP_PATH.'/cancel_pg.inc.php'; - } + $cancel_msg = '주문정보 입력 오류'; + include G5_SHOP_PATH.'/cancel_pg.inc.php'; + } // 관리자에게 오류 알림 메일발송 $error = 'order'; diff --git a/mobile/shop/personalpayformupdate.php b/mobile/shop/personalpayformupdate.php index 96f61a763..45d39eff5 100644 --- a/mobile/shop/personalpayformupdate.php +++ b/mobile/shop/personalpayformupdate.php @@ -256,6 +256,7 @@ if(!$result) { break; } + if(function_exists('add_order_post_log')) add_order_post_log($cancel_msg); die('개인결제 정보를 처리하는 중 오류가 발생했습니다. 결제 취소 여부를 관리자에게 문의해 주십시오.'); } @@ -307,6 +308,7 @@ if($pp_receipt_price > 0 && $pp['pp_id'] && $pp['od_id']) { break; } + if(function_exists('add_order_post_log')) add_order_post_log($cancel_msg); die('주문 결제정보를 처리하는 중 오류가 발생했습니다. 결제 취소 여부를 관리자에게 문의해 주십시오.'); } diff --git a/shop/nicepay/escrow.register.php b/shop/nicepay/escrow.register.php index 30592d49e..c10ec3978 100644 --- a/shop/nicepay/escrow.register.php +++ b/shop/nicepay/escrow.register.php @@ -46,32 +46,37 @@ $data = array( 'CharSet' => $charSet ); -$response = nicepay_reqPost($data, $escrowRequestURL); - -$nice_result = json_decode($response, true); - -// 성공이면 -if (isset($nice_result['ResultCode']) && $nice_result['ResultCode'] === 'C000') { - -} else { - // C000 이 아니면 다 실패 - +$response = nicepay_reqPost($data, $escrowRequestURL); + +$nice_result = json_decode($response, true); + +if (!is_array($nice_result)) { + $nice_result = array(); +} + +/********************** + * 4. 배송 등록 결과 * + **********************/ + +$resultCode = isset($nice_result['ResultCode']) ? $nice_result['ResultCode'] : ''; // 결과코드 +$resultMsg = isset($nice_result['ResultMsg']) ? $nice_result['ResultMsg'] : '나이스페이 응답을 확인할 수 없습니다.'; // 결과내용 +$dlv_date = isset($nice_result['ProcessDate']) ? $nice_result['ProcessDate'] : ''; +$dlv_time = isset($nice_result['ProcessTime']) ? $nice_result['ProcessTime'] : ''; + +// 성공이면 +if ($resultCode === 'C000') { + +} else { + // C000 이 아니면 다 실패 + /* C002 에스크로 가맹점 아님 C003 에스크로 거래만 배송등록 가능 C004 에스크로결제 신청내역 미존재 C005 에스크로배송등록 불가상태 C006 거래내역이 존재하지 않음. - C007 취소된 거래는 배송등록 불가 - */ - -} - -/********************** - * 4. 배송 등록 결과 * - **********************/ - -$resultCode = $nice_result['ResultCode']; // 결과코드 ("00"이면 지불 성공) -$resultMsg = $nice_result['ResultMsg']; // 결과내용 (지불결과에 대한 설명) -$dlv_date = $nice_result['ProcessDate']; -$dlv_time = $nice_result['ProcessTime']; \ No newline at end of file + C007 취소된 거래는 배송등록 불가 + */ + + alert('나이스페이 에스크로 배송등록이 실패했습니다.\\n\\n'.$resultCode.' : '.$resultMsg); +} diff --git a/shop/nicepay/nicepay_result.php b/shop/nicepay/nicepay_result.php index 3fc30df1f..3f7536cb4 100644 --- a/shop/nicepay/nicepay_result.php +++ b/shop/nicepay/nicepay_result.php @@ -17,14 +17,22 @@ $authToken = isset($_POST['AuthToken']) ? clean_xss_tags($_POST['AuthToken']) : $payMethod = isset($_POST['PayMethod']) ? clean_xss_tags($_POST['PayMethod']) : ''; // payment method $mid = isset($_POST['MID']) ? clean_xss_tags($_POST['MID']) : ''; // merchant id $moid = isset($_POST['Moid']) ? addslashes(clean_xss_tags(stripslashes($_POST['Moid']))) : ''; // order number -$amt = isset($_POST['Amt']) ? (int) preg_replace('/[^0-9]/', '', $_POST['Amt']) : 0; // Amount of payment -$reqReserved = isset($_POST['ReqReserved']) ? clean_xss_tags($_POST['ReqReserved']) : ''; // mall custom field -$netCancelURL = isset($_POST['NetCancelURL']) ? clean_xss_tags($_POST['NetCancelURL']) : ''; // netCancelURL -$Signature = isset($_POST['Signature']) ? clean_xss_tags($_POST['Signature']) : ''; // netCancelURL - -if (isset($pp['pp_id']) && $pp['pp_id']) { //개인결제 - $session_order_id = get_session('ss_personalpay_id'); - $order_price = (int) $pp['pp_price']; +$amt = isset($_POST['Amt']) ? (int) preg_replace('/[^0-9]/', '', $_POST['Amt']) : 0; // Amount of payment +$reqReserved = isset($_POST['ReqReserved']) ? clean_xss_tags($_POST['ReqReserved']) : ''; // mall custom field +$netCancelURL = isset($_POST['NetCancelURL']) ? clean_xss_tags($_POST['NetCancelURL']) : ''; // netCancelURL +$Signature = isset($_POST['Signature']) ? clean_xss_tags($_POST['Signature']) : ''; // netCancelURL + +if($authResultCode !== "0000"){ + //When authentication fail + $ResultCode = $authResultCode; + $ResultMsg = $authResultMsg; + + alert($ResultMsg.' 실패 코드 : '.$ResultCode); +} + +if (isset($pp['pp_id']) && $pp['pp_id']) { //개인결제 + $session_order_id = get_session('ss_personalpay_id'); + $order_price = (int) $pp['pp_price']; } else { $session_order_id = get_session('ss_order_id'); // 쇼핑몰 일반결제 } @@ -51,13 +59,27 @@ if (! function_exists('jsonRespDump')) { } } -if (! function_exists('nicepay_res')) { - function nicepay_res($key, $data, $default_val='') { - $response_val = isset($data[$key]) ? $data[$key] : $default_val; - - return ($response_val ? $response_val : $default_val); - } -} +if (! function_exists('nicepay_res')) { + function nicepay_res($key, $data, $default_val='') { + $response_val = isset($data[$key]) ? $data[$key] : $default_val; + + return ($response_val ? $response_val : $default_val); + } +} + +if (! function_exists('nicepay_expected_pay_result')) { + function nicepay_expected_pay_result($settle_case) { + $pay_results = array( + '신용카드' => array('PayMethod'=>'CARD', 'ResultCode'=>'3001'), + '간편결제' => array('PayMethod'=>'CARD', 'ResultCode'=>'3001'), + '계좌이체' => array('PayMethod'=>'BANK', 'ResultCode'=>'4000'), + '가상계좌' => array('PayMethod'=>'VBANK', 'ResultCode'=>'4100'), + '휴대폰' => array('PayMethod'=>'CELLPHONE', 'ResultCode'=>'A000') + ); + + return isset($pay_results[$settle_case]) ? $pay_results[$settle_case] : false; + } +} /* **************************************************************************************** @@ -132,9 +154,9 @@ if($authResultCode === "0000"){ $app_time = nicepay_res('AuthDate', $respArr); $pay_method = nicepay_res('PayMethod', $respArr); $od_app_no = $app_no = nicepay_res('AuthCode', $respArr); // 승인 번호 (신용카드, 계좌이체, 휴대폰) - $pay_type = $NICEPAY_METHOD[$pay_method]; - - // 승인된 코드가 아니면 결제가 되지 않게 합니다. + $pay_type = isset($NICEPAY_METHOD[$pay_method]) ? $NICEPAY_METHOD[$pay_method] : ''; + + // 승인된 코드가 아니면 결제가 되지 않게 합니다. if (! in_array($ResultCode, array('3001', '4000', '4100', 'A000', '7001'))) { alert($ResultMsg.' 코드 : '.$ResultCode, G5_SHOP_URL); die(); @@ -171,9 +193,29 @@ if($authResultCode === "0000"){ alert("승인된 결제금액이 틀리므로 결제를 진행할수 없습니다.", G5_SHOP_URL); } + $nicepay_settle_case = ''; + if (isset($pp['pp_id']) && $pp['pp_id'] && isset($pp_settle_case)) { + $nicepay_settle_case = $pp_settle_case; + } else if (isset($od_settle_case)) { + $nicepay_settle_case = $od_settle_case; + } + + $expected_pay_result = nicepay_expected_pay_result($nicepay_settle_case); + if ($expected_pay_result && ($pay_method !== $expected_pay_result['PayMethod'] || $ResultCode !== $expected_pay_result['ResultCode'])) { + if($amount > 0 && $tno) { + $od_id = $moid; + $cancel_msg = '결제수단 불일치'; + $cancelAmt = $amount; + $partialCancelCode = 0; + include G5_SHOP_PATH.'/nicepay/cancel_process.php'; + } + + alert("선택한 결제수단과 승인된 결제수단이 일치하지 않아 결제를 진행할수 없습니다.", G5_SHOP_URL); + } + if ($ResultCode == '3001') { // 신용카드 - $card_cd = nicepay_res('CardCode', $respArr); // 카드사 코드 + $card_cd = nicepay_res('CardCode', $respArr); // 카드사 코드 $card_name = nicepay_res('CardName', $respArr); // 카드 종류 } else if ($ResultCode == '4100') { // 가상계좌 diff --git a/shop/nicepay/taxsave_result.php b/shop/nicepay/taxsave_result.php index 1936f95c6..469baef52 100644 --- a/shop/nicepay/taxsave_result.php +++ b/shop/nicepay/taxsave_result.php @@ -1,15 +1,95 @@ '', 'resultMsg' => '취소 요청 정보가 올바르지 않습니다.'); + } + + $ediDate = date('c', G5_SERVER_TIME); + $merchantKey = $default['de_nicepay_key']; + $data = array( + 'orderId' => $order_id, + 'reason' => $reason, + 'ediDate' => $ediDate, + 'signData' => bin2hex(hash('sha256', $tid.$ediDate.$merchantKey, true)), + 'returnCharSet' => 'utf-8' + ); + + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, 'https://api.nicepay.co.kr/v1/receipt/'.rawurlencode($tid).'/cancel'); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); + curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_HTTPHEADER, array( + 'Content-Type: application/json;charset=utf-8', + 'Authorization: Basic '.base64_encode($default['de_nicepay_mid'].':'.$merchantKey) + )); + $response = curl_exec($ch); + curl_close($ch); + + $result = json_decode($response, true); + + if (!is_array($result)) { + return array('resultCode' => '', 'resultMsg' => '나이스페이 현금영수증 취소 응답을 확인할 수 없습니다.'); + } + + if (isset($result['signature']) && $result['signature']) { + $response_tid = isset($result['tid']) ? $result['tid'] : ''; + $response_order_id = isset($result['orderId']) ? $result['orderId'] : ''; + $response_edi_date = isset($result['ediDate']) ? $result['ediDate'] : ''; + $response_signature = bin2hex(hash('sha256', $response_tid.$response_order_id.$response_edi_date.$merchantKey, true)); + + if ($result['signature'] != $response_signature) { + $result['resultCode'] = '9998'; + $result['resultMsg'] = '현금영수증 취소 응답 유효성 검증 실패'; + } + } + + return $result; + } +} if($tx == 'personalpay') { $od = sql_fetch(" select * from {$g5['g5_shop_personalpay_table']} where pp_id = '$od_id' "); @@ -53,10 +133,7 @@ if($tx == 'personalpay') { $amt_free = (int)$od['od_free_mny']; } - -$reg_num = $id_info; -$useopt = $tr_code; -$currency = 'WON'; +$currency = 'WON'; //step1. 요청을 위한 파라미터 설정 $goodName = $goodname; // 상품명 @@ -95,24 +172,39 @@ $data = array( 'CharSet' => 'utf-8', ); -$response = nicepay_reqPost($data, "https://pg-api.nicepay.co.kr/webapi/cash_receipt.jsp"); - -$result = json_decode($response, true); - -// 성공이면 -if (isset($result['ResultCode']) && $result['ResultCode'] === '7001') { - - // DB 반영 - $cash_no = $result['AuthCode']; // 현금영수증 승인번호 - - $cash = array(); - $cash['TID'] = $result['TID']; - $cash['ApplNum'] = $cash_no; - $cash['AuthDate'] = $result['AuthDate']; - $cash_info = serialize($cash); - - if($tx == 'personalpay') { - $sql = " update {$g5['g5_shop_personalpay_table']} +$response = nicepay_reqPost($data, "https://pg-api.nicepay.co.kr/webapi/cash_receipt.jsp"); + +$result = json_decode($response, true); + +if (!is_array($result)) { + alert('현금영수증 발급 요청처리가 정상적으로 완료되지 않았습니다.\\n나이스페이 응답을 확인할 수 없습니다.'); +} + +$result_code = isset($result['ResultCode']) ? $result['ResultCode'] : ''; +$result_msg = isset($result['ResultMsg']) ? $result['ResultMsg'] : ''; +$result_tid = isset($result['TID']) ? $result['TID'] : ''; +$result_auth_code = isset($result['AuthCode']) ? $result['AuthCode'] : ''; +$result_auth_date = isset($result['AuthDate']) ? $result['AuthDate'] : ''; + +// 성공이면 +if ($result_code === '7001') { + + if (!$result_tid || !$result_auth_code) { + alert('현금영수증 발급 응답 정보가 올바르지 않습니다.'); + } + + // DB 반영 + $cash_no = $result_auth_code; // 현금영수증 승인번호 + + $cash = array(); + $cash['TID'] = $result_tid; + $cash['ApplNum'] = $cash_no; + $cash['AuthDate'] = $result_auth_date; + $cash_info = sql_escape_string(serialize($cash)); + $cash_no = sql_escape_string($cash_no); + + if($tx == 'personalpay') { + $sql = " update {$g5['g5_shop_personalpay_table']} set pp_cash = '1', pp_cash_no = '$cash_no', pp_cash_info = '$cash_info' @@ -123,30 +215,42 @@ if (isset($result['ResultCode']) && $result['ResultCode'] === '7001') { od_cash_no = '$cash_no', od_cash_info = '$cash_info' where od_id = '$od_id' "; - } - - $sql_result = sql_query($sql, false); - -} else { - //2)API 요청 실패 화면처리 - - $msg = '현금영수증 발급 요청처리가 정상적으로 완료되지 않았습니다.'; - $msg .= '\\nTX Response_code = '.$result['ResultCode']; - $msg .= '\\nTX Response_msg = '.$result['ResultMsg']; - - alert($msg); -} + } + + $sql_result = sql_query($sql, false); + + if (!$sql_result) { + $cancel_result = nicepay_cancel_cash_receipt($result_tid, $moid, '쇼핑몰 DB 반영 실패'); + $cancel_code = isset($cancel_result['resultCode']) ? $cancel_result['resultCode'] : ''; + $cancel_msg = isset($cancel_result['resultMsg']) ? $cancel_result['resultMsg'] : ''; + + if ($cancel_code === '0000') { + alert_close('현금영수증은 나이스페이에 발급 요청되었으나 쇼핑몰 DB 반영에 실패하여 자동 취소를 요청했습니다.\\n관리자에게 문의해 주세요.\\n현금영수증 거래번호 : '.$result_tid); + } + + alert_close('현금영수증은 나이스페이에 발급 요청되었으나 쇼핑몰 DB 반영에 실패했습니다.\\n자동 취소 요청도 정상적으로 완료되지 않았습니다.\\n관리자에게 문의해 주세요.\\n현금영수증 거래번호 : '.$result_tid.'\\n취소 응답 : '.$cancel_code.' '.$cancel_msg); + } + +} else { + //2)API 요청 실패 화면처리 + + $msg = '현금영수증 발급 요청처리가 정상적으로 완료되지 않았습니다.'; + $msg .= '\\nTX Response_code = '.$result_code; + $msg .= '\\nTX Response_msg = '.$result_msg; + + alert($msg); +} $g5['title'] = '현금영수증 발급'; include_once(G5_PATH.'/head.sub.php'); ?>