diff --git a/shop/inicis/inistdpay_result.php b/shop/inicis/inistdpay_result.php
index 96feac3a0..d81e12016 100644
--- a/shop/inicis/inistdpay_result.php
+++ b/shop/inicis/inistdpay_result.php
@@ -3,9 +3,12 @@ include_once('./_common.php');
include_once(G5_SHOP_PATH.'/settle_inicis.inc.php');
require_once(G5_SHOP_PATH.'/inicis/libs/HttpClient.php');
require_once(G5_SHOP_PATH.'/inicis/libs/json_lib.php');
+require_once(G5_SHOP_PATH.'/inicis/libs/properties.php');
$inicis_pay_result = false;
+$prop = new properties();
+
try {
//#############################
@@ -37,6 +40,18 @@ try {
///$mKey = $util->makeHash(signKey, "sha256"); // 가맹점 확인을 위한 signKey를 해시값으로 변경 (SHA-256방식 사용)
$mKey = hash("sha256", $signKey);
+ //##########################################################################
+ // 승인요청 API url (authUrl) 리스트 는 properties 에 세팅하여 사용합니다.
+ // idc_name 으로 수신 받은 센터 네임을 properties 에서 include 하여 승인요청하시면 됩니다.
+ //##########################################################################
+ $idc_name = $_REQUEST["idc_name"];
+ $authUrl = $prop->getAuthUrl($idc_name);
+
+ if (strcmp($authUrl, $_REQUEST["authUrl"]) != 0) {
+
+ die("authUrl check Fail\n");
+ }
+
//#####################
// 2.signature 생성
//#####################
@@ -172,22 +187,28 @@ try {
//#####################
$netcancelResultString = ""; // 망취소 요청 API url(고정, 임의 세팅 금지)
- if ($httpUtil->processHTTP($netCancel, $authMap)) {
- $netcancelResultString = $httpUtil->body;
- } else {
- echo "Http Connect Error\n";
- echo $httpUtil->errormsg;
+ $netCancel = $prop->getNetCancel($idc_name);
+
+ if (strcmp($netCancel, $_REQUEST["netCancelUrl"]) == 0) {
+
+ if ($httpUtil->processHTTP($netCancel, $authMap)) {
+ $netcancelResultString = $httpUtil->body;
+ } else {
+ echo "Http Connect Error\n";
+ echo $httpUtil->errormsg;
- throw new Exception("Http Connect Error");
+ throw new Exception("Http Connect Error");
+ }
+
+ echo "
## 망취소 API 결과 ##
";
+
+ /*##XML output##*/
+ //$netcancelResultString = str_replace("<", "<", $$netcancelResultString);
+ //$netcancelResultString = str_replace(">", ">", $$netcancelResultString);
+
+ // 취소 결과 확인
+ echo "
". $netcancelResultString . "
"; } - - echo "## 망취소 API 결과 ##"; - - $netcancelResultString = str_replace("<", "<", $$netcancelResultString); - $netcancelResultString = str_replace(">", ">", $$netcancelResultString); - - echo "", $netcancelResultString . ""; - // 취소 결과 확인 } } else { diff --git a/shop/settle_inicis.inc.php b/shop/settle_inicis.inc.php index 2de141225..829b2e865 100644 --- a/shop/settle_inicis.inc.php +++ b/shop/settle_inicis.inc.php @@ -57,7 +57,7 @@ $cardQuotaBase = '2:3:4:5:6:7:8:9:10:11:12'; // 가맹점에서 사용할 할 $inicis_cardpoint = $default['de_inicis_cartpoint_use'] ? ':cardpoint' : ''; //신용카드 포인트 결제에 관한 옵션 ( 신청해야 함 ) -$acceptmethod = 'HPP(2):no_receipt:vbank('.date('Ymd', strtotime("+3 days", G5_SERVER_TIME)).'):below1000'.$useescrow.$inicis_cardpoint; +$acceptmethod = 'HPP(2):no_receipt:vbank('.date('Ymd', strtotime("+3 days", G5_SERVER_TIME)).'):below1000:centerCd(Y)'.$useescrow.$inicis_cardpoint; /* 기타 */ $siteDomain = G5_SHOP_URL.'/inicis'; //가맹점 도메인 입력