나이스페이 주문정보 입력 오류시 결제 취소 코드 추가 및 불필요한 코드 제거
This commit is contained in:
@ -4,8 +4,6 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
|||||||
// 나이스페이 공통 설정
|
// 나이스페이 공통 설정
|
||||||
require_once(G5_MSHOP_PATH.'/settle_nicepay.inc.php');
|
require_once(G5_MSHOP_PATH.'/settle_nicepay.inc.php');
|
||||||
|
|
||||||
if (function_exists('add_log')) add_log($_POST);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
****************************************************************************************
|
****************************************************************************************
|
||||||
* <Authentication Result Parameter>
|
* <Authentication Result Parameter>
|
||||||
|
|||||||
@ -2,8 +2,6 @@
|
|||||||
include_once('./_common.php');
|
include_once('./_common.php');
|
||||||
include_once(G5_MSHOP_PATH.'/settle_nicepay.inc.php');
|
include_once(G5_MSHOP_PATH.'/settle_nicepay.inc.php');
|
||||||
|
|
||||||
if (function_exists('add_log')) add_log($_POST);
|
|
||||||
|
|
||||||
$authResultCode = isset($_POST['AuthResultCode']) ? clean_xss_tags($_POST['AuthResultCode']) : ''; // authentication result code 0000:success
|
$authResultCode = isset($_POST['AuthResultCode']) ? clean_xss_tags($_POST['AuthResultCode']) : ''; // authentication result code 0000:success
|
||||||
$authResultMsg = isset($_POST['AuthResultMsg']) ? clean_xss_tags($_POST['AuthResultMsg']) : ''; // authentication result message
|
$authResultMsg = isset($_POST['AuthResultMsg']) ? clean_xss_tags($_POST['AuthResultMsg']) : ''; // authentication result message
|
||||||
$mid = isset($_POST['MID']) ? clean_xss_tags($_POST['MID']) : ''; // merchant id
|
$mid = isset($_POST['MID']) ? clean_xss_tags($_POST['MID']) : ''; // merchant id
|
||||||
|
|||||||
@ -698,6 +698,10 @@ if(! $result || ! (isset($exists_order['od_id']) && $od_id && $exists_order['od_
|
|||||||
case 'inicis':
|
case 'inicis':
|
||||||
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
||||||
break;
|
break;
|
||||||
|
case 'nicepay':
|
||||||
|
$cancelAmt = (int)$pg_price;
|
||||||
|
include G5_SHOP_PATH.'/nicepay/cancel_process.php';
|
||||||
|
break;
|
||||||
case 'KAKAOPAY':
|
case 'KAKAOPAY':
|
||||||
$_REQUEST['TID'] = $tno;
|
$_REQUEST['TID'] = $tno;
|
||||||
$_REQUEST['Amt'] = $amount;
|
$_REQUEST['Amt'] = $amount;
|
||||||
@ -756,6 +760,10 @@ if(!$result) {
|
|||||||
case 'inicis':
|
case 'inicis':
|
||||||
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
||||||
break;
|
break;
|
||||||
|
case 'nicepay':
|
||||||
|
$cancelAmt = (int)$pg_price;
|
||||||
|
include G5_SHOP_PATH.'/nicepay/cancel_process.php';
|
||||||
|
break;
|
||||||
case 'KAKAOPAY':
|
case 'KAKAOPAY':
|
||||||
$_REQUEST['TID'] = $tno;
|
$_REQUEST['TID'] = $tno;
|
||||||
$_REQUEST['Amt'] = $amount;
|
$_REQUEST['Amt'] = $amount;
|
||||||
|
|||||||
@ -36,8 +36,6 @@ try{
|
|||||||
'CharSet' => 'utf-8'
|
'CharSet' => 'utf-8'
|
||||||
);
|
);
|
||||||
|
|
||||||
if (function_exists('add_log')) add_log($data);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
****************************************************************************************
|
****************************************************************************************
|
||||||
* <Cancel Request>
|
* <Cancel Request>
|
||||||
@ -46,9 +44,6 @@ try{
|
|||||||
$response = nicepay_reqPost($data, "https://pg-api.nicepay.co.kr/webapi/cancel_process.jsp"); //Cancel API call
|
$response = nicepay_reqPost($data, "https://pg-api.nicepay.co.kr/webapi/cancel_process.jsp"); //Cancel API call
|
||||||
|
|
||||||
$result = json_decode($response, true);
|
$result = json_decode($response, true);
|
||||||
|
|
||||||
if (function_exists('add_log')) add_log(array('1'=>1));
|
|
||||||
if (function_exists('add_log')) add_log($result, true, 'cc');
|
|
||||||
|
|
||||||
}catch(Exception $e){
|
}catch(Exception $e){
|
||||||
$e->getMessage();
|
$e->getMessage();
|
||||||
|
|||||||
@ -12,8 +12,6 @@ if (! ($default['de_pg_service'] == 'nicepay' && $orderNumber)){
|
|||||||
die(json_encode(array('error'=>'올바른 방법으로 이용해 주십시오.')));
|
die(json_encode(array('error'=>'올바른 방법으로 이용해 주십시오.')));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (function_exists('add_log')) add_log($_POST, false, 'ajax');
|
|
||||||
|
|
||||||
$price = preg_replace('#[^0-9]#', '', $_POST['price']);
|
$price = preg_replace('#[^0-9]#', '', $_POST['price']);
|
||||||
|
|
||||||
if (strlen($price) < 1) {
|
if (strlen($price) < 1) {
|
||||||
|
|||||||
@ -5,6 +5,11 @@ if($od['od_pg'] != 'nicepay') return;
|
|||||||
|
|
||||||
include_once(G5_SHOP_PATH.'/settle_nicepay.inc.php');
|
include_once(G5_SHOP_PATH.'/settle_nicepay.inc.php');
|
||||||
|
|
||||||
|
if (!$escrow_numb) {
|
||||||
|
// 송장번호가 없으면 등록이 안된다.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$mid = $default['de_nicepay_mid'];
|
$mid = $default['de_nicepay_mid'];
|
||||||
$tid = $escrow_tno; // 거래 번호
|
$tid = $escrow_tno; // 거래 번호
|
||||||
$reqType = '03'; // 요청타입 (배송등록 03)
|
$reqType = '03'; // 요청타입 (배송등록 03)
|
||||||
@ -45,8 +50,6 @@ $response = nicepay_reqPost($data, $escrowRequestURL);
|
|||||||
|
|
||||||
$nice_result = json_decode($response, true);
|
$nice_result = json_decode($response, true);
|
||||||
|
|
||||||
if (function_exists('add_log')) add_log($nice_result, true, 'es');
|
|
||||||
|
|
||||||
// 성공이면
|
// 성공이면
|
||||||
if (isset($nice_result['ResultCode']) && $nice_result['ResultCode'] === 'C000') {
|
if (isset($nice_result['ResultCode']) && $nice_result['ResultCode'] === 'C000') {
|
||||||
|
|
||||||
@ -71,7 +74,4 @@ if (isset($nice_result['ResultCode']) && $nice_result['ResultCode'] === 'C000')
|
|||||||
$resultCode = $nice_result['ResultCode']; // 결과코드 ("00"이면 지불 성공)
|
$resultCode = $nice_result['ResultCode']; // 결과코드 ("00"이면 지불 성공)
|
||||||
$resultMsg = $nice_result['ResultMsg']; // 결과내용 (지불결과에 대한 설명)
|
$resultMsg = $nice_result['ResultMsg']; // 결과내용 (지불결과에 대한 설명)
|
||||||
$dlv_date = $nice_result['ProcessDate'];
|
$dlv_date = $nice_result['ProcessDate'];
|
||||||
$dlv_time = $nice_result['ProcessTime'];
|
$dlv_time = $nice_result['ProcessTime'];
|
||||||
|
|
||||||
echo "에스크로배송";
|
|
||||||
exit;
|
|
||||||
@ -4,8 +4,6 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
|||||||
// 나이스페이 공통 설정
|
// 나이스페이 공통 설정
|
||||||
require_once(G5_SHOP_PATH.'/settle_nicepay.inc.php');
|
require_once(G5_SHOP_PATH.'/settle_nicepay.inc.php');
|
||||||
|
|
||||||
if (function_exists('add_log')) add_log($_POST);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
****************************************************************************************
|
****************************************************************************************
|
||||||
* <Authentication Result Parameter>
|
* <Authentication Result Parameter>
|
||||||
@ -113,8 +111,6 @@ if($authResultCode === "0000"){
|
|||||||
}
|
}
|
||||||
|
|
||||||
$respArr = json_decode($response, true);
|
$respArr = json_decode($response, true);
|
||||||
|
|
||||||
if (function_exists('add_log')) add_log($respArr);
|
|
||||||
|
|
||||||
$ResultCode = nicepay_res('ResultCode', $respArr);
|
$ResultCode = nicepay_res('ResultCode', $respArr);
|
||||||
$ResultMsg = nicepay_res('ResultMsg', $respArr);
|
$ResultMsg = nicepay_res('ResultMsg', $respArr);
|
||||||
|
|||||||
@ -84,8 +84,6 @@ $response = nicepay_reqPost($data, "https://pg-api.nicepay.co.kr/webapi/cash_rec
|
|||||||
|
|
||||||
$result = json_decode($response, true);
|
$result = json_decode($response, true);
|
||||||
|
|
||||||
if (function_exists('add_log')) add_log($result, true, 'rr');
|
|
||||||
|
|
||||||
// 성공이면
|
// 성공이면
|
||||||
if (isset($result['ResultCode']) && $result['ResultCode'] === '7001') {
|
if (isset($result['ResultCode']) && $result['ResultCode'] === '7001') {
|
||||||
|
|
||||||
|
|||||||
@ -652,6 +652,10 @@ if(! $result || ! (isset($exists_order['od_id']) && $od_id && $exists_order['od_
|
|||||||
case 'inicis':
|
case 'inicis':
|
||||||
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
||||||
break;
|
break;
|
||||||
|
case 'nicepay':
|
||||||
|
$cancelAmt = (int)$pg_price;
|
||||||
|
include G5_SHOP_PATH.'/nicepay/cancel_process.php';
|
||||||
|
break;
|
||||||
case 'KAKAOPAY':
|
case 'KAKAOPAY':
|
||||||
$_REQUEST['TID'] = $tno;
|
$_REQUEST['TID'] = $tno;
|
||||||
$_REQUEST['Amt'] = $amount;
|
$_REQUEST['Amt'] = $amount;
|
||||||
@ -707,6 +711,10 @@ if(!$result) {
|
|||||||
case 'inicis':
|
case 'inicis':
|
||||||
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
||||||
break;
|
break;
|
||||||
|
case 'nicepay':
|
||||||
|
$cancelAmt = (int)$pg_price;
|
||||||
|
include G5_SHOP_PATH.'/nicepay/cancel_process.php';
|
||||||
|
break;
|
||||||
case 'KAKAOPAY':
|
case 'KAKAOPAY':
|
||||||
$_REQUEST['TID'] = $tno;
|
$_REQUEST['TID'] = $tno;
|
||||||
$_REQUEST['Amt'] = $amount;
|
$_REQUEST['Amt'] = $amount;
|
||||||
|
|||||||
@ -1,8 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
include_once('./_common.php');
|
include_once('./_common.php');
|
||||||
|
|
||||||
if (function_exists('add_log')) add_log($_POST, false, 'vv');
|
|
||||||
|
|
||||||
$NICEPAY_log_path = G5_DATA_PATH.'/log'; // 나이스페이 가상계좌 로그저장 경로
|
$NICEPAY_log_path = G5_DATA_PATH.'/log'; // 나이스페이 가상계좌 로그저장 경로
|
||||||
$NICEPAY_payLog = false; // 로그를 기록하려면 true 로 수정
|
$NICEPAY_payLog = false; // 로그를 기록하려면 true 로 수정
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user