From 544b4de21db1b0a992ac921d5d0f79441448678d Mon Sep 17 00:00:00 2001 From: chicpro Date: Wed, 16 Sep 2015 11:04:57 +0900 Subject: [PATCH 1/4] =?UTF-8?q?=EC=B9=B4=EC=B9=B4=EC=98=A4=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=20=EA=B2=B0=EC=A0=9C=EC=9A=94=EC=B2=AD=20=EB=A0=88?= =?UTF-8?q?=EC=9D=B4=EC=96=B4=20=EC=9C=84=EC=B9=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shop/kakaopay/orderform.3.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/shop/kakaopay/orderform.3.php b/shop/kakaopay/orderform.3.php index 24c25e0b4..21e0a3531 100644 --- a/shop/kakaopay/orderform.3.php +++ b/shop/kakaopay/orderform.3.php @@ -3,4 +3,8 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 ?> - \ No newline at end of file + \ No newline at end of file From 8b84b0c6bad022c0e4f7c560a8e8b039d2deeede Mon Sep 17 00:00:00 2001 From: chicpro Date: Wed, 16 Sep 2015 11:46:48 +0900 Subject: [PATCH 2/4] =?UTF-8?q?=EB=AA=85=EC=B9=AD=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/shop_admin/configform.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adm/shop_admin/configform.php b/adm/shop_admin/configform.php index 3c9d34505..94c346f27 100644 --- a/adm/shop_admin/configform.php +++ b/adm/shop_admin/configform.php @@ -691,7 +691,7 @@ if(!isset($default['de_kakaopay_mid'])) { - + 카카오페이 서비스신청하기 @@ -700,7 +700,7 @@ if(!isset($default['de_kakaopay_mid'])) { - + From 3dc5c19148f4b0cee41570b5f189bfc88d7d7fbc Mon Sep 17 00:00:00 2001 From: chicpro Date: Wed, 16 Sep 2015 12:01:54 +0900 Subject: [PATCH 3/4] =?UTF-8?q?=EB=A1=9C=EA=B7=B8=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EB=AF=BC=EA=B0=90=EC=A0=95=EB=B3=B4=20=EA=B8=B0=EB=A1=9D?= =?UTF-8?q?=ED=95=98=EC=A7=80=20=EC=95=8A=EB=8F=84=EB=A1=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shop/kakaopay/lgcns_CNSpay.php | 4 ++++ shop/kakaopay/lgcns_KMpay.php | 29 ++++++++++++++++------------- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/shop/kakaopay/lgcns_CNSpay.php b/shop/kakaopay/lgcns_CNSpay.php index 455e37f18..80ebbf25f 100644 --- a/shop/kakaopay/lgcns_CNSpay.php +++ b/shop/kakaopay/lgcns_CNSpay.php @@ -395,9 +395,13 @@ } public function writeLog($strLogText) { $log_string = ""; + $exclude = array('MID', 'merchantEncKey', 'merchantHashKey', 'CancelPwd'); if (is_array($strLogText)) { $log_string = "[".date("Y/m/d H:i:s")."] \r\n"; foreach (array_keys($strLogText) as $key) { + if(in_array($key, $exclude)) + continue; + $log_string = $log_string." [".$key."] => ".$strLogText[$key]."\r\n"; } } else { diff --git a/shop/kakaopay/lgcns_KMpay.php b/shop/kakaopay/lgcns_KMpay.php index 490df1b8e..534b77603 100644 --- a/shop/kakaopay/lgcns_KMpay.php +++ b/shop/kakaopay/lgcns_KMpay.php @@ -16,7 +16,7 @@ } public function setPhpVersion($version) { $this->phpVersion = $version; - } + } public function parameterEncrypt($key, $plainText) { try { $encryptText = ""; @@ -141,6 +141,9 @@ if (is_array($strLogText)) { $log_string = "[".date("Y/m/d H:i:s")."] \r\n"; foreach (array_keys($strLogText) as $key) { + if($key == 'MERCHANT_ID') + continue; + $log_string = $log_string." [".$key."] => ".$strLogText[$key]."\r\n"; } } else { @@ -243,7 +246,7 @@ fclose($log_file); } } - + class KMPayDataValidator { public $resultValid = ""; public function KMPayDataValidator($value) { @@ -268,7 +271,7 @@ $amount = $this->getValueFromArray($value, "AMOUNT"); $currency = $this->getValueFromArray($value, "CURRENCY"); $returnUrl = $this->getValueFromArray($value, "RETURN_URL"); - + //추가정보 $cardMerchantNum = $this->getValueFromArray($value, "CARD_MERCHANT_NUM"); $supplyAmt = $this->getValueFromArray($value, "SUPPLY_AMT"); @@ -279,8 +282,8 @@ $certifiedFlag = $this->getValueFromArray($value, "CERTIFIED_FLAG"); $offerPeriodFlag = $this->getValueFromArray($value, "OFFER_PERIOD_FLAG"); $offerPeriod = $this->getValueFromArray($value, "OFFER_PERIOD"); - - + + if (strlen($certifiedFlag) == 0) { $certifiedFlag = "N"; } @@ -293,7 +296,7 @@ if (strlen($cancelTime) == 0) { $cancelTime = "1440"; } - + //필수 if (strlen($prType) == 0) { return "USER_ERROR_CODE,804,결제요청타입은 필수입력사항 입니다."; @@ -315,7 +318,7 @@ else if (strlen($merchantTxnNum) > 40) { return "USER_ERROR_CODE,824,가맹점 거래번호의 제한 길이가 초과 되었습니다."; } - + if (strlen($productName) == 0) { return "USER_ERROR_CODE,809,상품명은 필수입력사항 입니다."; } @@ -333,18 +336,18 @@ if (strlen($currency) == 0) { return "USER_ERROR_CODE,813,거래통화는 필수입력사항 입니다."; } - + if ($certifiedFlag == "CN") { //웹결제에서는 필수체크 안함 } else if (strlen($certifiedFlag) == 0) { return "USER_ERROR_CODE,830,결제승인결과전송URL은 필수입력사항 입니다."; } - + if (strlen($cardMerchantNum) > 0 && !is_numeric($cardMerchantNum)) { return "USER_ERROR_CODE,814,카드 가맹점 번호는 숫자형입니다."; } - + if (strlen($supplyAmt) > 0 && !is_numeric($supplyAmt)) { return "USER_ERROR_CODE,815,공급가액은 숫자형입니다."; } @@ -360,7 +363,7 @@ if (strlen($cancelTime) > 0 && !is_numeric($cancelTime)) { return "USER_ERROR_CODE,818,결제취소시간(분)은 숫자형입니다."; } - + if (strlen($fixedInt) == 0) { // 정상 } @@ -370,11 +373,11 @@ else if (!((0 <= intval($fixedInt) && intval($fixedInt) <= 24) || $fixedInt == "36")) { return "USER_ERROR_CODE,820,고정할부개월이 잘못되었습니다."; } - + if ($certifiedFlag != "N" && $certifiedFlag != "CN") { return "USER_ERROR_CODE,831,가맹점 인증 구분값은 N 혹은 CN 입니다"; } - + return ""; } } From cf915e2fa7cd0c34cc49f425527699ffdf557820 Mon Sep 17 00:00:00 2001 From: chicpro Date: Wed, 16 Sep 2015 12:09:19 +0900 Subject: [PATCH 4/4] =?UTF-8?q?log=20=ED=8F=B4=EB=8D=94=20=EA=B6=8C?= =?UTF-8?q?=ED=95=9C=20=EC=B2=B4=ED=81=AC=20=EC=BD=94=EB=93=9C=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/shop_admin/configform.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/adm/shop_admin/configform.php b/adm/shop_admin/configform.php index 94c346f27..7a5c3c691 100644 --- a/adm/shop_admin/configform.php +++ b/adm/shop_admin/configform.php @@ -1593,6 +1593,23 @@ if($default['de_iche_use'] || $default['de_vbank_use'] || $default['de_hp_use'] } } } + + // 카카오페이의 경우 log 디렉토리 체크 + if($default['de_kakaopay_mid'] && $default['de_kakaopay_key'] && $default['de_kakaopay_enckey'] && $default['de_kakaopay_hashkey'] && $default['de_kakaopay_cancelpwd']) { + $log_path = G5_SHOP_PATH.'/kakaopay/log'; + + if(!is_dir($log_path)) { + echo ''.PHP_EOL; + } else { + if(!is_writable($log_path)) { + echo ''.PHP_EOL; + } + } + } } include_once (G5_ADMIN_PATH.'/admin.tail.php');