이니시스 모듈 추가 및 모바일 결제 기능 개선
This commit is contained in:
29
shop/ajax.orderdatasave.php
Normal file
29
shop/ajax.orderdatasave.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
if(empty($_POST))
|
||||
die('정보가 넘어오지 않았습니다.');
|
||||
|
||||
if(isset($_POST['pp_id']) && $_POST['pp_id'])
|
||||
$od_id = get_session('ss_personalpay_id');
|
||||
else
|
||||
$od_id = get_session('ss_order_id');
|
||||
|
||||
// 일정 기간이 경과된 임시 데이터 삭제
|
||||
$limit_time = date("Y-m-d H:i:s", (G5_SERVER_TIME - 86400 * 1));
|
||||
$sql = " delete from {$g5['g5_shop_order_data_table']} where dt_time < '$limit_time' ";
|
||||
sql_query($sql);
|
||||
|
||||
$_POST['sw_direct'] = get_session('ss_direct');
|
||||
|
||||
$dt_data = serialize($_POST);
|
||||
|
||||
$sql = " insert into {$g5['g5_shop_order_data_table']}
|
||||
set od_id = '$od_id',
|
||||
dt_pg = '{$default['de_pg_service']}',
|
||||
dt_data = '$dt_data',
|
||||
dt_time = '".G5_TIME_YMDHIS."' ";
|
||||
sql_query($sql);
|
||||
|
||||
die('');
|
||||
?>
|
||||
3
shop/inicis/_common.php
Normal file
3
shop/inicis/_common.php
Normal file
@ -0,0 +1,3 @@
|
||||
<?php
|
||||
include_once('../../common.php');
|
||||
?>
|
||||
65
shop/inicis/encryptdata.php
Normal file
65
shop/inicis/encryptdata.php
Normal file
@ -0,0 +1,65 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
include_once(G5_LIB_PATH.'/json.lib.php');
|
||||
include_once(G5_SHOP_PATH.'/settle_inicis.inc.php');
|
||||
|
||||
$price = trim($_POST['price']);
|
||||
|
||||
/**************************
|
||||
* 3. 암호화 대상/값 설정 *
|
||||
**************************/
|
||||
$inipay->SetField("type", "chkfake"); // 고정 (절대 수정 불가)
|
||||
$inipay->SetField("enctype","asym"); //asym:비대칭, symm:대칭(현재 asym으로 고정)
|
||||
/**************************************************************************************************
|
||||
* admin 은 키패스워드 변수명입니다. 수정하시면 안됩니다. 1111의 부분만 수정해서 사용하시기 바랍니다.
|
||||
* 키패스워드는 상점관리자 페이지(https://iniweb.inicis.com)의 비밀번호가 아닙니다. 주의해 주시기 바랍니다.
|
||||
* 키패스워드는 숫자 4자리로만 구성됩니다. 이 값은 키파일 발급시 결정됩니다.
|
||||
* 키패스워드 값을 확인하시려면 상점측에 발급된 키파일 안의 readme.txt 파일을 참조해 주십시오.
|
||||
**************************************************************************************************/
|
||||
$inipay->SetField("admin", $default['de_inicis_admin_key']); // 키패스워드(키발급시 생성, 상점관리자 패스워드와 상관없음)
|
||||
$inipay->SetField("checkopt", "false"); //base64함:false, base64안함:true(현재 false로 고정)
|
||||
|
||||
//필수항목 : mid, price, nointerest, quotabase
|
||||
//추가가능 : INIregno, oid
|
||||
//*주의* : 추가가능한 항목중 암호화 대상항목에 추가한 필드는 반드시 hidden 필드에선 제거하고
|
||||
// SESSION이나 DB를 이용해 다음페이지(INIsecureresult.php)로 전달/셋팅되어야 합니다.
|
||||
$inipay->SetField("mid", $default['de_inicis_mid']); // 상점아이디
|
||||
$inipay->SetField("price", $price); // 가격
|
||||
$inipay->SetField("nointerest", $inipay_nointerest); // 무이자여부(no:일반, yes:무이자)
|
||||
$inipay->SetField("quotabase", $inipay_quotabase);//할부기간
|
||||
|
||||
/********************************
|
||||
* 4. 암호화 대상/값을 암호화함 *
|
||||
********************************/
|
||||
$inipay->startAction();
|
||||
|
||||
/*********************
|
||||
* 5. 암호화 결과 *
|
||||
*********************/
|
||||
if( $inipay->GetResult("ResultCode") != "00" )
|
||||
{
|
||||
die('{"error":"'.$inipay->GetResult("ResultMsg").'"}');
|
||||
}
|
||||
|
||||
/*********************
|
||||
* 6. 세션정보 저장 *
|
||||
*********************/
|
||||
set_session('INI_MID', $default['de_inicis_mid']); //상점ID
|
||||
set_session('INI_ADMIN', $default['de_inicis_admin_key']); // 키패스워드(키발급시 생성, 상점관리자 패스워드와 상관없음)
|
||||
set_session('INI_PRICE', $price); //가격
|
||||
set_session('INI_RN', $inipay->GetResult("rn")); //고정 (절대 수정 불가)
|
||||
set_session('INI_ENCTYPE', $inipay->GetResult("enctype")); //고정 (절대 수정 불가)
|
||||
|
||||
$ini_encfield = $inipay->GetResult("encfield");
|
||||
$ini_certid = $inipay->GetResult("certid");
|
||||
|
||||
$result = array(
|
||||
'error' => '',
|
||||
'ini_encfield' => $ini_encfield,
|
||||
'ini_certid' => $ini_certid
|
||||
);
|
||||
|
||||
die(json_encode($result));
|
||||
|
||||
//die('{"error":"", "ini_encfield":"'.$ini_encfield.'", "ini_certid":"'.$ini_certid.'"}');
|
||||
?>
|
||||
115
shop/inicis/escrow.register.php
Normal file
115
shop/inicis/escrow.register.php
Normal file
@ -0,0 +1,115 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
if($od['od_pg'] != 'inicis') return;
|
||||
|
||||
include_once(G5_SHOP_PATH.'/settle_inicis.inc.php');
|
||||
|
||||
$oid = $od['od_id'];
|
||||
$EscrowType = 'I';
|
||||
$invoice = $escrow_numb;
|
||||
$dlv_charge = 'SH'; // 배송비 지급형태 (SH : 판매자부담, BH : 구매자부담)
|
||||
$sendName = iconv_euckr($od['od_name']);
|
||||
$sendPost = $od['od_zip1'].$od['od_zip2'];
|
||||
$sendAddr1 = iconv_euckr($od['od_addr1']);
|
||||
$sendAddr2 = iconv_euckr($od['od_addr2']);
|
||||
$sendTel = $od['od_tel'];
|
||||
$recvName = iconv_euckr($od['od_b_name']);
|
||||
$recvPost = $od['od_b_zip1'].$od['od_b_zip2'];
|
||||
$recvAddr = iconv_euckr($od['od_b_addr1'].($od['od_b_addr2'] ? ' ' : '').$od['od_b_addr2']);
|
||||
$recvTel = $od['od_b_tel'];
|
||||
$price = $od['od_receipt_price'];
|
||||
|
||||
// 택배회사 코드
|
||||
$exCode = array(
|
||||
'대한통운' => 'korex',
|
||||
'아주택배' => 'ajutb',
|
||||
'KT로지스' => 'ktlogistics',
|
||||
'현대택배' => 'hyundai',
|
||||
'CJ대한통운' => 'cjgls',
|
||||
'한진택배' => 'hanjin',
|
||||
'트라넷' => 'tranet',
|
||||
'하나로택배' => 'Hanaro',
|
||||
'사가와익스프레스' => 'Sagawa',
|
||||
'SEDEX' => 'sedex',
|
||||
'KGB택배' => 'kgbls',
|
||||
'로젠택배' => 'kgb',
|
||||
'KG옐로우캡택배' => 'yellow',
|
||||
'삼성HTH' => 'hth',
|
||||
'동부택배' => 'dongbu',
|
||||
'우체국' => 'EPOST',
|
||||
'우편등기' => 'registpost',
|
||||
'기타택배' => '9999'
|
||||
);
|
||||
|
||||
$dlv_exName = $escrow_corp;
|
||||
$dlv_exCode = $exCode[$dlv_exName];
|
||||
if(!$dlv_exCode)
|
||||
$dlv_exCode = '9999';
|
||||
|
||||
/*********************
|
||||
* 3. 지불 정보 설정 *
|
||||
*********************/
|
||||
$inipay->SetField("tid", $escrow_tno); // 거래아이디
|
||||
$inipay->SetField("mid", $default['de_inicis_mid']); // 상점아이디
|
||||
/**************************************************************************************************
|
||||
* admin 은 키패스워드 변수명입니다. 수정하시면 안됩니다. 1111의 부분만 수정해서 사용하시기 바랍니다.
|
||||
* 키패스워드는 상점관리자 페이지(https://iniweb.inicis.com)의 비밀번호가 아닙니다. 주의해 주시기 바랍니다.
|
||||
* 키패스워드는 숫자 4자리로만 구성됩니다. 이 값은 키파일 발급시 결정됩니다.
|
||||
* 키패스워드 값을 확인하시려면 상점측에 발급된 키파일 안의 readme.txt 파일을 참조해 주십시오.
|
||||
**************************************************************************************************/
|
||||
$inipay->SetField("admin", $default['de_inicis_admin_key']); // 키패스워드(상점아이디에 따라 변경)
|
||||
$inipay->SetField("type", "escrow"); // 고정 (절대 수정 불가)
|
||||
$inipay->SetField("escrowtype", "dlv"); // 고정 (절대 수정 불가)
|
||||
$inipay->SetField("dlv_ip", getenv("REMOTE_ADDR")); // 고정
|
||||
|
||||
$inipay->SetField("oid", $oid);
|
||||
$inipay->SetField("soid", "1");
|
||||
//$inipay->SetField("dlv_date", $dlv_date);
|
||||
//$inipay->SetField("dlv_time", $dlv_time);
|
||||
$inipay->SetField("dlv_report", $EscrowType);
|
||||
$inipay->SetField("dlv_invoice", $invoice);
|
||||
$inipay->SetField("dlv_name", $member['mb_id']);
|
||||
|
||||
$inipay->SetField("dlv_excode", $dlv_exCode);
|
||||
$inipay->SetField("dlv_exname", $dlv_exName);
|
||||
$inipay->SetField("dlv_charge", $dlv_charge);
|
||||
|
||||
$inipay->SetField("dlv_invoiceday", G5_TIME_YMDHIS);
|
||||
$inipay->SetField("dlv_sendname", $sendName);
|
||||
$inipay->SetField("dlv_sendpost", $sendPost);
|
||||
$inipay->SetField("dlv_sendaddr1", $sendAddr1);
|
||||
$inipay->SetField("dlv_sendaddr2", $sendAddr2);
|
||||
$inipay->SetField("dlv_sendtel", $sendTel);
|
||||
|
||||
$inipay->SetField("dlv_recvname", $recvName);
|
||||
$inipay->SetField("dlv_recvpost", $recvPost);
|
||||
$inipay->SetField("dlv_recvaddr", $recvAddr);
|
||||
$inipay->SetField("dlv_recvtel", $recvTel);
|
||||
|
||||
$inipay->SetField("dlv_goodscode", $goodsCode);
|
||||
$inipay->SetField("dlv_goods", $goods);
|
||||
$inipay->SetField("dlv_goodscnt", $goodCnt);
|
||||
$inipay->SetField("price", $price);
|
||||
$inipay->SetField("dlv_reserved1", $reserved1);
|
||||
$inipay->SetField("dlv_reserved2", $reserved2);
|
||||
$inipay->SetField("dlv_reserved3", $reserved3);
|
||||
|
||||
$inipay->SetField("pgn", $pgn);
|
||||
|
||||
/*********************
|
||||
* 3. 배송 등록 요청 *
|
||||
*********************/
|
||||
$inipay->startAction();
|
||||
|
||||
|
||||
/**********************
|
||||
* 4. 배송 등록 결과 *
|
||||
**********************/
|
||||
|
||||
$tid = $inipay->GetResult("tid"); // 거래번호
|
||||
$resultCode = $inipay->GetResult("ResultCode"); // 결과코드 ("00"이면 지불 성공)
|
||||
$resultMsg = $inipay->GetResult("ResultMsg"); // 결과내용 (지불결과에 대한 설명)
|
||||
$dlv_date = $inipay->GetResult("DLV_Date");
|
||||
$dlv_time = $inipay->GetResult("DLV_Time");
|
||||
?>
|
||||
29
shop/inicis/inipay_cancel.php
Normal file
29
shop/inicis/inipay_cancel.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
/*******************************************************************
|
||||
* 7. DB연동 실패 시 강제취소 *
|
||||
* *
|
||||
* 지불 결과를 DB 등에 저장하거나 기타 작업을 수행하다가 실패하는 *
|
||||
* 경우, 아래의 코드를 참조하여 이미 지불된 거래를 취소하는 코드를 *
|
||||
* 작성합니다. *
|
||||
*******************************************************************/
|
||||
|
||||
$cancelFlag = "true";
|
||||
|
||||
// $cancelFlag를 "ture"로 변경하는 condition 판단은 개별적으로
|
||||
// 수행하여 주십시오.
|
||||
|
||||
if($cancelFlag == "true")
|
||||
{
|
||||
$TID = $inipay->GetResult("TID");
|
||||
$inipay->SetField("type", "cancel"); // 고정
|
||||
$inipay->SetField("tid", $TID); // 고정
|
||||
$inipay->SetField("cancelmsg", "DB FAIL"); // 취소사유
|
||||
$inipay->startAction();
|
||||
if($inipay->GetResult('ResultCode') == "00")
|
||||
{
|
||||
$inipay->MakeTXErrMsg(MERCHANT_DB_ERR,"Merchant DB FAIL");
|
||||
}
|
||||
}
|
||||
?>
|
||||
216
shop/inicis/inipay_result.php
Normal file
216
shop/inicis/inipay_result.php
Normal file
@ -0,0 +1,216 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
/* INIsecureresult.php
|
||||
*
|
||||
* 이니페이 플러그인을 통해 요청된 지불을 처리한다.
|
||||
* 지불 요청을 처리한다.
|
||||
* 코드에 대한 자세한 설명은 매뉴얼을 참조하십시오.
|
||||
* <주의> 구매자의 세션을 반드시 체크하도록하여 부정거래를 방지하여 주십시요.
|
||||
*
|
||||
* http://www.inicis.com
|
||||
* Copyright (C) 2006 Inicis Co., Ltd. All rights reserved.
|
||||
*/
|
||||
|
||||
include_once(G5_SHOP_PATH.'/settle_inicis.inc.php');
|
||||
|
||||
/*********************
|
||||
* 3. 지불 정보 설정 *
|
||||
*********************/
|
||||
if($default['de_tax_flag_use']) { // 복합과세 사용 때
|
||||
$inipay->SetXPath("INIpay/GoodsInfo/Tax", $_POST['comm_vat_mny']); // 부가세 금액
|
||||
$inipay->SetXPath("INIpay/GoodsInfo/TaxFree", $_POST['comm_free_mny']); // 면세 금액
|
||||
}
|
||||
$inipay->SetField("type", "securepay"); // 고정 (절대 수정 불가)
|
||||
$inipay->SetField("pgid", "INIphp".$pgid); // 고정 (절대 수정 불가)
|
||||
$inipay->SetField("subpgip", "203.238.3.10"); // 고정 (절대 수정 불가)
|
||||
$inipay->SetField("admin", get_session('INI_ADMIN')); // 키패스워드(상점아이디에 따라 변경)
|
||||
$inipay->SetField("uid", $uid); // INIpay User ID (절대 수정 불가)
|
||||
$inipay->SetField("goodname", iconv_euckr($goodname)); // 상품명
|
||||
$inipay->SetField("currency", $currency); // 화폐단위
|
||||
|
||||
$inipay->SetField("mid", get_session('INI_MID')); // 상점아이디
|
||||
$inipay->SetField("rn", get_session('INI_RN')); // 웹페이지 위변조용 RN값
|
||||
$inipay->SetField("price", get_session('INI_PRICE')); // 가격
|
||||
$inipay->SetField("enctype", get_session('INI_ENCTYPE')); // 고정 (절대 수정 불가)
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------------------
|
||||
price 등의 중요데이터는
|
||||
브라우저상의 위변조여부를 반드시 확인하셔야 합니다.
|
||||
|
||||
결제 요청페이지에서 요청된 금액과
|
||||
실제 결제가 이루어질 금액을 반드시 비교하여 처리하십시오.
|
||||
|
||||
설치 메뉴얼 2장의 결제 처리페이지 작성부분의 보안경고 부분을 확인하시기 바랍니다.
|
||||
적용참조문서: 이니시스홈페이지->가맹점기술지원자료실->기타자료실 의
|
||||
'결제 처리 페이지 상에 결제 금액 변조 유무에 대한 체크' 문서를 참조하시기 바랍니다.
|
||||
예제)
|
||||
원 상품 가격 변수를 OriginalPrice 하고 원 가격 정보를 리턴하는 함수를 Return_OrgPrice()라 가정하면
|
||||
다음 같이 적용하여 원가격과 웹브라우저에서 Post되어 넘어온 가격을 비교 한다.
|
||||
|
||||
$OriginalPrice = Return_OrgPrice();
|
||||
$PostPrice = $_SESSION['INI_PRICE'];
|
||||
if ( $OriginalPrice != $PostPrice )
|
||||
{
|
||||
//결제 진행을 중단하고 금액 변경 가능성에 대한 메시지 출력 처리
|
||||
//처리 종료
|
||||
}
|
||||
|
||||
----------------------------------------------------------------------------------------*/
|
||||
$inipay->SetField("buyername", iconv_euckr($buyername)); // 구매자 명
|
||||
$inipay->SetField("buyertel", $buyertel); // 구매자 연락처(휴대폰 번호 또는 유선전화번호)
|
||||
$inipay->SetField("buyeremail", $buyeremail); // 구매자 이메일 주소
|
||||
$inipay->SetField("paymethod", $paymethod); // 지불방법 (절대 수정 불가)
|
||||
$inipay->SetField("encrypted", $encrypted); // 암호문
|
||||
$inipay->SetField("sessionkey", $sessionkey); // 암호문
|
||||
$inipay->SetField("url", G5_URL); // 실제 서비스되는 상점 SITE URL로 변경할것
|
||||
$inipay->SetField("cardcode", $cardcode); // 카드코드 리턴
|
||||
$inipay->SetField("parentemail", $parentemail); // 보호자 이메일 주소(핸드폰 , 전화결제시에 14세 미만의 고객이 결제하면 부모 이메일로 결제 내용통보 의무, 다른결제 수단 사용시에 삭제 가능)
|
||||
|
||||
/*-----------------------------------------------------------------*
|
||||
* 수취인 정보 * *
|
||||
*-----------------------------------------------------------------*
|
||||
* 실물배송을 하는 상점의 경우에 사용되는 필드들이며 *
|
||||
* 아래의 값들은 INIsecurepay.html 페이지에서 포스트 되도록 *
|
||||
* 필드를 만들어 주도록 하십시요. *
|
||||
* 컨텐츠 제공업체의 경우 삭제하셔도 무방합니다. *
|
||||
*-----------------------------------------------------------------*/
|
||||
$inipay->SetField("recvname", iconv_euckr($recvname)); // 수취인 명
|
||||
$inipay->SetField("recvtel", $recvtel); // 수취인 연락처
|
||||
$inipay->SetField("recvaddr", iconv_euckr($recvaddr)); // 수취인 주소
|
||||
$inipay->SetField("recvpostnum", $recvpostnum); // 수취인 우편번호
|
||||
$inipay->SetField("recvmsg", $recvmsg); // 전달 메세지
|
||||
|
||||
$inipay->SetField("joincard", $joincard); // 제휴카드코드
|
||||
$inipay->SetField("joinexpire", $joinexpire); // 제휴카드유효기간
|
||||
$inipay->SetField("id_customer", $id_customer); //user_id
|
||||
|
||||
|
||||
/****************
|
||||
* 4. 지불 요청 *
|
||||
****************/
|
||||
$inipay->startAction();
|
||||
|
||||
/****************************************************************************************************************
|
||||
* 5. 결제 결과
|
||||
*
|
||||
* 1 모든 결제 수단에 공통되는 결제 결과 데이터
|
||||
* 거래번호 : $inipay->GetResult('TID')
|
||||
* 결과코드 : $inipay->GetResult('ResultCode') ("00"이면 지불 성공)
|
||||
* 결과내용 : $inipay->GetResult('ResultMsg') (지불결과에 대한 설명)
|
||||
* 지불방법 : $inipay->GetResult('PayMethod') (매뉴얼 참조)
|
||||
* 상점주문번호 : $inipay->GetResult('MOID')
|
||||
* 결제완료금액 : $inipay->GetResult('TotPrice')
|
||||
*
|
||||
* 결제 되는 금액 =>원상품가격과 결제결과금액과 비교하여 금액이 동일하지 않다면
|
||||
* 결제 금액의 위변조가 의심됨으로 정상적인 처리가 되지않도록 처리 바랍니다. (해당 거래 취소 처리)
|
||||
*
|
||||
*
|
||||
* 2. 신용카드,ISP,핸드폰, 전화 결제, 은행계좌이체, OK CASH BAG Point 결제 결과 데이터
|
||||
* (무통장입금 , 문화 상품권 포함)
|
||||
* 이니시스 승인날짜 : $inipay->GetResult('ApplDate') (YYYYMMDD)
|
||||
* 이니시스 승인시각 : $inipay->GetResult('ApplTime') (HHMMSS)
|
||||
*
|
||||
* 3. 신용카드 결제 결과 데이터
|
||||
*
|
||||
* 신용카드 승인번호 : $inipay->GetResult('ApplNum')
|
||||
* 할부기간 : $inipay->GetResult('CARD_Quota')
|
||||
* 무이자할부 여부 : $inipay->GetResult('CARD_Interest') ("1"이면 무이자할부)
|
||||
* 신용카드사 코드 : $inipay->GetResult('CARD_Code') (매뉴얼 참조)
|
||||
* 카드발급사 코드 : $inipay->GetResult('CARD_BankCode') (매뉴얼 참조)
|
||||
* 본인인증 수행여부 : $inipay->GetResult('CARD_AuthType') ("00"이면 수행)
|
||||
* 각종 이벤트 적용 여부 : $inipay->GetResult('EventCode')
|
||||
*
|
||||
* ** 달러결제 시 통화코드와 환률 정보 **
|
||||
* 해당 통화코드 : $inipay->GetResult('OrgCurrency')
|
||||
* 환율 : $inipay->GetResult('ExchangeRate')
|
||||
*
|
||||
* 아래는 "신용카드 및 OK CASH BAG 복합결제" 또는"신용카드 지불시에 OK CASH BAG적립"시에 추가되는 데이터
|
||||
* OK Cashbag 적립 승인번호 : $inipay->GetResult('OCB_SaveApplNum')
|
||||
* OK Cashbag 사용 승인번호 : $inipay->GetResult('OCB_PayApplNum')
|
||||
* OK Cashbag 승인일시 : $inipay->GetResult('OCB_ApplDate') (YYYYMMDDHHMMSS)
|
||||
* OCB 카드번호 : $inipay->GetResult('OCB_Num')
|
||||
* OK Cashbag 복합결재시 신용카드 지불금액 : $inipay->GetResult('CARD_ApplPrice')
|
||||
* OK Cashbag 복합결재시 포인트 지불금액 : $inipay->GetResult('OCB_PayPrice')
|
||||
*
|
||||
* 4. 실시간 계좌이체 결제 결과 데이터
|
||||
*
|
||||
* 은행코드 : $inipay->GetResult('ACCT_BankCode')
|
||||
* 현금영수증 발행결과코드 : $inipay->GetResult('CSHR_ResultCode')
|
||||
* 현금영수증 발행구분코드 : $inipay->GetResult('CSHR_Type')
|
||||
* *
|
||||
* 5. OK CASH BAG 결제수단을 이용시에만 결제 결과 데이터
|
||||
* OK Cashbag 적립 승인번호 : $inipay->GetResult('OCB_SaveApplNum')
|
||||
* OK Cashbag 사용 승인번호 : $inipay->GetResult('OCB_PayApplNum')
|
||||
* OK Cashbag 승인일시 : $inipay->GetResult('OCB_ApplDate') (YYYYMMDDHHMMSS)
|
||||
* OCB 카드번호 : $inipay->GetResult('OCB_Num')
|
||||
*
|
||||
* 6. 무통장 입금 결제 결과 데이터 *
|
||||
* 가상계좌 채번에 사용된 주민번호 : $inipay->GetResult('VACT_RegNum') *
|
||||
* 가상계좌 번호 : $inipay->GetResult('VACT_Num') *
|
||||
* 입금할 은행 코드 : $inipay->GetResult('VACT_BankCode') *
|
||||
* 입금예정일 : $inipay->GetResult('VACT_Date') (YYYYMMDD) *
|
||||
* 송금자 명 : $inipay->GetResult('VACT_InputName') *
|
||||
* 예금주 명 : $inipay->GetResult('VACT_Name') *
|
||||
* *
|
||||
* 7. 핸드폰, 전화 결제 결과 데이터( "실패 내역 자세히 보기"에서 필요 , 상점에서는 필요없는 정보임) *
|
||||
* 전화결제 사업자 코드 : $inipay->GetResult('HPP_GWCode') *
|
||||
* *
|
||||
* 8. 핸드폰 결제 결과 데이터 *
|
||||
* 휴대폰 번호 : $inipay->GetResult('HPP_Num') (핸드폰 결제에 사용된 휴대폰번호) *
|
||||
* *
|
||||
* 9. 전화 결제 결과 데이터 *
|
||||
* 전화번호 : $inipay->GetResult('ARSB_Num') (전화결제에 사용된 전화번호) *
|
||||
* *
|
||||
* 10. 문화 상품권 결제 결과 데이터 *
|
||||
* 컬쳐 랜드 ID : $inipay->GetResult('CULT_UserID') *
|
||||
* *
|
||||
* 11. K-merce 상품권 결제 결과 데이터 (K-merce ID, 틴캐시 아이디 공통사용) *
|
||||
* K-merce ID : $inipay->GetResult('CULT_UserID') *
|
||||
* *
|
||||
* 12. 모든 결제 수단에 대해 결제 실패시에만 결제 결과 데이터 *
|
||||
* 에러코드 : $inipay->GetResult('ResultErrorCode') *
|
||||
* *
|
||||
* 13.현금영수증 발급 결과코드 (은행계좌이체시에만 리턴) *
|
||||
* $inipay->GetResult('CSHR_ResultCode') *
|
||||
* *
|
||||
* 14.틴캐시 잔액 데이터 *
|
||||
* $inipay->GetResult('TEEN_Remains') *
|
||||
* 틴캐시 ID : $inipay->GetResult('CULT_UserID') *
|
||||
* 15.게임문화 상품권 *
|
||||
* 사용 카드 갯수 : $inipay->GetResult('GAMG_Cnt') *
|
||||
* *
|
||||
****************************************************************************************************************/
|
||||
|
||||
if( $inipay->GetResult("ResultCode") == "00" ) {
|
||||
//최종결제요청 결과 성공 DB처리
|
||||
$tno = $inipay->GetResult('TID');
|
||||
$amount = $inipay->GetResult('TotPrice');
|
||||
$app_time = $inipay->GetResult('ApplDate').$inipay->GetResult('ApplTime');
|
||||
$pay_method = $inipay->GetResult('PayMethod');
|
||||
$pay_type = $PAY_METHOD[$pay_method];
|
||||
$depositor = iconv_utf8($inipay->GetResult('VACT_InputName'));
|
||||
$commid = '';
|
||||
$mobile_no = $inipay->GetResult('HPP_Num');
|
||||
$app_no = $inipay->GetResult('ApplNum');
|
||||
$card_name = $CARD_CODE[$inipay->GetResult('CARD_Code')];
|
||||
if ($default['de_escrow_use'] == 1)
|
||||
$escw_yn = 'Y';
|
||||
switch($pay_type) {
|
||||
case '계좌이체':
|
||||
$bank_name = $BANK_CODE[$inipay->GetResult('ACCT_BankCode')];
|
||||
break;
|
||||
case '가상계좌':
|
||||
$bankname = $BANK_CODE[$inipay->GetResult('VACT_BankCode')];
|
||||
$account = $inipay->GetResult('VACT_Num').' '.iconv_utf8($inipay->GetResult('VACT_Name'));
|
||||
$app_no = $inipay->GetResult('VACT_Num');
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
alert(iconv_utf8($inipay->GetResult("ResultMsg")).' 코드 : '.$inipay->GetResult("ResultCode"));
|
||||
}
|
||||
|
||||
?>
|
||||
1
shop/inicis/key/INIpayTest/keypass.enc
Normal file
1
shop/inicis/key/INIpayTest/keypass.enc
Normal file
@ -0,0 +1 @@
|
||||
pm/4rSNJdLw=
|
||||
16
shop/inicis/key/INIpayTest/mcert.pem
Normal file
16
shop/inicis/key/INIpayTest/mcert.pem
Normal file
@ -0,0 +1,16 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICmzCCAgQCAQAwDQYJKoZIhvcNAQEEBQAwgZUxCzAJBgNVBAYTAktSMRUwEwYD
|
||||
VQQIDAzrjIDtlZzrr7zqta0xDTALBgNVBAcTBG51bGwxGjAYBgNVBAoMESjso7wp
|
||||
7J2064uI7Iuc7IqkMQswCQYDVQQLEwJFQzETMBEGA1UEAxMKSU5JcGF5VGVzdDEi
|
||||
MCAGCgmSJomT8ixkAQMUEmx5dGFrNzFAaW5pY2lzLmNvbTAeFw0wNDAzMTUxMDAx
|
||||
MjNaFw0wNTAzMTUxMDAxMjNaMIGVMQswCQYDVQQGEwJLUjEVMBMGA1UECAwM64yA
|
||||
7ZWc66+86rWtMQ0wCwYDVQQHEwRudWxsMRowGAYDVQQKDBEo7KO8KeydtOuLiOyL
|
||||
nOyKpDELMAkGA1UECxMCRUMxEzARBgNVBAMTCklOSXBheVRlc3QxIjAgBgoJkiaJ
|
||||
k/IsZAEDFBJseXRhazcxQGluaWNpcy5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0A
|
||||
MIGJAoGBAP6a/WaRyDMxHDgKHtahbZTnv+cayR0b052y2sCAGdgMc6CK0GxyvudV
|
||||
KR7mltKhexur/ikaPKXXApK+SlXUvwNS7pdQ13BTNCeLlEg0WLjGoVi9n96AcjR/
|
||||
QqlmkFaVAQQe9X95uwAcCoIrkErrpFJNPhppTXfsPH8YpzegogPnAgMBAAEwDQYJ
|
||||
KoZIhvcNAQEEBQADgYEAvmKuNAD7oPxOfRxj1EyBrKt2YdrhzMTvZXz7IIGCeKf0
|
||||
tsAKiuxuh20i6zWbD4N+twZvDYG23DFBsLb5Iw3pft5RK9OOVZJ8+ChAaDFHBa4a
|
||||
RzLDmsdD9NsF7UfYb0KXFUnZMTW5ZKirWUq21MdQiqVNhuLs0zy2hAqABBwhICk=
|
||||
-----END CERTIFICATE-----
|
||||
18
shop/inicis/key/INIpayTest/mpriv.pem
Normal file
18
shop/inicis/key/INIpayTest/mpriv.pem
Normal file
@ -0,0 +1,18 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
Proc-Type: 4,ENCRYPTED
|
||||
DEK-Info: DES-EDE3-CBC,1E6B60D94624128F
|
||||
|
||||
+9VjCYsbhvQIrQVWRmTV1dBc3HpHbjDrnwEu8znuxO9dgN7ZKKahSOo/iZv9tzWr
|
||||
SpEnbaGiRivO7/jTfJxgcy7wqjV+jYiwpBzL640JdOditUMoIxx3Rzxq+Dheuz13
|
||||
1dwt6f3d11zzXjIA5eQQXf1dBTjNCrxhAHqtHccWc5eP1QScQA+KdDAT+vQ6qTVq
|
||||
aZOI+7BkfWt5YMYBienXwEZSK5ZJ0GU91xSwDApIwsq7E7JGBExPIXGJeZ/RDAVN
|
||||
sKuO5Ny0JBNJN2Lym39Nb9lF0sKAedMiQNfaEnRqG37fh4H1ONo9NTYilENCIrg6
|
||||
tgYw/G9FrY8UvNLBsdUEUSV3bSqlRXZxP2TcPPrpYVbYZ1CQAH3fhVjAo9dpSNeI
|
||||
KuGv3x+JAkuJ+SjhANUU+ChOm27tF7scUxDTfwzTGfyB3P1UFHDwf0nWMU5cuJRY
|
||||
1+DLxEVL9FaZmonf5SZdf14Ln8a0cVdm+5rujFpFecSaw9K6gNFUvu6qF6CLx9/O
|
||||
UgcL90Ga+EvMG1iWyCFGvbr53r4i776JG+rVergIcgT5winvYpKiOS9AOV5NXPPI
|
||||
ev5PCXmDbnalmK6IrgrV0bAJD3d+NcN9JGFSx+GYKlw4OTrz/hxxuojPW6em4cfi
|
||||
mEIl5JIiLoC2BqM+Jcs8UMq0TOS8Pcki4O05H9Juws5nh6+d5d2p2BcvkXc+SWF7
|
||||
ClfjMZDaniMzPZr1dQj5XFZwptN6jATYL/4u1CpXYKi3N6TwHbOtQD/2l4e+DNPR
|
||||
JsSAW8ftyLAK0QJUTLhvA9Np9pzmO4hE7LfeRKBKpoU2PwKyXoO+PA==
|
||||
-----END RSA PRIVATE KEY-----
|
||||
10
shop/inicis/key/INIpayTest/readme.txt
Normal file
10
shop/inicis/key/INIpayTest/readme.txt
Normal file
@ -0,0 +1,10 @@
|
||||
Ű <20><><EFBFBD><EFBFBD> 3<><33> - mcert.pem, mpriv.pem, keypass.enc - <20><>
|
||||
"key/{<7B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̵<EFBFBD>}/" <20><> <20><><EFBFBD><EFBFBD><EFBFBD>Ͻ<EFBFBD> <20><> <20><><EFBFBD>α<CEB1> <20>ҽ<EFBFBD><D2BD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ݿ<EFBFBD><DDBF>Ͻʽÿ<CABD>(<28><EFBFBD><DEB4><EFBFBD> <20><><EFBFBD><EFBFBD>).
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̵<EFBFBD> : INIpayTest
|
||||
Ű<EFBFBD>н<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> : 1111
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ <20>н<EFBFBD><D0BD><EFBFBD><EFBFBD><EFBFBD> : 1111
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> https://iniweb.inicis.com<6F≯<EFBFBD>,
|
||||
<EFBFBD>α<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>̵<EFBFBD><CCB5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̵<EFBFBD><CCB5>Դϴ<D4B4>.
|
||||
1
shop/inicis/key/iniescrow0/keypass.enc
Normal file
1
shop/inicis/key/iniescrow0/keypass.enc
Normal file
@ -0,0 +1 @@
|
||||
pm/4rSNJdLw=
|
||||
17
shop/inicis/key/iniescrow0/mcert.pem
Normal file
17
shop/inicis/key/iniescrow0/mcert.pem
Normal file
@ -0,0 +1,17 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICnTCCAgYCAQAwDQYJKoZIhvcNAQEEBQAwgZYxCzAJBgNVBAYTAktSMRUwEwYD
|
||||
VQQIDAzrjIDtlZzrr7zqta0xDTALBgNVBAcTBG51bGwxGjAYBgNVBAoMESjso7wp
|
||||
7J2064uI7Iuc7IqkMQswCQYDVQQLEwJFQzETMBEGA1UEAxMKaW5pZXNjcm93MDEj
|
||||
MCEGCgmSJomT8ixkAQMUE2RkYWVtaXJpQGluaWNpcy5jb20wHhcNMDgwMTE2MDQ0
|
||||
MTU1WhcNMDkwMTE1MDQ0MTU1WjCBljELMAkGA1UEBhMCS1IxFTATBgNVBAgMDOuM
|
||||
gO2VnOuvvOq1rTENMAsGA1UEBxMEbnVsbDEaMBgGA1UECgwRKOyjvCnsnbTri4js
|
||||
i5zsiqQxCzAJBgNVBAsTAkVDMRMwEQYDVQQDEwppbmllc2Nyb3cwMSMwIQYKCZIm
|
||||
iZPyLGQBAxQTZGRhZW1pcmlAaW5pY2lzLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOB
|
||||
jQAwgYkCgYEAxElWzHNgDFZpwNvPGbWtA0PKTDPfeP1r7xE/k2n2XMzBFQFxbjSC
|
||||
EBKbQzFRVbNJv4Jyon/OzlywSR3A1DYMm5Oy9Vh3OOrH2FiYxMXClp7MynnmFEug
|
||||
ysHuYOHlMnoEfI5k8h9hIXlYbRFDLdY7IxVzqkaYJ37HX01Apuxo8sUCAwEAATAN
|
||||
BgkqhkiG9w0BAQQFAAOBgQCPrVeBW8+anq3CORMYU5TX1tfrYeCzLFH2hkDJF0Rr
|
||||
1xWxgjhdFZxtBtYSbxr3UKFe6/EWrlv7k37LoM8ORYcNZun+Rd1jz5xwTOjLBTsd
|
||||
UGwgUpgBLB1z9GoZgaeJJOm7BFUE0Jp7laI0zWkpWeova2RUT1PODnQMvRNi2d88
|
||||
vQ==
|
||||
-----END CERTIFICATE-----
|
||||
18
shop/inicis/key/iniescrow0/mpriv.pem
Normal file
18
shop/inicis/key/iniescrow0/mpriv.pem
Normal file
@ -0,0 +1,18 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
Proc-Type: 4,ENCRYPTED
|
||||
DEK-Info: DES-EDE3-CBC,FBB268FC75417BD4
|
||||
|
||||
G4/3WRZg/9peL3ym0S2LsTWvFkSCT/Co+qcCeKBunQ1UPH/pVyQjW0oxtmjBpBfp
|
||||
YFNJmc5mEhwV30uKXLEYP6bhpHKlLDQWv926+UBIkSZ4cOkm9JNZUETlb+tlSgIN
|
||||
i5l5KLaX198rGlQAEYX+TxTaxlfXxoBiXkoqxs64Jn0RApy1SPTXKjLffXHP2Yk5
|
||||
q3jOZ4z4REdnmkH5NYuRHz6cyRr4XdmvPFMwBpzOL08go6yToYfYRvyO4hf2T1Kl
|
||||
ug1ws6e1HNSm1t3PrZP2kj1oIQef80/DQf9eu1mOP0VQD1GlQSydt2+kAdEBba4d
|
||||
FIlpO3oGCbCB1UhBOBCllFlXvd4sqj1inZhHS/g9R0vAwAPVpsssXYnWL2qnb+zj
|
||||
gfSyk+ao56sOBIwhyFXX9IdLcFKMGVQDrxZhDxVieStwk9iVK4zGZW+clS+TzFY7
|
||||
8qPDP53vXenumSnVq11Mj5gKwJzy40wGm61bQR1B5ldJJW7978Njahh0T0ZCxu48
|
||||
n5H0FbVu9wrILehWxEI5IrXAAGbRYDlurSSvHtOX1qL0WvJa4EQD9De3u8kqD3Yx
|
||||
soKJqII277UQBpPuyyE+eP1F+7i4cQdfCU31sK1LMz/wiJxRrG1CiOpV1FH22ABy
|
||||
vxAh1gpTRgYHvNVWG37P9rYbrW2UcM4cjhbgOzTLhrThxteAgosaXWowc/lcobSB
|
||||
G444RQXVPZEetqt2In2kBr7UmE2WuvM0CrC6sD336K2t0q/5HLPLntGozdadZ4F5
|
||||
OS8Oi8I9Ygiqwz95JSUaOfETGZ6RpGRJXL9ysimBeEDuQmQ2lxtkZA==
|
||||
-----END RSA PRIVATE KEY-----
|
||||
19
shop/inicis/key/iniescrow0/readme.txt
Normal file
19
shop/inicis/key/iniescrow0/readme.txt
Normal file
@ -0,0 +1,19 @@
|
||||
|
||||
please read this README.TXT file
|
||||
|
||||
ZIP file contains following 3 files.
|
||||
- mcert.pem
|
||||
- mpriv.pem
|
||||
- keypass.enc
|
||||
|
||||
Copy these 3 files to directory [key/iniescrow0].
|
||||
|
||||
Merchant ID : iniescrow0
|
||||
Key Password : 1111
|
||||
Admin Password: 1111
|
||||
|
||||
please visit https://iniweb.inicis.com
|
||||
for your Merchant Administration.
|
||||
This site provides your payment transaction details and account details by calculation period.
|
||||
|
||||
You can also log on this site using your Merchant ID(iniescrow0).
|
||||
1
shop/inicis/key/keypass.enc
Normal file
1
shop/inicis/key/keypass.enc
Normal file
@ -0,0 +1 @@
|
||||
pm/4rSNJdLw=
|
||||
17
shop/inicis/key/mcert.pem
Normal file
17
shop/inicis/key/mcert.pem
Normal file
@ -0,0 +1,17 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICtDCCAhwCAQAwDQYJKoZIhvcNAQEEBQAwgaExCzAJBgNVBAYTAktSMRUwEwYD
|
||||
VQQIDAzrjIDtlZzrr7zqta0xDTALBgNVBAcTBG51bGwxJTAjBgNVBAoMHFNL7Luk
|
||||
666k64uI7LyA7J207IWY7KaIKOyjvCkxCzAJBgNVBAsTAkVDMRMwEQYDVQQDEwpD
|
||||
eXdvcmxkMDE0MSMwIQYKCZImiZPyLGQBAxQTc3VuZ21vY2tAaW5pY2lzLmNvbTAe
|
||||
Fw0wNzExMTIwNjExMzBaFw0wODExMTEwNjExMzBaMIGhMQswCQYDVQQGEwJLUjEV
|
||||
MBMGA1UECAwM64yA7ZWc66+86rWtMQ0wCwYDVQQHEwRudWxsMSUwIwYDVQQKDBxT
|
||||
S+y7pOuupOuLiOy8gOydtOyFmOymiCjso7wpMQswCQYDVQQLEwJFQzETMBEGA1UE
|
||||
AxMKQ3l3b3JsZDAxNDEjMCEGCgmSJomT8ixkAQMUE3N1bmdtb2NrQGluaWNpcy5j
|
||||
b20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAV0zuTBHq1SZWArRHCNz1jlU
|
||||
WUyTK3Gv6BGq3J6Tly/o6g51Nbjcu2TYMXLIhMgsqDPeJzOnXbSvnh3FWgAMcFm/
|
||||
EZEs9oKw+jkiPfIEeSc7KZThqDm1oG4FgJZrXim6Y3jlLLaW1h0WyapCV2u60759
|
||||
LX8YzmmFmUuXGZOb5s7DAgMBAAEwDQYJKoZIhvcNAQEEBQADgYIAAN4AumokztkK
|
||||
z5UBScG4Ccvu3nwcuFlCqzDUm9xnZyfy96RIjTJjVelkLwk6NFPqbDEyDLmHm6fe
|
||||
Zus+fvZBKQAyHigfuS/RVitcup52OkWCZerbcWsziX8Pzqb/MHu19Elt+y/QYe5x
|
||||
ysyIsZn47Bp+7kbQtlMjJecXGEFfmoi1
|
||||
-----END CERTIFICATE-----
|
||||
18
shop/inicis/key/mpriv.pem
Normal file
18
shop/inicis/key/mpriv.pem
Normal file
@ -0,0 +1,18 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
Proc-Type: 4,ENCRYPTED
|
||||
DEK-Info: DES-EDE3-CBC,6B92FB59B7AB8A00
|
||||
|
||||
NSplji6yUKrk1LXAid9TcBIOSkA+oE+5b52s7GaebioGsGSMIW7RrK8VHWlTOpxs
|
||||
GnFkTNg3ALZucdhYiAdm6vzaGmmJogoPnmpevs2JIDl3rkgcQH0AVU6nkKg9EcuP
|
||||
QP/2DknfqzNO46fTMjUIRSrJ7AauDz6836Mm3GVNl7cA42ecM7xHSVK3ZvCvpTrJ
|
||||
A9ik1zWZbzCIKg/mgMJkHu8xO8K9GKQAY1OM0KxK+oqS/Txmi6RplCHlrTAR+Ahb
|
||||
J3W8vG3tCu6orlczvPYEnB0a1E/dycDPziBFm6nVAk8cb+yPbZnl/Nqfu6nvPsSx
|
||||
iJYJR9YZ6L5i/IIhBc8tjNWeDB1KLsXZY41B//D/pjr9nfFUcJex8uPpOA0+GnGz
|
||||
EhDT8j/WMylgAxKKIYjFqE7HnMQ+n+ZZqLKO6JLdu3HHNz0QC7nz/SZtEMw/of4e
|
||||
1DlFHDTLTg0vJxwuLSBHVQN3H7SiFbxc/U5UmZEEVPprwbS9m0ok9JmBdfCv8iqu
|
||||
vuJiYc3HCdJaTRu0U3fJM33yr//BrZxXw0RjABePprcQDf590Vws8tygc/L5voF6
|
||||
lw8JYXuWKuRn4soNKwhrLL9YvQ0FNy1ITS2MpKGNYRPp5l3YCKO19y1dLMwrA33k
|
||||
SL1laFxrXLDaaE7MJZ8VD9hIymnn0aivtJHelW9DNoWJdI/DgTNKRhgT2TWBqR09
|
||||
VVCCKF3RLAQMvOFq/49A68px8/xHKxd6pYis/l8BONlZBMYRyIgjZ0IU81pmvHm+
|
||||
8UphsgRGx1ZvNtP0ApnTMF9DdpPN6vkxmpDWTe93HWJTp3TV1wyZPA==
|
||||
-----END RSA PRIVATE KEY-----
|
||||
21
shop/inicis/key/pgcert.pem
Normal file
21
shop/inicis/key/pgcert.pem
Normal file
@ -0,0 +1,21 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIDcTCCAtqgAwIBAgIBHjANBgkqhkiG9w0BAQQFADCBiDELMAkGA1UEBhMCS1Ix
|
||||
DjAMBgNVBAgTBVNlb3VsMRgwFgYDVQQKEw9JbmljaXMgQ28sIEx0ZC4xDzANBgNV
|
||||
BAsTBklOSXBheTEfMB0GA1UEAxMWSU5JcGF5IFBheW1lbnQgR2F0ZXdheTEdMBsG
|
||||
CSqGSIb3DQEJARYOZGV2QGluaWNpcy5jb20wHhcNMDcwOTA2MDYxNTI0WhcNMTcw
|
||||
OTAzMDYxNTI0WjCBiDELMAkGA1UEBhMCS1IxDjAMBgNVBAgTBVNlb3VsMRgwFgYD
|
||||
VQQKEw9JbmljaXMgQ28sIEx0ZC4xDzANBgNVBAsTBklOSXBheTEfMB0GA1UEAxMW
|
||||
SU5JcGF5IFBheW1lbnQgR2F0ZXdheTEdMBsGCSqGSIb3DQEJARYOZGV2QGluaWNp
|
||||
cy5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAOC8v1rxqoo7tonq7t4d
|
||||
c3FVfIlLyA9ku+l9+d5pUQrbiUXDe8NoJZnoSyud4WhOUrN2ZpzNmjGxuPquYrT/
|
||||
LkXoR+ib9OAhFBp7izstjHEA+oUNTVO24MRRvOHWWaLrCeTNX9PeaZl9ploojyHc
|
||||
Uxm5/gIlPEojiaWNc3HVnb55AgMBAAGjgegwgeUwHQYDVR0OBBYEFGgqMfJUMSUQ
|
||||
pjyGnurepI+NUf6JMIG1BgNVHSMEga0wgaqAFGgqMfJUMSUQpjyGnurepI+NUf6J
|
||||
oYGOpIGLMIGIMQswCQYDVQQGEwJLUjEOMAwGA1UECBMFU2VvdWwxGDAWBgNVBAoT
|
||||
D0luaWNpcyBDbywgTHRkLjEPMA0GA1UECxMGSU5JcGF5MR8wHQYDVQQDExZJTklw
|
||||
YXkgUGF5bWVudCBHYXRld2F5MR0wGwYJKoZIhvcNAQkBFg5kZXZAaW5pY2lzLmNv
|
||||
bYIBHjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBAUAA4GBANUj8vYzU2Q9pebQ
|
||||
yX+6U9e36DeO/+15iDgU2PRK63uPaEa6vMqN2ibI8twolZB2t2oqIRgO44Hf3Nyf
|
||||
1XKNzCP1eRF1XreGOnrPZtJ5UeUs3RNBqvQkIAdSW80jkXw0i/7i95BYxRIJWSIE
|
||||
2fLjemy6r8gAQgWRAPv32F0xwRRT
|
||||
-----END CERTIFICATE-----
|
||||
19
shop/inicis/key/readme.txt
Normal file
19
shop/inicis/key/readme.txt
Normal file
@ -0,0 +1,19 @@
|
||||
|
||||
please read this README.TXT file
|
||||
|
||||
ZIP file contains following 3 files.
|
||||
- mcert.pem
|
||||
- mpriv.pem
|
||||
- keypass.enc
|
||||
|
||||
Copy these 3 files to directory [key/Cyworld014].
|
||||
|
||||
Merchant ID : Cyworld014
|
||||
Key Password : 1111
|
||||
Admin Password: 1111
|
||||
|
||||
please visit https://iniweb.inicis.com
|
||||
for your Merchant Administration.
|
||||
This site provides your payment transaction details and account details by calculation period.
|
||||
|
||||
You can also log on this site using your Merchant ID(Cyworld014).
|
||||
BIN
shop/inicis/key/rndseed.binary
Normal file
BIN
shop/inicis/key/rndseed.binary
Normal file
Binary file not shown.
1339
shop/inicis/libs/INICls.php
Normal file
1339
shop/inicis/libs/INICls.php
Normal file
File diff suppressed because it is too large
Load Diff
671
shop/inicis/libs/INIDFN.php
Normal file
671
shop/inicis/libs/INIDFN.php
Normal file
@ -0,0 +1,671 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Copyright (C) 2007 INICIS Inc.
|
||||
*
|
||||
* <20>ش<EFBFBD> <20><><EFBFBD>̺귯<CCBA><EAB7AF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǿ<C7BE><EEBCAD> <20>ȵ˴ϴ<CBB4>.
|
||||
* <20><><EFBFBD>Ƿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ڵ忡 <20><><EFBFBD><EFBFBD> å<><C3A5><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ڿ<EFBFBD><DABF><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>˷<EFBFBD><CBB7>帳<EFBFBD>ϴ<EFBFBD>.
|
||||
*
|
||||
* @version 5.0
|
||||
* @author ddaemiri
|
||||
*
|
||||
* @buildno 5000
|
||||
* @date 2007.12.27
|
||||
* @note first release
|
||||
*
|
||||
* @buildno 5001
|
||||
* @date 2008.01.15
|
||||
* @note <09><>ü<EFBFBD><C3BC><EFBFBD><EFBFBD>ũ<EFBFBD><C5A9> <20>߰<EFBFBD>, DNS Lookup Timeout <20>߰<EFBFBD>, DNS Lookup <20><><EFBFBD>н<EFBFBD> socket close<73><65><EFBFBD>ϴ<EFBFBD> <20>κ<EFBFBD> <20>߰<EFBFBD>
|
||||
* @date 2008.01.16
|
||||
* @note Encrypt,Decrypt <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, pkcs5 padding <20>߰<EFBFBD>
|
||||
* @date 2008.01.24
|
||||
* @note non block connect immediate return check code/str
|
||||
* @date 2008.02.11
|
||||
* @note key load <20><> read<61><64><EFBFBD><EFBFBD><EFBFBD><EFBFBD><DFBB><EFBFBD> fclose <20>߰<EFBFBD>
|
||||
* @date 2008.03.03
|
||||
* @note <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>(passing by reference) <20><><EFBFBD><EFBFBD>
|
||||
* @date 2008.03.11
|
||||
* @note <09><><EFBFBD><EFBFBD>ũ<EFBFBD><C5A9> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Cmd <20>߰<EFBFBD>
|
||||
* @date 2008.03.12
|
||||
* @note <09><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> IP<49><50> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
* @buildno 5002
|
||||
* @note <09><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD> Sign<67>߰<EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>->5001<30><31> <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>,<2C><EFBFBD><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ó<EFBFBD><C3B3><EFBFBD><EFBFBD> <20><>)
|
||||
* @date 2008.03.12
|
||||
* @buildno 5016
|
||||
* @note pg1ip, pg2ip <20>߰<EFBFBD>/<2F><><EFBFBD><EFBFBD> <20><><EFBFBD>ŷ<EFBFBD><C5B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> drpg<70><67> <20><><EFBFBD>õ<EFBFBD>
|
||||
* @date 2008.04.02
|
||||
* @buildno 5017
|
||||
* @note 1)chkfake<6B><65> <20>Ķ<EFBFBD><C4B6><EFBFBD><EFBFBD><EFBFBD> <20>α<EFBFBD> <20><><EFBFBD><EFBFBD>(<28>ߺ<EFBFBD>)
|
||||
* 2)call-time pass-by-reference => pass-by-value<75><65> <20><><EFBFBD><EFBFBD>
|
||||
* @date 2009.01.12
|
||||
* @buildno 5019
|
||||
* @note delete UIP
|
||||
* @date 2009.01.21
|
||||
* @note add mkey/mergelog ( for Makeshop )
|
||||
* @date 2009.02.24
|
||||
* @note 1)define MKEY deprecated 2009.02.19 ( Makeshop <20>ʱ<EFBFBD> <20>ѹ<EFBFBD><D1B9><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD>ǰ<F1BDBAB5> <20>ִ<EFBFBD><D6B4><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>)
|
||||
* 2)Makeshop PG Updrade<64><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>γ<EFBFBD><CEB3><EFBFBD> 2009.02.19 (interface<63><65><EFBFBD><EFBFBD> mkey<65><79><EFBFBD><EFBFBD> <20><EFBFBD> ó<><C3B3><EFBFBD>ϰ<EFBFBD> <20><><EFBFBD><EFBFBD>)
|
||||
* 3)Makeshop PG Updrade<64><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>γ<EFBFBD><CEB3><EFBFBD> 2009.02.24 (interface<63><65><EFBFBD><EFBFBD> mergelog<6F><67><EFBFBD><EFBFBD> <20><EFBFBD> ó<><C3B3><EFBFBD>ϰ<EFBFBD> <20><><EFBFBD><EFBFBD>)
|
||||
* @date 2009.05.07
|
||||
* @note add BUILDDATE in TXVersion
|
||||
* @date 2009.08.05
|
||||
* @buildno 5030
|
||||
* @note add vacct refund
|
||||
* @date 2009.12.16
|
||||
* @buildno 5030
|
||||
* @note add recv info
|
||||
* @date 2010.07.14
|
||||
* @note add Tax, TaxFree info(TX_TAX, TX_TAXFREE)
|
||||
* @date 2010.09.09
|
||||
* @note <09><><EFBFBD>ҿ<EFBFBD>û<EFBFBD><C3BB> PG <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>->IP, INILib.php)
|
||||
* @note BUILDDATE update(100414 -> 100909)
|
||||
* @note 2011.05.23 5030 XML ELEMENT <20><> ROOT <20><> ROOTINFO<46><4F> <20><><EFBFBD><EFBFBD>
|
||||
* @buildno 5032
|
||||
* @note 2012.07.09 <09>ŷ<EFBFBD><C5B7><EFBFBD>ȸ <20>߰<EFBFBD> (TYPE_INQUIRY)
|
||||
* @note 2012.07.09 PHP ini <20><><EFBFBD><EFBFBD> error display setting <20>߰<EFBFBD>
|
||||
* @buildno 5036
|
||||
* @note 2014.12.09 add gather parameter tid, type
|
||||
*/
|
||||
ini_set('error_reporting', E_ALL ^ E_NOTICE);
|
||||
ini_set('display_errors', 'Off');
|
||||
|
||||
/* GLOBAL */
|
||||
define("PROGRAM", "INIPHP");
|
||||
define("LANG", "PHP");
|
||||
define("VERSION", "5036");
|
||||
define("BUILDDATE", "141209");
|
||||
define("TID_LEN", 40);
|
||||
define("MAX_KEY_LEN", 24);
|
||||
define("MAX_IV_LEN", 8);
|
||||
|
||||
/* TIMEOUT */
|
||||
define("TIMEOUT_CONNECT", 5);
|
||||
define("TIMEOUT_WRITE", 2);
|
||||
define("TIMEOUT_READ", 20);
|
||||
define("G_TIMEOUT_CONNECT", 2);
|
||||
define("DNS_LOOKUP_TIMEOUT", 5);
|
||||
|
||||
/* LOG LEVEL */
|
||||
define("CRITICAL", 1);
|
||||
define("ERROR", 2);
|
||||
define("NOTICE", 3);
|
||||
define("INFO", 5);
|
||||
define("DEBUG", 7);
|
||||
|
||||
/* SERVER INFO */
|
||||
define("PG_HOST", "pg.inicis.com");
|
||||
define("DRPG_HOST", "drpg.inicis.com");
|
||||
define("PG_IP", "203.238.37.3");
|
||||
define("DRPG_IP", "211.219.96.180");
|
||||
define("PG_PORT", 34049);
|
||||
define("G_SERVER", "gthr.inicis.com");
|
||||
define("G_CGI", "/cgi-bin/g.cgi");
|
||||
define("G_PORT", 80);
|
||||
|
||||
define("OK", "0");
|
||||
|
||||
define("IV", "Initiative Tech");
|
||||
define("IMHK", "SFBQSU5JTkZPUk1BVElPTg==");
|
||||
define("IMHV", "SU5JQ0lTIENJUEhFUi4uLg==");
|
||||
define("IMJK", "UkVHSVNUX05PX1JDNEtFWQ==");
|
||||
define("IMJV", "UkVHSVNUX05PX1JDNElW");
|
||||
|
||||
//define for mkey
|
||||
//deprecated 2009.02.19 ( Makeshop <20>ʱ<EFBFBD> <20>ѹ<EFBFBD><D1B9><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD>ǰ<F1BDBAB5> <20>ִ<EFBFBD><D6B4><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>)
|
||||
//Makeshop PG Updrade<64><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>γ<EFBFBD><CEB3><EFBFBD> 2009.02.19 (interface<63><65><EFBFBD><EFBFBD> mkey<65><79><EFBFBD><EFBFBD> <20><EFBFBD> ó<><C3B3><EFBFBD>ϰ<EFBFBD> <20><><EFBFBD><EFBFBD>)
|
||||
//define("MKEY", 1);
|
||||
//non block connect immediate return check code/str
|
||||
define("ERRSTR_INPROGRESS", "Operation now in progress");
|
||||
define("ERRCODE_INPROGRESS_LINUX", 115);
|
||||
define("ERRCODE_INPROGRESS_FREEBSD", 36);
|
||||
define("ERRCODE_INPROGRESS_WIN", 10035);
|
||||
|
||||
//------------------------------------------------------
|
||||
// IFD Header
|
||||
//------------------------------------------------------
|
||||
define("MSGHEADER_LEN", 150);
|
||||
define("BODY_LEN", 5);
|
||||
define("TAIL_LEN", 5);
|
||||
define("FLGCRYPTO_LEN", 1);
|
||||
define("FLGSIGN_LEN", 5);
|
||||
define("MPUBSN_LEN", 20);
|
||||
define("PIPGPUBSN_LEN", 20);
|
||||
define("TXPGPUBSN_LEN", 20);
|
||||
define("CMD_LEN", 4);
|
||||
define("MID_LEN", 10);
|
||||
define("TOTPRICE_LEN", 20);
|
||||
define("TID_LEN", 40);
|
||||
|
||||
|
||||
//------------------------------------------------------
|
||||
// IFD CMD
|
||||
//------------------------------------------------------
|
||||
define("CMD_REQ_PAY", "0200");
|
||||
define("CMD_RES_PAY", "0210");
|
||||
define("CMD_REQ_CAP", "0300");
|
||||
define("CMD_RES_CAP", "0310");
|
||||
define("CMD_REQ_CAN", "0420");
|
||||
define("CMD_RES_CAN", "0430");
|
||||
define("CMD_REQ_NETC", "0520");
|
||||
define("CMD_RES_NETC", "0530");
|
||||
define("CMD_REQ_PRTC", "0620");
|
||||
define("CMD_RES_PRTC", "0630");
|
||||
define("CMD_REQ_ACK", "0800");
|
||||
define("CMD_RES_ACK", "0810");
|
||||
//<2F><>ü<EFBFBD><C3BC><EFBFBD><EFBFBD>ũ<EFBFBD><C5A9>
|
||||
//added 2008.01.08
|
||||
define("CMD_REQ_DLV", "3020"); //<2F><><EFBFBD>۵<EFBFBD><DBB5><EFBFBD>
|
||||
define("CMD_REQ_CNF", "3030"); //<2F><><EFBFBD><EFBFBD>Ȯ<EFBFBD><C8AE>
|
||||
define("CMD_REQ_DNY", "3040"); //<2F><><EFBFBD>Ű<EFBFBD><C5B0><EFBFBD>
|
||||
define("CMD_REQ_DNY_CNF", "3080"); //<2F><><EFBFBD><EFBFBD>Ȯ<EFBFBD><C8AE>
|
||||
define("CMD_REQ_DLV_NETC", "3520"); //<2F><><EFBFBD>۵<EFBFBD><DBB5>ϸ<EFBFBD><CFB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
define("CMD_REQ_CNF_NETC", "3530"); //<2F><><EFBFBD><EFBFBD>Ȯ<EFBFBD>θ<EFBFBD><CEB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
define("CMD_REQ_DNY_NETC", "3540"); //<2F><><EFBFBD>Ű<EFBFBD><C5B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȯ<EFBFBD><C8AF>(09.08.05)
|
||||
define("CMD_REQ_RFD", "0421");
|
||||
define("CMD_RES_RFD", "0431");
|
||||
|
||||
//<2F>ŷ<EFBFBD><C5B7><EFBFBD>ȸ(12.04.20)
|
||||
define("CMS_REQ_INQR", "0900");
|
||||
define("CMS_RES_INQR", "0910");
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(14.03.06)
|
||||
define("CMS_REQ_OPEN_SUB", "1040");
|
||||
define("CMS_RES_OPEN_SUB", "1041");
|
||||
|
||||
//------------------------------------------------------
|
||||
// HEADER FLAGS
|
||||
//------------------------------------------------------
|
||||
define("FLAG_TEST", "T");
|
||||
define("FLAG_REAL", "R");
|
||||
define("FLAG_CRYPTO_NONE", "N");
|
||||
define("FLAG_CRYPTO_SEED", "S");
|
||||
define("FLAG_CRYPTO_RC4", "R");
|
||||
define("FLAG_CRYPTO_3DES", "D");
|
||||
define("FLAG_SIGN_SHA", "SHA");
|
||||
define("FLAG_SIGN_SHA1", "SHA1");
|
||||
define("FLAG_SIGN_MD5", "MD5");
|
||||
|
||||
//------------------------------------------------------
|
||||
//TYPE(<28><><EFBFBD><EFBFBD>)
|
||||
//------------------------------------------------------
|
||||
define("TYPE_SECUREPAY", "securepay");
|
||||
define("TYPE_CANCEL", "cancel");
|
||||
define("TYPE_FORMPAY", "formpay");
|
||||
define("TYPE_RECEIPT", "receipt");
|
||||
define("TYPE_REPAY", "repay");
|
||||
define("TYPE_ESCROW", "escrow"); //<2F><>ü<EFBFBD><C3BC><EFBFBD><EFBFBD>ũ<EFBFBD><C5A9>!
|
||||
define("TYPE_CONFIRM", "confirm");
|
||||
define("TYPE_OCBQUERY", "ocbquery");
|
||||
define("TYPE_OCBSAVE", "ocbsave");
|
||||
define("TYPE_OCBPOINT", "OCBPoint");
|
||||
define("TYPE_AUTH", "auth");
|
||||
define("TYPE_AUTHBILL", "auth_bill");
|
||||
define("TYPE_CAPTURE", "capture");
|
||||
define("TYPE_CMS", "CMS");
|
||||
define("TYPE_VBANK", "VBank");
|
||||
define("TYPE_REQREALBILL", "reqrealbill");
|
||||
define("TYPE_FORMAUTH", "formauth");
|
||||
define("TYPE_CHKFAKE", "chkfake");
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȯ<EFBFBD><C8AF>(09.08.05)
|
||||
define("TYPE_REFUND", "refund");
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ºκ<C2BA>ȯ<EFBFBD><C8AF>(12.06.05)
|
||||
define("TYPE_VACCTREPAY", "vacctrepay");
|
||||
//<2F>ŷ<EFBFBD><C5B7><EFBFBD>ȸ(12.04.20)
|
||||
define("TYPE_INQUIRY", "inquiry");
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(14.03.06)
|
||||
define("TYPE_OPENSUB", "opensub");
|
||||
//------------------------------------------------------
|
||||
//EscrowType(<28><>ü<EFBFBD><C3BC><EFBFBD><EFBFBD>ũ<EFBFBD><C5A9> Ÿ<><C5B8>)
|
||||
//added 2008.01.08
|
||||
//------------------------------------------------------
|
||||
define("TYPE_ESCROW_DLV", "dlv");
|
||||
define("TYPE_ESCROW_CNF", "confirm"); //<2F><><EFBFBD><EFBFBD>Ȯ<EFBFBD><C8AE>/<2F><><EFBFBD><EFBFBD>(<28>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD>)
|
||||
define("TYPE_ESCROW_DNY", "deny"); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD>,<2C>ǹ̾<C7B9><CCBE><EFBFBD>
|
||||
define("TYPE_ESCROW_DNY_CNF", "dcnf");
|
||||
|
||||
|
||||
//------------------------------------------------------
|
||||
//PayMethod(<28><><EFBFBD><EFBFBD>, TX)
|
||||
//------------------------------------------------------
|
||||
define("NM_TX_ISP", "VCard");
|
||||
define("NM_TX_CARD", "Card");
|
||||
define("NM_TX_HPP", "HPP");
|
||||
define("NM_TX_ACCT", "DirectBank");
|
||||
define("NM_TX_VACT", "VBank");
|
||||
define("NM_TX_OCB", "OCBPoint");
|
||||
define("NM_TX_CSHR", "CASH");
|
||||
define("NM_TX_ARSB", "Ars1588Bill");
|
||||
define("NM_TX_PHNB", "PhoneBill");
|
||||
define("NM_TX_CULT", "Culture");
|
||||
define("NM_TX_GAMG", "DGCL");
|
||||
define("NM_TX_EDUG", "EDCL");
|
||||
define("NM_TX_TEEN", "TEEN");
|
||||
define("NM_TX_ESCR", "Escrow");
|
||||
|
||||
//------------------------------------------------------
|
||||
//PayMethod(<28><><EFBFBD><EFBFBD>, PG)
|
||||
//------------------------------------------------------
|
||||
define("NM_ISP", "ISP");
|
||||
define("NM_CARD", "CARD");
|
||||
define("NM_HPP", "HPP");
|
||||
define("NM_ACCT", "ACCT");
|
||||
define("NM_VACT", "VACT");
|
||||
define("NM_OCB", "OCB");
|
||||
define("NM_CSHR", "CASH");
|
||||
define("NM_ARSB", "ARSB");
|
||||
define("NM_PHNB", "PHNB");
|
||||
define("NM_CULT", "CULT");
|
||||
define("NM_GAMG", "DGCL");
|
||||
define("NM_EDUG", "EDCL");
|
||||
define("NM_TEEN", "TEEN");
|
||||
define("NM_ESCR", "Escrow");
|
||||
|
||||
//------------------------------------------------------
|
||||
//Charset
|
||||
//------------------------------------------------------
|
||||
define("EUCKR", "EUC-KR");
|
||||
define("UTF8", "UTF-8");
|
||||
|
||||
//------------------------------------------------------
|
||||
//URL Encoding/Decoding Name
|
||||
//------------------------------------------------------
|
||||
define("URLENCODE", "urlencode");
|
||||
define("URLDECODE", "urldecode");
|
||||
|
||||
//------------------------------------------------------
|
||||
//<2F><>û<EFBFBD><C3BB><EFBFBD><EFBFBD>
|
||||
//------------------------------------------------------
|
||||
define("TX_GOOSCNT", "GoodsCnt");
|
||||
define("TX_MOID", "MOID");
|
||||
define("TX_CURRENCY", "Currency");
|
||||
define("TX_SMID", "SMID");
|
||||
define("TX_GOODSCNTS", "GoodsCnts");
|
||||
define("TX_GOODSNAME", "GoodsName");
|
||||
define("TX_GOODSPRICE", "GoodsPrice");
|
||||
define("TX_BUYERNAME", "BuyerName");
|
||||
define("TX_BUYEREMAIL", "BuyerEmail");
|
||||
define("TX_BUYERTEL", "BuyerTel");
|
||||
define("TX_PARENTEMAIL", "ParentEmail");
|
||||
define("TX_RECVNAME", "RecvName");
|
||||
define("TX_RECVTEL", "RecvTel");
|
||||
define("TX_RECVMSG", "RecvMsg");
|
||||
define("TX_RECVADDR", "RecvAddr");
|
||||
define("TX_RECVPOSTNUM", "RecvPostNum");
|
||||
define("TX_TAXFREE", "TaxFree");
|
||||
define("TX_TAX", "Tax");
|
||||
//PaymentInfo
|
||||
define("TX_PAYMETHOD", "PayMethod");
|
||||
define("TX_JOINCARD", "JoinCard");
|
||||
define("TX_JOINEXPIRE", "JoinExpire");
|
||||
define("TX_MAILORDER", "MailOrder");
|
||||
define("TX_SESSIONKEY", "SessionKey");
|
||||
define("TX_ENCRYPTED", "Encrypted");
|
||||
//ReservedInfo
|
||||
define("TX_MRESERVED1", "MReserved1");
|
||||
define("TX_MRESERVED2", "MReserved2");
|
||||
define("TX_MRESERVED3", "MReserved3");
|
||||
//ManageInfo
|
||||
define("TX_LANGUAGE", "Language");
|
||||
define("TX_URL", "URL");
|
||||
define("TX_TXVERSION", "TXVersion");
|
||||
define("TX_TXUSERIP", "TXUserIP");
|
||||
define("TX_TXUSERID", "TXUserID");
|
||||
define("TX_TXREGNUM", "TXRegNum");
|
||||
define("TX_ACK", "Ack");
|
||||
define("TX_RN", "TXRN");
|
||||
//CancelInfo
|
||||
define("TX_CANCELTID", "CancelTID");
|
||||
define("TX_CANCELMSG", "CancelMsg");
|
||||
define("TX_CANCELREASON", "CancelReason"); //2012-10-19 <20><><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>ڵ<EFBFBD> <20>߰<EFBFBD>
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȯ<EFBFBD><C8AF>(09.08.05)
|
||||
define("TX_REFUNDACCTNUM", "RefundAcctNum");
|
||||
define("TX_REFUNDBANKCODE", "RefundBankCode");
|
||||
define("TX_REFUNDACCTNAME", "RefundAcctName");
|
||||
//PartCancelInfo
|
||||
define("TX_PRTC_TID", "PRTC_TID");
|
||||
define("TX_PRTC_PRICE", "PRTC_Price");
|
||||
define("TX_PRTC_REMAINS", "PRTC_Remains");
|
||||
define("TX_PRTC_QUOTA", "PRTC_Quota");
|
||||
define("TX_PRTC_INTEREST", "PRTC_Interest");
|
||||
define("TX_PRTC_TAX", "Tax");
|
||||
define("TX_PRTC_TAXFREE", "TaxFree");
|
||||
|
||||
define("TX_PRTC_CURRENCY", "Currency");
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> I<><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ü <20>κ<EFBFBD><CEBA><EFBFBD><EFBFBD>ҽ<EFBFBD> <20><><EFBFBD>¹<EFBFBD>ȣ/<2F><><EFBFBD><EFBFBD><EFBFBD>ּ<EFBFBD><D6BC><EFBFBD><EFBFBD>߰<EFBFBD> 2011-10-06
|
||||
define("TX_PRTC_NOACCT", "PRTC_NoAcctFNBC");
|
||||
define("TX_PRTC_NMACCT", "PRTC_NmAcctFNBC");
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>κ<EFBFBD>ȯ<EFBFBD><C8AF> <20><><EFBFBD><EFBFBD> <20>߰<EFBFBD>
|
||||
define("TX_PRTC_REFUNDFLGREMIT", "PRTC_RefundFlgRemit");
|
||||
define("TX_PRTC_REFUNDBANKCODE", "PRTC_RefundBankCode");
|
||||
//CaptureInfo
|
||||
define("TX_CAPTURETID", "CaptureTID");
|
||||
//<2F><><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD><EFBFBD>
|
||||
define("TX_CSHR_APPLPRICE", "CSHR_ApplPrice");
|
||||
define("TX_CSHR_SUPPLYPRICE", "CSHR_SupplyPrice");
|
||||
define("TX_CSHR_TAX", "CSHR_Tax");
|
||||
define("TX_CSHR_SERVICEPRICE", "CSHR_ServicePrice");
|
||||
define("TX_CSHR_REGNUM", "CSHR_RegNum");
|
||||
define("TX_CSHR_TYPE", "CSHR_Type");
|
||||
define("TX_CSHR_COMPANYNUM", "CSHR_CompanyNum");
|
||||
define("TX_CSHR_OPENMARKET", "CSHR_OpenMarket");
|
||||
define("TX_CSHR_SUBCNT", "CSHR_SubCnt");
|
||||
define("TX_CSHR_SUBCOMPANYNAME1", "CSHR_SubCompanyName1");
|
||||
define("TX_CSHR_SUBCOMPANYNUM1", "CSHR_SubCompanyNum1");
|
||||
define("TX_CSHR_SUBREGNUM1", "CSHR_SubRegNum1");
|
||||
define("TX_CSHR_SUBMID1", "CSHR_SubMID1");
|
||||
define("TX_CSHR_SUBAPPLPRICE1", "CSHR_SubApplPrice1");
|
||||
define("TX_CSHR_SUBSERVICEPRICE1", "CSHR_SubServicePrice1");
|
||||
//<2F>ŷ<EFBFBD><C5B7><EFBFBD>ȸ(12.04.20)
|
||||
define("TX_INQR_TID", "INQR_TID");
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(14.03.06)
|
||||
define("TX_OPENREG_TID", "OrgTID");
|
||||
define("TX_OPENREG_MID", "MID");
|
||||
define("TX_OPENREG_SUBCNT", "SubCnt");
|
||||
define("TX_OPENREG_SUBGOODS", "SubGoods");
|
||||
define("TX_OPENREG_SUBCOMPNO", "SubCompNo");
|
||||
define("TX_OPENREG_SUBCOMPNM", "SubCompNm");
|
||||
define("TX_OPENREG_SUBPRSUPPLY", "SubPrSupply");
|
||||
define("TX_OPENREG_SUBPRFREE", "SubPrFree");
|
||||
define("TX_OPENREG_SUBPRTAX", "SubPrTax");
|
||||
define("TX_OPENREG_SUBPRSERVICE", "SubPrService");
|
||||
define("TX_OPENREG_SUBPRICE", "SubPrice");
|
||||
|
||||
//------------------------------------------------------
|
||||
//
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//
|
||||
//------------------------------------------------------
|
||||
//HEAD
|
||||
define("NM_MID", "MID");
|
||||
define("NM_TID", "TID");
|
||||
define("NM_TOTPRICE", "TotPrice");
|
||||
|
||||
//BODY
|
||||
define("NM_GOODSCNT", "GoodsCnt");
|
||||
define("NM_MOID", "MOID");
|
||||
define("NM_CURRENCY", "Currency");
|
||||
define("NM_SMID", "SMID");
|
||||
define("NM_GOODSNAME", "GoodsName");
|
||||
define("NM_GOODSPRICE", "GoodsPrice");
|
||||
define("NM_PAYMETHOD", "PayMethod");
|
||||
define("NM_RESULTCODE", "ResultCode");
|
||||
define("NM_RESULTERRORCODE", "ResultErrorCode");
|
||||
define("NM_RESULTMSG", "ResultMsg");
|
||||
define("NM_SESSIONKEY", "SessionKey");
|
||||
define("NM_ENCRYPTED", "Encrypted");
|
||||
define("NM_CANCELDATE", "CancelDate");
|
||||
define("NM_CANCELTIME", "CancelTime");
|
||||
define("NM_EVENTCODE", "EventCode");
|
||||
define("NM_ORGCURRENCY", "OrgCurrency");
|
||||
define("NM_ORGPRICE", "OrgPrice");
|
||||
define("NM_EXCHANGERATE", "ExchangeRate");
|
||||
define("NM_RESERVEDINFO", "ReservedInfo");
|
||||
define("NM_MRESERVED1", "MReserved1");
|
||||
define("NM_MRESERVED2", "MReserved2");
|
||||
define("NM_MRESERVED3", "MReserved3");
|
||||
define("PRTC_TID", "PRTC_TID");
|
||||
define("PRTC_PRICE", "PRTC_Price");
|
||||
define("PRTC_REMAINS", "PRTC_Remains");
|
||||
define("PRTC_QUOTA", "PRTC_Quota");
|
||||
define("PRTC_INTEREST", "PRTC_Interest");
|
||||
define("PRTC_TYPE", "PRTC_Type");
|
||||
define("PRTC_CNT", "PRTC_Cnt");
|
||||
define("NM_CAPTUREDATE", "CaptureDate");
|
||||
define("NM_CAPTURETIME", "CaptureTime");
|
||||
|
||||
define("NM_PGPUBKEY", "PGcertKey");
|
||||
|
||||
//RECV DATA XPATH
|
||||
//XML XPATH
|
||||
define("ROOTINFO", "INIpay");
|
||||
define("GOODSINFO", "GoodsInfo");
|
||||
define("GOODS", "Goods");
|
||||
define("BUYERINFO", "BuyerInfo");
|
||||
define("PAYMENTINFO", "PaymentInfo");
|
||||
define("PAYMENT", "Payment");
|
||||
define("MANAGEINFO", "ManageInfo");
|
||||
define("RESERVEDINFO", "ReservedInfo");
|
||||
//Cancel(NetCancel)
|
||||
define("CANCELINFO", "CancelInfo");
|
||||
//PartCancel Encrypt
|
||||
define("PARTCANCELINFO", "PartCancelInfo");
|
||||
//Capture
|
||||
define("CAPTUREINFO", "CaptureInfo");
|
||||
//<2F>ŷ<EFBFBD><C5B7><EFBFBD>ȸ(12.04.20)
|
||||
define("INQUIRYINFO", "InquiryInfo");
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(14.03.06)
|
||||
define("OPENSUBINFO", "OpenSubInfo");
|
||||
//Escrow
|
||||
//added 2008.01.09
|
||||
define("ESCROWINFO", "EscrowInfo");
|
||||
define("ESCROW_DELIVERY", "Delivery");
|
||||
define("ESCROW_CONFIRM", "Confirm");
|
||||
define("ESCROW_DENY", "Deny");
|
||||
define("ESCROW_DENYCONFIRM", "DenyConfirm");
|
||||
|
||||
|
||||
//------------------------------------------------------
|
||||
//Auth Encrypt XPATH
|
||||
//------------------------------------------------------
|
||||
//CARD COMMON
|
||||
define("APPLDATE", "ApplDate");
|
||||
define("APPLTIME", "ApplTime");
|
||||
define("APPLNUM", "ApplNum");
|
||||
//CARD
|
||||
define("CARD_NUM", "CARD_Num");
|
||||
define("CARD_EXPIRE", "CARD_Expire");
|
||||
define("CARD_CODE", "CARD_Code");
|
||||
define("CARD_APPLPRICE", "CARD_ApplPrice");
|
||||
define("CARD_BANKCODE", "CARD_BankCode");
|
||||
define("CARD_QUOTA", "CARD_Quota");
|
||||
define("CARD_INTEREST", "CARD_Interest");
|
||||
define("CARD_POINT", "CARD_Point");
|
||||
define("CARD_AUTHTYPE", "CARD_AuthType");
|
||||
define("CARD_REGNUM", "CARD_RegNum");
|
||||
define("CARD_APPLDATE", "CARD_ApplDate");
|
||||
define("CARD_APPLTIME", "CARD_ApplTime");
|
||||
define("CARD_APPLNUM", "CARD_ApplNum");
|
||||
define("CARD_RESULTCODE", "CARD_ResultCode");
|
||||
define("CARD_RESULTMSG", "CARD_ResultMsg");
|
||||
define("CARD_TERMINALNUM", "CARD_TerminalNum");
|
||||
define("CARD_MEMBERNUM", "CARD_MemberNum");
|
||||
define("CARD_PURCHASECODE", "CARD_PurchaseCode");
|
||||
//ISP
|
||||
define("ISP_BANKCODE", "ISP_BankCode");
|
||||
define("ISP_QUOTA", "ISP_Quota");
|
||||
define("ISP_INTEREST", "ISP_Interest");
|
||||
define("ISP_APPLPRICE", "ISP_ApplPrice");
|
||||
define("ISP_CARDCODE", "ISP_CardCode");
|
||||
define("ISP_CARDNUM", "ISP_CardNum");
|
||||
define("ISP_POINT", "ISP_Point");
|
||||
define("ISP_APPLDATE", "ISP_ApplDate");
|
||||
define("ISP_APPLTIME", "ISP_ApplTime");
|
||||
define("ISP_APPLNUM", "ISP_ApplNum");
|
||||
define("ISP_RESULTCODE", "ISP_ResultCode");
|
||||
define("ISP_RESULTMSG", "ISP_ResultMsg");
|
||||
define("ISP_TERMINALNUM", "ISP_TerminalNum");
|
||||
define("ISP_MEMBERNUM", "ISP_MemberNum");
|
||||
define("ISP_PURCHASECODE", "ISP_PurchaseCode");
|
||||
//ACCT
|
||||
define("ACCT_APPLDATE", "ACCT_ApplDate");
|
||||
define("ACCT_APPLTIME", "ACCT_ApplTime");
|
||||
define("ACCT_APPLNUM", "ACCT_ApplNum");
|
||||
//HPP
|
||||
define("HPP_APPLDATE", "HPP_ApplDate");
|
||||
define("HPP_APPLTIME", "HPP_ApplTime");
|
||||
define("HPP_APPLNUM", "HPP_ApplNum");
|
||||
//VACT
|
||||
define("VACT_APPLDATE", "VACT_ApplDate");
|
||||
define("VACT_APPLTIME", "VACT_ApplTime");
|
||||
//CASH
|
||||
define("CSHR_APPLDATE", "CSHR_ApplDate");
|
||||
define("CSHR_APPLTIME", "CSHR_ApplTime");
|
||||
define("CSHR_APPLNUM", "CSHR_ApplNum");
|
||||
//ARSB
|
||||
define("ARSB_APPLDATE", "ARSB_ApplDate");
|
||||
define("ARSB_APPLTIME", "ARSB_ApplTime");
|
||||
define("ARSB_APPLNUM", "ARSB_ApplNum");
|
||||
//PHNB
|
||||
define("PHNB_APPLDATE", "PHNB_ApplDate");
|
||||
define("PHNB_APPLTIME", "PHNB_ApplTime");
|
||||
define("PHNB_APPLNUM", "PHNB_ApplNum");
|
||||
//CULT
|
||||
define("CULT_APPLDATE", "CULT_ApplDate");
|
||||
define("CULT_APPLTIME", "CULT_ApplTime");
|
||||
define("CULT_APPLNUM", "CULT_ApplNum");
|
||||
//DGCL
|
||||
define("GAMG_CNT", "GAMG_Cnt");
|
||||
define("GAMG_APPLDATE", "GAMG_ApplDate");
|
||||
define("GAMG_APPLTIME", "GAMG_ApplTime");
|
||||
define("GAMG_APPLNUM", "GAMG_ApplNum");
|
||||
|
||||
function MakePathGAMG($cnt) {
|
||||
for ($i = 1; $i <= $cnt; $i++) {
|
||||
define("GAMG_NUM$i", "GAMG_Num$i");
|
||||
define("GAMG_REMAINS$i", "GAMG_Remains$i");
|
||||
define("GAMG_ERRMSG$i", "GAMG_ErrMsg$i");
|
||||
}
|
||||
}
|
||||
|
||||
//EDUG
|
||||
define("EDUG_APPLDATE", "EDUG_ApplDate");
|
||||
define("EDUG_APPLTIME", "EDUG_ApplTime");
|
||||
define("EDUG_APPLNUM", "EDUG_ApplNum");
|
||||
//TEEN
|
||||
define("TEEN_APPLDATE", "TEEN_ApplDate");
|
||||
define("TEEN_APPLTIME", "TEEN_ApplTime");
|
||||
define("TEEN_APPLNUM", "TEEN_ApplNum");
|
||||
|
||||
//----------------------------------
|
||||
//ERROR CODE
|
||||
//----------------------------------
|
||||
//!!<21><>TX<54><58> <20>߰<EFBFBD><DFB0><EFBFBD> <20><><EFBFBD><EFBFBD>!!!
|
||||
define("NULL_DIR_ERR", "TX9001");
|
||||
define("NULL_TYPE_ERR", "TX9002");
|
||||
define("NULL_NOINTEREST_ERR", "TX9003");
|
||||
define("NULL_QUOTABASE_ERR", "TX9004");
|
||||
define("DNS_LOOKUP_ERR", "TX9005");
|
||||
define("MERCHANT_DB_ERR", "TX9006");
|
||||
define("DNS_LOOKUP_TIMEOUT_ERR", "TX9007");
|
||||
define("PGPUB_UPDATE_ERR", "TX9612");
|
||||
|
||||
//<2F>Ϻ<EFBFBD>ȣȭ <20><><EFBFBD><EFBFBD>
|
||||
define("B64DECODE_UPDATE_ERR", "TX9101");
|
||||
define("B64DECODE_FINAL_ERR", "TX9102");
|
||||
define("B64DECODE_LENGTH_ERR", "TX9103");
|
||||
define("GET_KEYPW_EVP_B2K_ERR", "TX9104");
|
||||
define("GET_KEYPW_FILE_OPEN_ERR", "TX9105");
|
||||
define("GET_KEYPW_FILE_READ_ERR", "TX9106");
|
||||
define("GET_KEYPW_DECRYPT_INIT_ERR", "TX9107");
|
||||
define("GET_KEYPW_DECRYPT_UPDATE_ERR", "TX9108");
|
||||
define("GET_KEYPW_DECRYPT_FINAL_ERR", "TX9109");
|
||||
define("ENC_RAND_BYTES_ERR", "TX9110");
|
||||
define("ENC_INIT_ERR", "TX9111");
|
||||
define("ENC_UPDATE_ERR", "TX9112");
|
||||
define("ENC_FINAL_ERR", "TX9113");
|
||||
define("ENC_RSA_ERR", "TX9114");
|
||||
define("DEC_RSA_ERR", "TX9115");
|
||||
define("DEC_CIPHER_ERR", "TX9116");
|
||||
define("DEC_INIT_ERR", "TX9117");
|
||||
define("DEC_UPDATE_ERR", "TX9118");
|
||||
define("DEC_FINAL_ERR", "TX9119");
|
||||
define("SIGN_FINAL_ERR", "TX9120");
|
||||
define("SIGN_CHECK_ERR", "TX9121");
|
||||
define("ENC_NULL_F_ERR", "TX9122");
|
||||
define("ENC_INIT_RAND_ERR", "TX9123");
|
||||
define("ENC_PUTENV_ERR", "TX9124");
|
||||
//<2F>ʵ<EFBFBD>üũ
|
||||
define("NULL_KEYPW_ERR", "TX9201");
|
||||
define("NULL_MID_ERR", "TX9202");
|
||||
define("NULL_PGID_ERR", "TX9203");
|
||||
define("NULL_TID_ERR", "TX9204");
|
||||
define("NULL_UIP_ERR", "TX9205");
|
||||
define("NULL_URL_ERR", "TX9206");
|
||||
define("NULL_PRICE_ERR", "TX9207");
|
||||
define("NULL_PRICE1_ERR", "TX9208");
|
||||
define("NULL_PRICE2_ERR", "TX9209");
|
||||
define("NULL_CARDNUMBER_ERR", "TX9210");
|
||||
define("NULL_CARDEXPIRE_ERR", "TX9211");
|
||||
define("NULL_ENCRYPTED_ERR", "TX9212");
|
||||
define("NULL_CARDQUOTA_ERR", "TX9213");
|
||||
define("NULL_QUOTAINTEREST_ERR", "TX9214");
|
||||
define("NULL_AUTHENTIFICATION_ERR", "TX9215");
|
||||
define("NULL_AUTHFIELD1_ERR", "TX9216");
|
||||
define("NULL_AUTHFIELD2_ERR", "TX9217");
|
||||
define("NULL_BANKCODE_ERR", "TX9218");
|
||||
define("NULL_BANKACCOUNT_ERR", "TX9219");
|
||||
define("NULL_REGNUMBER_ERR", "TX9220");
|
||||
define("NULL_OCBCARDNUM_ERR", "TX9221");
|
||||
define("NULL_OCBPASSWD_ERR", "TX9222");
|
||||
define("NULL_PASSWD_ERR", "TX9223");
|
||||
define("NULL_CURRENCY_ERR", "TX9224");
|
||||
define("NULL_PAYMETHOD_ERR", "TX9225");
|
||||
define("NULL_GOODNAME_ERR", "TX9226");
|
||||
define("NULL_BUYERNAME_ERR", "TX9227");
|
||||
define("NULL_BUYERTEL_ERR", "TX9228");
|
||||
define("NULL_BUYEREMAIL_ERR", "TX9229");
|
||||
define("NULL_SESSIONKEY_ERR", "TX9230");
|
||||
//pg<70><67><EFBFBD><EFBFBD>Ű <20>ε<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
define("NULL_PGCERT_FP_ERR", "TX9231");
|
||||
define("NULL_X509_ERR", "TX9232");
|
||||
define("NULL_PGCERT_ERR", "TX9233");
|
||||
|
||||
define("RESULT_MSG_FORMAT_ERR", "TX9234");
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ü <20><><EFBFBD><EFBFBD>
|
||||
define("NULL_PERNO_ERR", "TX9235"); // <20>ֹι<D6B9>ȣ <20><><EFBFBD><EFBFBD>
|
||||
define("NULL_OID_ERR", "TX9236"); // <20>ֹ<EFBFBD><D6B9><EFBFBD>ȣ <20><><EFBFBD><EFBFBD>
|
||||
define("NULL_VCDBANK_ERR", "TX9237"); // <20><><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
define("NULL_DTINPUT_ERR", "TX9238"); // <20>Ա<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
define("NULL_NMINPUT_ERR", "TX9239"); // <20>۱<EFBFBD><DBB1><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
//<2F>ǽð<C7BD> <20><><EFBFBD><EFBFBD>
|
||||
define("NULL_BILLKEY_ERR", "TX9240"); // <20><>Ű <20><><EFBFBD><EFBFBD>
|
||||
define("NULL_CARDPASS_ERR", "TX9241"); // ī<><C4AB> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
define("NULL_BILLTYPE_ERR", "TX9242"); // <20><>Ÿ<EFBFBD><C5B8> <20><><EFBFBD><EFBFBD>
|
||||
// CMS <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ü
|
||||
define("NULL_PRICE_ORG_ERR", "TX9250"); // CMS <20><><EFBFBD><EFBFBD><EFBFBD>ѱݾ<D1B1> <20><><EFBFBD><EFBFBD>
|
||||
define("NULL_CMSDAY_ERR", "TX9251"); // CMS <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
define("NULL_CMSDATEFROM_ERR", "TX9252"); // CMS <20><><EFBFBD>ݽ<EFBFBD><DDBD>ۿ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
define("NULL_CMSDATETO_ERR", "TX9253"); // CMS <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
// <20>κ<EFBFBD><CEBA><EFBFBD><EFBFBD><EFBFBD>
|
||||
define("NULL_CONFIRM_PRICE_ERR", "TX9260"); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>û<EFBFBD>ݾ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
// <20><><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
define("NULL_CR_PRICE_ERR", "TX9270"); // <20><><EFBFBD>ݰ<EFBFBD><DDB0><EFBFBD> <20>ݾ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
define("NULL_SUP_PRICE_ERR", "TX9271"); // <20><><EFBFBD>ް<EFBFBD><DEB0><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
define("NULL_TAX_ERR", "TX9272"); // <20>ΰ<EFBFBD><CEB0><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
define("NULL_SRVC_PRICE_ERR", "TX9273"); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
define("NULL_REG_NUM_ERR", "TX9274"); // <20>ֹι<D6B9>ȣ(<28><><EFBFBD><EFBFBD><EFBFBD>ڹ<EFBFBD>ȣ)
|
||||
define("NULL_USEOPT_ERR", "TX9275"); // <20><><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD><EFBFBD> <20>뵵 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
define("PRIVKEY_FILE_OPEN_ERR", "TX9301");
|
||||
define("INVALID_KEYPASS_ERR", "TX9302");
|
||||
|
||||
define("MAKE_TID_ERR", "TX9401");
|
||||
define("ACK_CHECKSUM_ERR", "TX9402");
|
||||
define("NETCANCEL_SOCK_CREATE_ERR", "TX9403");
|
||||
define("NETCANCEL_SOCK_SEND_ERR", "TX9404");
|
||||
define("NETCANCEL_SOCK_RECV_ERR", "TX9405");
|
||||
define("LOG_OPEN_ERR", "TX9406");
|
||||
define("LOG_WRITE_ERR", "TX9407");
|
||||
|
||||
define("SOCK_MAKE_EP_ERR", "TX9501");
|
||||
define("SOCK_CONN_ERR", "TX9502");
|
||||
define("SOCK_SEND1_ERR", "TX9503");
|
||||
define("SOCK_SEND2_ERR", "TX9504");
|
||||
define("SOCK_CLOSED_BY_PEER_ERR", "TX9505");
|
||||
define("SOCK_RECV1_ERR", "TX9506");
|
||||
define("SOCK_RECV2_ERR", "TX9507");
|
||||
define("SOCK_RECV_LEN_ERR", "TX9508");
|
||||
define("SOCK_TIMEO_ERR", "TX9509");
|
||||
define("SOCK_ETC1_ERR", "TX9510");
|
||||
define("SOCK_ETC2_ERR", "TX9511");
|
||||
|
||||
define("NULL_ESCROWTYPE_ERR", "TX6000");
|
||||
define("NULL_ESCROWMSG_ERR", "TX6001");
|
||||
|
||||
define("NULL_FIELD_REFUNDACCTNUM", "TX9245");
|
||||
define("NULL_FIELD_REFUNDBANKCODE", "TX9243");
|
||||
define("NULL_FIELD_REFUNDACCTNAME", "TX9244");
|
||||
?>
|
||||
795
shop/inicis/libs/INILib.php
Normal file
795
shop/inicis/libs/INILib.php
Normal file
@ -0,0 +1,795 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2007 INICIS Inc.
|
||||
*
|
||||
* <20>ش<EFBFBD> <20><><EFBFBD>̺귯<CCBA><EAB7AF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǿ<C7BE><EEBCAD> <20>ȵ˴ϴ<CBB4>.
|
||||
* <20><><EFBFBD>Ƿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ڵ忡 <20><><EFBFBD><EFBFBD> å<><C3A5><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ڿ<EFBFBD><DABF><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>˷<EFBFBD><CBB7>帳<EFBFBD>ϴ<EFBFBD>.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
require_once('INICls.php');
|
||||
require_once('INISoc.php');
|
||||
|
||||
class INIpay50
|
||||
{
|
||||
var $m_type; // <20>ŷ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
var $m_resulterrcode; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><DEBC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD>
|
||||
var $m_connIP;
|
||||
var $m_cancelRC = 0;
|
||||
|
||||
var $m_Data;
|
||||
var $m_Log;
|
||||
var $m_Socket;
|
||||
var $m_Crypto;
|
||||
|
||||
var $m_REQUEST = array();
|
||||
var $m_REQUEST2 = array();
|
||||
var $m_RESULT = array();
|
||||
|
||||
function INIpay()
|
||||
{
|
||||
$this->UnsetField();
|
||||
}
|
||||
|
||||
function UnsetField()
|
||||
{
|
||||
unset($this->m_REQUEST);
|
||||
unset($this->m_RESULT);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
/* */
|
||||
/* <20><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD> <20><>û<EFBFBD><C3BB> Set or Add */
|
||||
/* */
|
||||
/*--------------------------------------------------*/
|
||||
function SetField( $key, $val ) //Default Entity
|
||||
{
|
||||
$this->m_REQUEST[$key] = $val;
|
||||
}
|
||||
function SetXPath( $xpath, $val ) //User Defined Entity
|
||||
{
|
||||
$this->m_REQUEST2[$xpath] = $val;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
/* */
|
||||
/* <20><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> fetch */
|
||||
/* */
|
||||
/*--------------------------------------------------*/
|
||||
function GetResult( $name ) //Default Entity
|
||||
{
|
||||
$result = $this->m_RESULT[$name];
|
||||
if( $result == "" )
|
||||
$result = $this->m_Data->GetXMLData( $name );
|
||||
if( $result == "" )
|
||||
$result = $this->m_Data->m_RESULT[$name];
|
||||
return $result;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
/* */
|
||||
/* <20><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD> ó<><C3B3> <20><><EFBFBD><EFBFBD> */
|
||||
/* */
|
||||
/*--------------------------------------------------*/
|
||||
function startAction()
|
||||
{
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
/* Overhead Operation */
|
||||
/*--------------------------------------------------*/
|
||||
$this->m_Data = new INIData( $this->m_REQUEST, $this->m_REQUEST2 );
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
/* Log Start */
|
||||
/*--------------------------------------------------*/
|
||||
$this->m_Log = new INILog( $this->m_REQUEST );
|
||||
if(!$this->m_Log->StartLog())
|
||||
{
|
||||
$this->MakeTXErrMsg( LOG_OPEN_ERR, "<EFBFBD>α<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.[".$this->m_REQUEST["inipayhome"]."]");
|
||||
return;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
/* Logging Request Parameter */
|
||||
/*--------------------------------------------------*/
|
||||
$this->m_Log->WriteLog( DEBUG, $this->m_REQUEST );
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
/* Set Type */
|
||||
/*--------------------------------------------------*/
|
||||
$this->m_type = $this->m_REQUEST["type"];
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
/* Check Field */
|
||||
/*--------------------------------------------------*/
|
||||
if( !$this->m_Data->CheckField() )
|
||||
{
|
||||
$err_msg = "<EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD>(".$this->m_Data->m_ErrMsg.")<29><> <20><><EFBFBD><EFBFBD><EFBFBD>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD>ϴ<EFBFBD>.";
|
||||
$this->MakeTXErrMsg( $this->m_Data->m_ErrCode, $err_msg );
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) );
|
||||
return;
|
||||
}
|
||||
$this->m_Log->WriteLog( INFO, "Check Field OK" );
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ű<><C5B0><EFBFBD><EFBFBD>. <20><><EFBFBD>⼭ <20><>!!
|
||||
/*--------------------------------------------------*/
|
||||
if( $this->m_type == TYPE_CHKFAKE )
|
||||
{
|
||||
return $this->MakeChkFake();
|
||||
}
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//Generate TID
|
||||
/*--------------------------------------------------*/
|
||||
if( $this->m_type == TYPE_SECUREPAY || $this->m_type == TYPE_FORMPAY || $this->m_type == TYPE_OCBSAVE ||
|
||||
$this->m_type == TYPE_AUTHBILL || $this->m_type == TYPE_FORMAUTH || $this->m_type == TYPE_REQREALBILL ||
|
||||
$this->m_type == TYPE_REPAY || $this->m_type == TYPE_VACCTREPAY || $this->m_type == TYPE_RECEIPT || $this->m_type == TYPE_AUTH
|
||||
)
|
||||
{
|
||||
if(!$this->m_Data->MakeTID())
|
||||
{
|
||||
$err_msg = "TID<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>.::".$this->m_Data->m_sTID;
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->MakeTXErrMsg( MAKE_TID_ERR, $err_msg );
|
||||
$this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) );
|
||||
return;
|
||||
}
|
||||
$this->m_Log->WriteLog( INFO, 'Make TID OK '.$this->m_Data->m_sTID );
|
||||
}
|
||||
|
||||
$this->m_Crypto = new INICrypto( $this->m_REQUEST );
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//PI<50><49><EFBFBD><EFBFBD>Ű <20>ε<EFBFBD>
|
||||
/*--------------------------------------------------*/
|
||||
$this->m_Data->ParsePIEncrypted();
|
||||
$this->m_Log->WriteLog( INFO, "PI PUB KEY LOAD OK [".$this->m_Data->m_PIPGPubSN."]" );
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//PG<50><47><EFBFBD><EFBFBD>Ű <20>ε<EFBFBD>
|
||||
/*--------------------------------------------------*/
|
||||
if( ($rtv = $this->m_Crypto->LoadPGPubKey( $pg_cert_SN )) != OK)
|
||||
{
|
||||
$err_msg = "PG<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ű <20>ε<EFBFBD><CEB5><EFBFBD><EFBFBD><EFBFBD>";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) );
|
||||
return;
|
||||
}
|
||||
$this->m_Data->m_TXPGPubSN = $pg_cert_SN;
|
||||
$this->m_Log->WriteLog( INFO, "PG PUB KEY LOAD OK [".$this->m_Data->m_TXPGPubSN."]" );
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ű <20>ε<EFBFBD>
|
||||
/*--------------------------------------------------*/
|
||||
if( ($rtv = $this->m_Crypto->LoadMPrivKey()) != OK )
|
||||
{
|
||||
$err_msg = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ű <20>ε<EFBFBD><CEB5><EFBFBD><EFBFBD><EFBFBD>";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) );
|
||||
$this->m_Crypto->FreePubKey();
|
||||
return;
|
||||
}
|
||||
$this->m_Log->WriteLog( INFO, "MERCHANT PRIV KEY LOAD OK" );
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ű <20>ε<EFBFBD>(SN <20><> <20>˱<EFBFBD><CBB1><EFBFBD><EFBFBD><EFBFBD>!!)
|
||||
/*--------------------------------------------------*/
|
||||
if( ($rtv = $this->m_Crypto->LoadMPubKey( $m_cert_SN )) != OK)
|
||||
{
|
||||
$err_msg = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ű <20>ε<EFBFBD><CEB5><EFBFBD><EFBFBD><EFBFBD>";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) );
|
||||
return;
|
||||
}
|
||||
$this->m_Data->m_MPubSN = $m_cert_SN;
|
||||
$this->m_Log->WriteLog( INFO, "MERCHANT PUB KEY LOAD OK [".$this->m_Data->m_MPubSN."]" );
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ȣȭ( formpay, cancel, repay, recept, inquiry, opensub)
|
||||
/*--------------------------------------------------*/
|
||||
if( $this->m_type == TYPE_CANCEL || $this->m_type == TYPE_REPAY || $this->m_type == TYPE_VACCTREPAY ||
|
||||
$this->m_type == TYPE_FORMPAY || $this->m_type == TYPE_RECEIPT ||
|
||||
$this->m_type == TYPE_CAPTURE || $this->m_type == TYPE_INQUIRY || $this->m_type == TYPE_OPENSUB ||
|
||||
($this->m_type == TYPE_ESCROW && $this->m_Data->m_EscrowType == TYPE_ESCROW_DLV ) ||
|
||||
($this->m_type == TYPE_ESCROW && $this->m_Data->m_EscrowType == TYPE_ESCROW_DNY_CNF ) ||
|
||||
$this->m_type == TYPE_REFUND
|
||||
)
|
||||
{
|
||||
if( ($rtv = $this->m_Data->MakeEncrypt( $this->m_Crypto )) != OK )
|
||||
{
|
||||
$err_msg = "<EFBFBD><EFBFBD>ȣȭ <20><><EFBFBD><EFBFBD>";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) );
|
||||
return;
|
||||
}
|
||||
//$this->m_Log->WriteLog( DEBUG, "MAKE ENCRYPT OK" );
|
||||
$this->m_Log->WriteLog( DEBUG, "MAKE ENCRYPT OK[".$this->m_Data->m_EncBody."]" );
|
||||
}
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(Body)
|
||||
/*--------------------------------------------------*/
|
||||
$this->m_Data->MakeBody();
|
||||
$this->m_Log->WriteLog( INFO, "MAKE BODY OK" );
|
||||
//$this->m_Log->WriteLog( INFO, "MAKE BODY OK[".$this->m_Data->m_sBody."]" );
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//<2F><><EFBFBD><EFBFBD>(sign)
|
||||
/*--------------------------------------------------*/
|
||||
if( ($rtv = $this->m_Crypto->Sign( $this->m_Data->m_sBody, $sign )) != OK )
|
||||
{
|
||||
$err_msg = "<EFBFBD><EFBFBD><EFBFBD>ν<EFBFBD><EFBFBD><EFBFBD>";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) );
|
||||
$this->m_Crypto->FreeAllKey();
|
||||
return;
|
||||
}
|
||||
$this->m_Data->m_sTail = $sign;
|
||||
$this->m_Log->WriteLog( INFO, "SIGN OK" );
|
||||
//$this->m_Log->WriteLog( INFO, "SIGN OK[".$sign."]" );
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(Head)
|
||||
/*--------------------------------------------------*/
|
||||
$this->m_Data->MakeHead();
|
||||
$this->m_Log->WriteLog( INFO, "MAKE HEAD OK" );
|
||||
//$this->m_Log->WriteLog( INFO, "MAKE HEAD OK[".$head."]" );
|
||||
|
||||
$this->m_Log->WriteLog( INFO, "MSG_TO_PG:[".$this->m_Data->m_sMsg."]" );
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//<2F><><EFBFBD>ϻ<EFBFBD><CFBB><EFBFBD>
|
||||
/*--------------------------------------------------*/
|
||||
//DRPG <20><><EFBFBD><EFBFBD>, added 07.11.15
|
||||
//<2F><><EFBFBD>ҽ<EFBFBD>-PG<50><47><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>->IP), edited 10.09.09
|
||||
if( $this->m_type == TYPE_SECUREPAY )
|
||||
{
|
||||
if( $this->m_REQUEST["pgn"] == "" )
|
||||
$host = $this->m_Data->m_PG1;
|
||||
else
|
||||
$host = $this->m_REQUEST["pgn"];
|
||||
}
|
||||
else
|
||||
{
|
||||
if( $this->m_REQUEST["pgn"] == "" )
|
||||
{
|
||||
if( $this->m_cancelRC == 1 )
|
||||
$host = DRPG_IP;
|
||||
else
|
||||
$host = PG_IP;
|
||||
}
|
||||
else
|
||||
$host = $this->m_REQUEST["pgn"];
|
||||
}
|
||||
|
||||
$this->m_Socket = new INISocket($host);
|
||||
if( ($rtv = $this->m_Socket->DNSLookup()) != OK )
|
||||
{
|
||||
$err_msg = "[".$host."]DNS LOOKUP <20><><EFBFBD><EFBFBD>(MAIN)".$this->m_Socket->getErr();
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
if( $this->m_type == TYPE_SECUREPAY ) //PI<50>ϰ<EFBFBD><CFB0><EFBFBD>, PI<50><49> <20><><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD> pg1ip<69><70>!
|
||||
{
|
||||
$this->m_Socket->ip = $this->m_Data->m_PG1IP;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( $this->m_cancelRC == 1 )
|
||||
$this->m_Socket->ip = DRPG_IP;
|
||||
else
|
||||
$this->m_Socket->ip = PG_IP;
|
||||
}
|
||||
}
|
||||
$this->m_Log->WriteLog( INFO, "DNS LOOKUP OK(".$this->m_Socket->host.":".$this->m_Socket->ip.":".$this->m_Socket->port.") laptime:".$this->m_Socket->dns_laptime );
|
||||
if( ($rtv = $this->m_Socket->open()) != OK )
|
||||
{
|
||||
$this->m_Socket->close();
|
||||
|
||||
//PG2<47><32> <20><>ȯ
|
||||
$err_msg = "[".$host."<EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(MAIN)::PG2<47><32> <20><>ȯ";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
if( $this->m_type == TYPE_SECUREPAY )
|
||||
{
|
||||
$host = $this->m_Data->m_PG2;
|
||||
}
|
||||
else
|
||||
{
|
||||
$host = DRPG_HOST;
|
||||
}
|
||||
$this->m_Socket = new INISocket($host);
|
||||
if( ($rtv = $this->m_Socket->DNSLookup()) != OK )
|
||||
{
|
||||
$err_msg = "[".$host."]DNS LOOKUP <20><><EFBFBD><EFBFBD>(MAIN)".$this->m_Socket->getErr();
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
if( $this->m_type == TYPE_SECUREPAY ) //PI<50>ϰ<EFBFBD><CFB0><EFBFBD>, PI<50><49> <20><><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD> pg2ip<69><70>!
|
||||
{
|
||||
$this->m_Socket->ip = $this->m_Data->m_PG2IP;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->m_Socket->ip = DRPG_IP;
|
||||
}
|
||||
}
|
||||
$this->m_Log->WriteLog( INFO, "DNS LOOKUP OK(".$this->m_Socket->host.":".$this->m_Socket->ip.":".$this->m_Socket->port.") laptime:".$this->m_Socket->dns_laptime );
|
||||
if( ($rtv = $this->m_Socket->open()) != OK )
|
||||
{
|
||||
$err_msg = "[".$host."<EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(MAIN)::".$this->m_Socket->getErr();
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) );
|
||||
$this->m_Socket->close();
|
||||
$this->m_Crypto->FreeAllKey();
|
||||
return;
|
||||
}
|
||||
}
|
||||
$this->m_connIP = $this->m_Socket->ip;
|
||||
$this->m_Log->WriteLog( INFO, "SOCKET CONNECT OK" );
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD>۽<EFBFBD>
|
||||
/*--------------------------------------------------*/
|
||||
if( ($rtv = $this->m_Socket->send($this->m_Data->m_sMsg)) != OK )
|
||||
{
|
||||
$err_msg = "<EFBFBD><EFBFBD><EFBFBD>ϼ۽ſ<EFBFBD><EFBFBD><EFBFBD>(MAIN)::".$this->m_Socket->getErr();
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) );
|
||||
$this->m_Crypto->FreeAllKey();
|
||||
$this->m_Socket->close();
|
||||
return;
|
||||
}
|
||||
$this->m_Log->WriteLog( INFO, "SEND OK" );
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/*--------------------------------------------------*/
|
||||
if( ($rtv = $this->m_Socket->recv($head, $body, $tail)) != OK )
|
||||
{
|
||||
$err_msg = "<EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD><EFBFBD>ſ<EFBFBD><EFBFBD><EFBFBD>(MAIN)::".$this->m_Socket->getErr();
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Socket->close();
|
||||
$this->NetCancel();
|
||||
$this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) );
|
||||
$this->m_Crypto->FreeAllKey();
|
||||
return;
|
||||
}
|
||||
$this->m_Log->WriteLog( INFO, "RECV OK" );
|
||||
$this->m_Log->WriteLog( INFO, "MSG_FROM_PG:[".$head.$body.$tail."]" );
|
||||
$this->m_Data->m_Body = $body;
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//<2F><><EFBFBD><EFBFBD>Ȯ<EFBFBD><C8AE>
|
||||
/*--------------------------------------------------*/
|
||||
if( ($rtv = $this->m_Crypto->Verify( $body, $tail )) != OK )
|
||||
{
|
||||
$err_msg = "VERIFY FAIL";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Socket->close();
|
||||
$this->NetCancel();
|
||||
$this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) );
|
||||
$this->m_Crypto->FreeAllKey();
|
||||
return;
|
||||
}
|
||||
$this->m_Log->WriteLog( INFO, "VERIFY OK" );
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//Head <20>Ľ<EFBFBD>
|
||||
/*--------------------------------------------------*/
|
||||
if( ($rtv = $this->m_Data->ParseHead( $head )) != OK )
|
||||
{
|
||||
$err_msg = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(HEAD) <20>Ľ<EFBFBD> <20><><EFBFBD><EFBFBD>";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Socket->close();
|
||||
$this->NetCancel();
|
||||
$this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) );
|
||||
$this->m_Crypto->FreeAllKey();
|
||||
return;
|
||||
}
|
||||
$this->m_Log->WriteLog( INFO, "PARSE HEAD OK" );
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//Body <20>Ľ<EFBFBD>
|
||||
/*--------------------------------------------------*/
|
||||
if( ($rtv = $this->m_Data->ParseBody( $body, $encrypted, $sessionkey )) != OK )
|
||||
{
|
||||
$err_msg = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(Body) <20>Ľ<EFBFBD> <20><><EFBFBD><EFBFBD>";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Socket->close();
|
||||
$this->NetCancel();
|
||||
$this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) );
|
||||
$this->m_Crypto->FreeAllKey();
|
||||
return;
|
||||
}
|
||||
$this->m_Log->WriteLog( INFO, "PARSE BODY OK" );
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//<2F><>ȣȭ
|
||||
/*--------------------------------------------------*/
|
||||
if( $this->m_type == TYPE_SECUREPAY || $this->m_type == TYPE_FORMPAY || $this->m_type == TYPE_OCBSAVE ||
|
||||
$this->m_type == TYPE_CANCEL || $this->m_type == TYPE_AUTHBILL || $this->m_type == TYPE_FORMAUTH ||
|
||||
$this->m_type == TYPE_REQREALBILL || $this->m_type == TYPE_REPAY || $this->m_type == TYPE_VACCTREPAY || $this->m_type == TYPE_RECEIPT ||
|
||||
$this->m_type == TYPE_AUTH || $this->m_type == TYPE_CAPTURE || $this->m_type == TYPE_ESCROW ||
|
||||
$this->m_type == TYPE_REFUND || $this->m_type == TYPE_INQUIRY || $this->m_type == TYPE_OPENSUB
|
||||
)
|
||||
{
|
||||
if( ($rtv = $this->m_Crypto->Decrypt( $sessionkey, $encrypted, $decrypted )) != OK )
|
||||
{
|
||||
$err_msg = "<EFBFBD><EFBFBD>ȣȭ <20><><EFBFBD><EFBFBD>[".$this->GetResult(NM_RESULTMSG)."]";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Socket->close();
|
||||
$this->NetCancel();
|
||||
$this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) );
|
||||
$this->m_Crypto->FreeAllKey();
|
||||
return;
|
||||
}
|
||||
$this->m_Log->WriteLog( INFO, "DECRYPT OK" );
|
||||
$this->m_Log->WriteLog( DEBUG, "DECRYPT MSG:[".$decrypted."]" );
|
||||
|
||||
//Parse Decrypt
|
||||
$this->m_Data->ParseDecrypt( $decrypted );
|
||||
$this->m_Log->WriteLog( INFO, "DECRYPT PARSE OK" );
|
||||
}
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//Assign Interface Variables
|
||||
/*--------------------------------------------------*/
|
||||
$this->m_RESULT = $this->m_Data->m_RESULT;
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//ACK
|
||||
/*--------------------------------------------------*/
|
||||
//if( $this->GetResult(NM_RESULTCODE) == "00" &&
|
||||
if( (strcmp($this->GetResult(NM_RESULTCODE),"00") == 0) &&
|
||||
( $this->m_type == TYPE_SECUREPAY || $this->m_type == TYPE_OCBSAVE ||
|
||||
$this->m_type == TYPE_FORMPAY || $this->m_type == TYPE_RECEIPT
|
||||
)
|
||||
)
|
||||
{
|
||||
$this->m_Log->WriteLog( INFO, "WAIT ACK INVOKING" );
|
||||
if( ($rtv = $this->Ack()) != OK )
|
||||
{
|
||||
//ERROR
|
||||
$err_msg = "ACK <20><><EFBFBD><EFBFBD>";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Socket->close();
|
||||
$this->NetCancel();
|
||||
$this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) );
|
||||
$this->m_Crypto->FreeAllKey();
|
||||
return;
|
||||
}
|
||||
$this->m_Log->WriteLog( INFO, "SUCCESS ACK INVOKING" );
|
||||
}
|
||||
/*--------------------------------------------------*/
|
||||
//PG <20><><EFBFBD><EFBFBD>Ű<EFBFBD><C5B0> <20>ٲ<EFBFBD><D9B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ű UPDATE
|
||||
/*--------------------------------------------------*/
|
||||
$pgpubkey = $this->m_Data->GetXMLData( NM_PGPUBKEY );
|
||||
if( $pgpubkey != "" )
|
||||
{
|
||||
if( ($rtv = $this->m_Crypto->UpdatePGPubKey( $pgpubkey )) != OK )
|
||||
{
|
||||
$err_msg = "PG<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ű <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD>";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->m_Data->GTHR( $rtv, $err_msg );
|
||||
}
|
||||
else
|
||||
$this->m_Log->WriteLog( INFO, "PGPubKey UPDATED!!" );
|
||||
}
|
||||
|
||||
$this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) );
|
||||
$this->m_Crypto->FreeAllKey();
|
||||
$this->m_Socket->close();
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//<2F><><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>-<2D><><EFBFBD>ŷ<EFBFBD><C5B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD> DRPG<50><47> <20><><EFBFBD>õ<EFBFBD>
|
||||
//2008.04.01
|
||||
/*--------------------------------------------------*/
|
||||
if( $this->GetResult(NM_RESULTCODE) == "01" && ($this->m_type == TYPE_CANCEL || $this->m_type == TYPE_INQUIRY) && $this->m_cancelRC == 0 )
|
||||
{
|
||||
if( intval($this->GetResult(NM_ERRORCODE)) > 400000 && substr( $this->GetResult(NM_ERRORCODE), 3, 3 ) == "623" )
|
||||
{
|
||||
$this->m_cancelRC = 1;
|
||||
$this->startAction();
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
} // End of StartAction
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
/* */
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ÿ <20><><EFBFBD><EFBFBD> */
|
||||
/* */
|
||||
/*--------------------------------------------------*/
|
||||
function MakeChkFake()
|
||||
{
|
||||
$this->m_Crypto = new INICrypto( $this->m_REQUEST );
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ű <20>ε<EFBFBD>
|
||||
/*--------------------------------------------------*/
|
||||
if( ($rtv = $this->m_Crypto->LoadMPrivKey()) != OK )
|
||||
{
|
||||
$err_msg = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ű <20>ε<EFBFBD><CEB5><EFBFBD><EFBFBD><EFBFBD>";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) );
|
||||
$this->m_Crypto->FreePubKey();
|
||||
return;
|
||||
}
|
||||
$this->m_Log->WriteLog( INFO, "MERCHANT PRIV KEY LOAD OK" );
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ű <20>ε<EFBFBD>(SN <20><> <20>˱<EFBFBD><CBB1><EFBFBD><EFBFBD><EFBFBD>!!)
|
||||
/*--------------------------------------------------*/
|
||||
if( ($rtv = $this->m_Crypto->LoadMPubKey( $m_cert_SN )) != OK)
|
||||
{
|
||||
$err_msg = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ű <20>ε<EFBFBD><CEB5><EFBFBD><EFBFBD><EFBFBD>";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) );
|
||||
return;
|
||||
}
|
||||
$this->m_Log->WriteLog( INFO, "MERCHANT PUB KEY LOAD OK [".$this->m_Data->m_MPubSN."]" );
|
||||
|
||||
foreach ($this->m_REQUEST as $key => $val)
|
||||
{
|
||||
if( $key == "inipayhome" || $key == "type" || $key == "debug" ||
|
||||
$key == "admin" || $key == "checkopt" || $key == "enctype" )
|
||||
continue;
|
||||
if( $key == "mid" )
|
||||
$temp1 .= $key."=".$val."&"; //msg
|
||||
else
|
||||
$temp2 .= $key."=".$val."&"; //hashmsg
|
||||
}
|
||||
//Make RN
|
||||
$this->m_RESULT["rn"] = $this->m_Data->MakeRN();
|
||||
$temp1 .= "rn=".$this->m_RESULT["rn"]."&";
|
||||
|
||||
$checkMsg = $temp1;
|
||||
$checkHashMsg = $temp2;
|
||||
|
||||
$retHashStr = Base64Encode(sha1( $checkHashMsg, TRUE ));
|
||||
$checkMsg .= "data=".$retHashStr;
|
||||
|
||||
$HashMid = Base64Encode(sha1( $this->m_REQUEST["mid"], TRUE ));
|
||||
|
||||
$this->m_Crypto->RSAMPrivEncrypt( $checkMsg, $RSATemp );
|
||||
$this->m_RESULT["encfield"] = "enc=".$RSATemp."&src=".Base64Encode($checkHashMsg);
|
||||
$this->m_RESULT["certid"] = $HashMid.$m_cert_SN;
|
||||
|
||||
$this->m_Log->WriteLog( INFO, "CHKFAKE KEY MAKE OK:".$this->m_RESULT["rn"] );
|
||||
|
||||
$this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) );
|
||||
$this->m_Crypto->FreeAllKey();
|
||||
$this->m_RESULT[NM_RESULTCODE] = "00";
|
||||
return;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
/* */
|
||||
/* <20><><EFBFBD><EFBFBD>ó<EFBFBD><C3B3> Ȯ<><C8AE> <20><EFBFBD><DEBC><EFBFBD> <20><><EFBFBD><EFBFBD> */
|
||||
/* */
|
||||
/*--------------------------------------------------*/
|
||||
function Ack()
|
||||
{
|
||||
//ACK<43><4B> Data
|
||||
$this->m_Data->m_sBody = "";
|
||||
$this->m_Data->m_sTail = "";
|
||||
$this->m_Data->m_sCmd = CMD_REQ_ACK;
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(Head)
|
||||
$this->m_Data->MakeHead();
|
||||
$this->m_Log->WriteLog( DEBUG, "MAKE HEAD OK" );
|
||||
//$this->m_Log->WriteLog( DEBUG, "MSG_TO_PG:[".$this->m_Data->m_sMsg."]" );
|
||||
|
||||
//Send
|
||||
if( ($rtv = $this->m_Socket->send($this->m_Data->m_sMsg)) != OK )
|
||||
{
|
||||
$err_msg = "ACK <20><><EFBFBD>ۿ<EFBFBD><DBBF><EFBFBD>";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
return ACK_CHECKSUM_ERR;
|
||||
}
|
||||
//$this->m_Log->WriteLog( DEBUG, "SEND OK" );
|
||||
|
||||
if( ($rtv = $this->m_Socket->recv($head, $body, $tail)) != OK )
|
||||
{
|
||||
$err_msg = "ACK <20><><EFBFBD>ſ<EFBFBD><C5BF><EFBFBD>(ACK)";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
return ACK_CHECKSUM_ERR;
|
||||
}
|
||||
//$this->m_Log->WriteLog( DEBUG, "RECV OK" );
|
||||
//$this->m_Log->WriteLog( INFO, "MSG_FROM_PG:[".$recv."]" );
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
/* */
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><DEBC><EFBFBD> <20><><EFBFBD><EFBFBD> */
|
||||
/* */
|
||||
/*--------------------------------------------------*/
|
||||
function NetCancel()
|
||||
{
|
||||
$this->m_Log->WriteLog( INFO, "WAIT NETCANCEL INVOKING" );
|
||||
|
||||
if ( $this->m_type == TYPE_CANCEL || $this->m_type == TYPE_REPAY || $this->m_type == TYPE_VACCTREPAY || $this->m_type == TYPE_RECEIPT ||
|
||||
$this->m_type == TYPE_CONFIRM || $this->m_type == TYPE_OCBQUERY || $this->m_type == TYPE_ESCROW ||
|
||||
$this->m_type == TYPE_CAPTURE || $this->m_type == TYPE_AUTH || $this->m_type == TYPE_AUTHBILL ||
|
||||
($this->m_type == TYPE_ESCROW && $this->m_Data->m_EscrowType == TYPE_ESCROW_DNY_CNF ) ||
|
||||
$this->m_type == TYPE_NETCANCEL
|
||||
)
|
||||
{
|
||||
$this->m_Log->WriteLog( INFO, "DON'T NEED NETCANCEL" );
|
||||
return true;
|
||||
}
|
||||
|
||||
//NetCancel<65><6C> Data
|
||||
$this->m_Data->m_REQUEST["cancelmsg"] = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
|
||||
$body = "";
|
||||
$sign = "";
|
||||
|
||||
$this->m_Data->m_Type = TYPE_CANCEL; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʋ<EFBFBD><C6B2><EFBFBD><EFBFBD>..<2E><>~
|
||||
|
||||
//added escrow netcancel, 08.03.11
|
||||
if( $this->m_type == TYPE_ESCROW && $this->m_Data->m_EscrowType == TYPE_ESCROW_DLV )
|
||||
$this->m_Data->m_sCmd = CMD_REQ_DLV_NETC;
|
||||
else if($this->m_type == TYPE_ESCROW && $this->m_Data->m_EscrowType == TYPE_ESCROW_CNF )
|
||||
$this->m_Data->m_sCmd = CMD_REQ_CNF_NETC;
|
||||
else if($this->m_type == TYPE_ESCROW && $this->m_Data->m_EscrowType == TYPE_ESCROW_DNY )
|
||||
$this->m_Data->m_sCmd = CMD_REQ_DNY_NETC;
|
||||
else
|
||||
$this->m_Data->m_sCmd = CMD_REQ_NETC;
|
||||
|
||||
$this->m_Data->m_sCrypto = FLAG_CRYPTO_3DES;
|
||||
|
||||
//<2F><>ȣȭ
|
||||
if( ($rtv = $this->m_Data->MakeEncrypt( $this->m_Crypto )) != OK )
|
||||
{
|
||||
$err_msg = "<EFBFBD><EFBFBD>ȣȭ <20><><EFBFBD><EFBFBD>";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
//$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
return;
|
||||
}
|
||||
$this->m_Log->WriteLog( DEBUG, "MAKE ENCRYPT OK[".$this->m_Data->m_EncBody."]" );
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(Body)
|
||||
$this->m_Data->MakeBody();
|
||||
$this->m_Log->WriteLog( INFO, "MAKE BODY OK" );
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD>(sign)
|
||||
if( ($rtv = $this->m_Crypto->Sign( $this->m_Data->m_sBody, $sign )) != OK )
|
||||
{
|
||||
$err_msg = "<EFBFBD><EFBFBD><EFBFBD>ν<EFBFBD><EFBFBD><EFBFBD>";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
//$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
return false;
|
||||
}
|
||||
$this->m_Data->m_sTail = $sign;
|
||||
$this->m_Log->WriteLog( INFO, "SIGN OK" );
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(Head)
|
||||
$this->m_Data->MakeHead();
|
||||
$this->m_Log->WriteLog( INFO, "MAKE HEAD OK" );
|
||||
|
||||
$this->m_Log->WriteLog( DEBUG, "MSG_TO_PG:[".$this->m_Data->m_sMsg."]" );
|
||||
|
||||
//<2F><><EFBFBD>ϻ<EFBFBD><CFBB><EFBFBD>
|
||||
$this->m_Socket = new INISocket("");
|
||||
$this->m_Socket->ip = $this->m_connIP; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> IP <20><><EFBFBD><EFBFBD>, 08.03.12
|
||||
if( ($rtv = $this->m_Socket->open()) != OK )
|
||||
{
|
||||
$err_msg = "[".$this->m_Socket->ip."]<5D><><EFBFBD>Ͽ<EFBFBD><CFBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(NETC)::".$this->m_Socket->getErr();
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
//$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) );
|
||||
$this->m_Socket->close();
|
||||
$this->m_Crypto->FreeAllKey();
|
||||
return;
|
||||
}
|
||||
$this->m_Log->WriteLog( INFO, "SOCKET CONNECT OK::".$this->m_Socket->ip );
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD>۽<EFBFBD>
|
||||
if( ($rtv = $this->m_Socket->send($this->m_Data->m_sMsg)) != OK )
|
||||
{
|
||||
$err_msg = "<EFBFBD><EFBFBD><EFBFBD>ϼ۽ſ<EFBFBD><EFBFBD><EFBFBD>(NETC)".$this->m_Socket->getErr();
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
//$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Socket->close();
|
||||
return false;
|
||||
}
|
||||
$this->m_Log->WriteLog( INFO, "SEND OK" );
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
if( ($rtv = $this->m_Socket->recv($head, $body, $tail)) != OK )
|
||||
{
|
||||
$err_msg = "<EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD><EFBFBD>ſ<EFBFBD><EFBFBD><EFBFBD>(NETC)";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
//$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Socket->close();
|
||||
return false;
|
||||
}
|
||||
$this->m_Log->WriteLog( INFO, "RECV OK" );
|
||||
$this->m_Log->WriteLog( DEBUG, "MSG_FROM_PG:[".$head.$body.$tail."]" );
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD>Ȯ<EFBFBD><C8AE>
|
||||
if( ($rtv = $this->m_Crypto->Verify( $body, $tail )) != OK )
|
||||
{
|
||||
$err_msg = "VERIFY FAIL";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
//$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Socket->close();
|
||||
return false;
|
||||
}
|
||||
$this->m_Log->WriteLog( INFO, "VERIFY OK" );
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ľ<EFBFBD><C4BD><EFBFBD><EFBFBD><EFBFBD> <20>ʴ´<CAB4>!!!!
|
||||
//<2F>׳<EFBFBD> <20><><EFBFBD>⼭ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ǰ<EFBFBD><C7B0>ϴ<EFBFBD>.-_-;;
|
||||
//Head <20>Ľ<EFBFBD>
|
||||
if( ($rtv = $this->m_Data->ParseHead( $head )) != OK )
|
||||
{
|
||||
$err_msg = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(HEAD) <20>Ľ<EFBFBD> <20><><EFBFBD><EFBFBD>";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
//$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Socket->close();
|
||||
return;
|
||||
}
|
||||
//Body <20>Ľ<EFBFBD>
|
||||
if( ($rtv = $this->m_Data->ParseBody( $body, $encrypted, $sessionkey )) != OK )
|
||||
{
|
||||
$err_msg = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(Body) <20>Ľ<EFBFBD> <20><><EFBFBD><EFBFBD>";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
//$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Socket->close();
|
||||
return;
|
||||
}
|
||||
|
||||
//if( $this->GetResult(NM_RESULTCODE) == "00" )
|
||||
if(strcmp($this->GetResult(NM_RESULTCODE),"00") == 0)
|
||||
$this->m_Log->WriteLog( INFO, "SUCCESS NETCANCEL" );
|
||||
else
|
||||
$this->m_Log->WriteLog( ERROR, "ERROR NETCANCEL[".$this->GetResult(NM_RESULTMSG)."]" );
|
||||
return true;
|
||||
}
|
||||
|
||||
function MakeIMStr($s, $t)
|
||||
{
|
||||
$this->m_Crypto = new INICrypto( $this->m_REQUEST );
|
||||
if( $t == "H" )
|
||||
return $this->m_Crypto->MakeIMStr($s, base64_decode(IMHK));
|
||||
else if( $t == "J" )
|
||||
return $this->m_Crypto->MakeIMStr($s, base64_decode(IMJK));
|
||||
}
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
/* */
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><DEBC><EFBFBD> Make */
|
||||
/* */
|
||||
/*--------------------------------------------------*/
|
||||
function MakeTXErrMsg($err_code, $err_msg)
|
||||
{
|
||||
$this->m_RESULT[NM_RESULTCODE] = "01";
|
||||
$this->m_RESULT[NM_RESULTERRORCODE] = $err_code;
|
||||
$this->m_RESULT[NM_RESULTMSG] = "[".$err_code."|".$err_msg."]";
|
||||
$this->m_Data->GTHR( $err_code, $err_msg );
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
251
shop/inicis/libs/INISoc.php
Normal file
251
shop/inicis/libs/INISoc.php
Normal file
@ -0,0 +1,251 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2007 INICIS Inc.
|
||||
*
|
||||
* <20>ش<EFBFBD> <20><><EFBFBD>̺귯<CCBA><EAB7AF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǿ<C7BE><EEBCAD> <20>ȵ˴ϴ<CBB4>.
|
||||
* <20><><EFBFBD>Ƿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ڵ忡 <20><><EFBFBD><EFBFBD> å<><C3A5><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ڿ<EFBFBD><DABF><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>˷<EFBFBD><CBB7>帳<EFBFBD>ϴ<EFBFBD>.
|
||||
*
|
||||
*/
|
||||
|
||||
class INISocket{
|
||||
var $hnd;
|
||||
var $host;
|
||||
var $ip;
|
||||
var $port;
|
||||
var $type;
|
||||
var $family;
|
||||
var $protocol;
|
||||
var $bConnected;
|
||||
var $sBuffer;
|
||||
var $sSocErr;
|
||||
var $dns_laptime;
|
||||
|
||||
function error($msg=null)
|
||||
{
|
||||
$errCode = socket_last_error($this->hnd);
|
||||
if($errCode!=0)
|
||||
{
|
||||
//Connection reset by peer
|
||||
if($errCode==104)
|
||||
$this->bConnected = false;
|
||||
$errMsg = socket_strerror($errCode);
|
||||
$this->sSocErr = "(".$errCode.")(".$errMsg.")";
|
||||
socket_clear_error($this->hnd);
|
||||
}
|
||||
elseif (strlen($msg))
|
||||
{
|
||||
$this->sSocErr = $errMsg;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function INISocket($host)
|
||||
{
|
||||
$this->family = AF_INET;
|
||||
$this->type = SOCK_STREAM;
|
||||
$this->protocol = SOL_TCP;
|
||||
$this->hnd = @socket_create($this->family,$this->type,$this->protocol);
|
||||
$this->error();
|
||||
$this->sBuffer = false;
|
||||
$this->ip = null;
|
||||
$this->host = $host;
|
||||
$this->port = PG_PORT;
|
||||
}
|
||||
|
||||
function DNSLookUP()
|
||||
{
|
||||
$starttime=GetMicroTime();
|
||||
$ip = @gethostbyname($this->host);
|
||||
if($ip)
|
||||
{
|
||||
$this->ip = $ip;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error("Hostname ".$this->host." could not be resolved");
|
||||
return DNS_LOOKUP_ERR;
|
||||
}
|
||||
|
||||
$this->dns_laptime=round(GetMicroTime()-$starttime, 3);
|
||||
if( $this->dns_laptime > DNS_LOOKUP_TIMEOUT )
|
||||
return DNS_LOOKUP_TIMEOUT_ERR;
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
function open()
|
||||
{
|
||||
//Connect timeout Trickkkkkkkkk ##2. NONBLOCKING NEED , less CPU clocking!!^^
|
||||
//modified by ddaemiri, 2007.08.30
|
||||
|
||||
socket_set_nonblock($this->hnd);
|
||||
if (!@socket_connect($this->hnd, $this->ip, $this->port))
|
||||
{
|
||||
$err = socket_last_error($this->hnd);
|
||||
$err_str = socket_strerror($err);
|
||||
if ($err == 106) //EISCONN
|
||||
{
|
||||
$this->bConnected = true;
|
||||
socket_set_block($this->hnd);
|
||||
return OK;
|
||||
}
|
||||
//EINPROGRESS( Linux:115, Window Socket:10035, FreeBSD4.10:36, <20><><EFBFBD><EFBFBD> OS üũ <20>Ұ<EFBFBD><D2B0><EFBFBD><EFBFBD>ؼ<EFBFBD> str<74><72><EFBFBD>ε<EFBFBD> <20>˻<EFBFBD> )
|
||||
if ($err != ERRCODE_INPROGRESS_LINUX && $err != ERRCODE_INPROGRESS_WIN &&
|
||||
$err != ERRCODE_INPROGRESS_FREEBSD && $err_str != ERRSTR_INPROGRESS )
|
||||
{
|
||||
$this->error();
|
||||
socket_close($this->hnd);
|
||||
return SOCK_CONN_ERR;
|
||||
}
|
||||
}
|
||||
|
||||
$read = array($this->hnd);
|
||||
$write = array($this->hnd);
|
||||
$rtv = @socket_select($read,$write,$except=NULL,TIMEOUT_CONNECT);
|
||||
if( $rtv == 0 ) //TIMEOUT
|
||||
{
|
||||
$this->error();
|
||||
socket_close($this->hnd);
|
||||
return SOCK_TIMEO_ERR;
|
||||
}
|
||||
else if ( $rtv === FALSE )
|
||||
{
|
||||
$this->error();
|
||||
socket_close($this->hnd);
|
||||
return SOCK_ETC1_ERR;
|
||||
}
|
||||
if( in_array($this->hnd,$read) || in_array($this->hnd,$write))
|
||||
{
|
||||
if(@socket_get_option($this->hnd, SOL_SOCKET, SO_ERROR) === FALSE)
|
||||
{
|
||||
$this->error();
|
||||
socket_close($this->hnd);
|
||||
return SOCK_ETC2_ERR;
|
||||
}
|
||||
}
|
||||
$this->bConnected = true;
|
||||
socket_set_block($this->hnd);
|
||||
return OK;
|
||||
}
|
||||
function close()
|
||||
{
|
||||
//if(!$this->bConnected) return;
|
||||
@socket_shutdown($this->hnd,2);
|
||||
@socket_close($this->hnd);
|
||||
}
|
||||
|
||||
function send($sBuf)
|
||||
{
|
||||
if(!$this->bConnected)
|
||||
{
|
||||
$this->error("Socket error. Cannot send data on a closed socket.");
|
||||
return SOCK_SEND1_ERR;
|
||||
}
|
||||
|
||||
$vWrite = array($this->hnd);
|
||||
|
||||
while(($rtv = @socket_select($vRead = null,$vWrite ,$vExcept = null, TIMEOUT_WRITE)) === FALSE);
|
||||
|
||||
if( $rtv == 0 )
|
||||
{
|
||||
$this->error();
|
||||
//return SOCK_TIMEO_ERR;
|
||||
return SOCK_CONN_ERR; //modify 2008.04.01
|
||||
}
|
||||
if( $rtv === FALSE )
|
||||
{
|
||||
$this->error();
|
||||
return SOCK_SEND2_ERR;
|
||||
}
|
||||
|
||||
$tmpBuf = strlen($sBuf) ? $sBuf : $this->sBuffer;
|
||||
$iBufLen = strlen($tmpBuf);
|
||||
$res = @socket_send($this->hnd,$tmpBuf,$iBufLen,0);
|
||||
|
||||
if($res === FALSE)
|
||||
{
|
||||
$this->error();
|
||||
return SOCK_SEND2_ERR;
|
||||
}
|
||||
elseif ($res < $iBufLen)
|
||||
{
|
||||
$tmpBuf = substr($tmpBuf,$res);
|
||||
$this->send($tmpBuf);
|
||||
}
|
||||
return OK;
|
||||
}
|
||||
function WaitRecv( &$recv_buf, $nleft )
|
||||
{
|
||||
$recv_buf = null;
|
||||
$read = array($this->hnd);
|
||||
$buf = null;
|
||||
while( $nleft > 0 )
|
||||
{
|
||||
$rtv = @socket_select($read,$write=NULL,$except=NULL,TIMEOUT_READ);
|
||||
if( $rtv == 0 )
|
||||
{
|
||||
$this->error();
|
||||
return SOCK_TIMEO_ERR;
|
||||
}
|
||||
else if ( $rtv === FALSE )
|
||||
{
|
||||
$this->error();
|
||||
return SOCK_ETC1_ERR;
|
||||
}
|
||||
|
||||
if(!in_array($this->hnd,$read))
|
||||
{
|
||||
$this->error();
|
||||
return SOCK_RECV1_ERR;
|
||||
}
|
||||
if($buf = @socket_read($this->hnd, $nleft))
|
||||
{
|
||||
$recv_buf .= $buf;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error();
|
||||
return SOCK_RECV1_ERR;
|
||||
}
|
||||
$nleft -= strlen( $buf );
|
||||
}
|
||||
return OK;
|
||||
}
|
||||
function recv(&$head, &$body, &$tail)
|
||||
{
|
||||
if(!$this->bConnected)
|
||||
{
|
||||
$this->error("Socket error. Cannot read any data on a closed socket.");
|
||||
return SOCK_RECV1_ERR;
|
||||
}
|
||||
|
||||
//------------------------------------------------------
|
||||
//head
|
||||
//------------------------------------------------------
|
||||
if( ($rtv = $this->WaitRecv( $head, MSGHEADER_LEN)) != OK ) return $rtv;
|
||||
|
||||
if( $head == "" ) return SOCK_RECV2_ERR;
|
||||
$body_len = intval(substr( $head, 0, BODY_LEN ));
|
||||
$tail_len = intval(substr( $head, BODY_LEN, TAIL_LEN ));
|
||||
|
||||
//------------------------------------------------------
|
||||
//body
|
||||
//------------------------------------------------------
|
||||
if( ($rtv = $this->WaitRecv( $body, $body_len)) != OK ) return $rtv;
|
||||
|
||||
//------------------------------------------------------
|
||||
//tail
|
||||
//------------------------------------------------------
|
||||
if( ($rtv = $this->WaitRecv( $tail, $tail_len)) != OK ) return $rtv;
|
||||
|
||||
return OK;
|
||||
}
|
||||
function getErr()
|
||||
{
|
||||
return $this->sSocErr;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
3495
shop/inicis/libs/INIXml.php
Normal file
3495
shop/inicis/libs/INIXml.php
Normal file
File diff suppressed because it is too large
Load Diff
127
shop/inicis/orderform.1.php
Normal file
127
shop/inicis/orderform.1.php
Normal file
@ -0,0 +1,127 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 전자결제를 사용할 때만 실행
|
||||
if($default['de_iche_use'] || $default['de_vbank_use'] || $default['de_hp_use'] || $default['de_card_use']) {
|
||||
?>
|
||||
|
||||
<script language=javascript src="<?php echo $ini_js_url; ?>"></script>
|
||||
<script language=javascript>
|
||||
StartSmartUpdate();
|
||||
</script>
|
||||
|
||||
<script language=javascript>
|
||||
var openwin;
|
||||
|
||||
function set_encrypt_data(frm)
|
||||
{
|
||||
// 데이터 암호화 처리
|
||||
var result = true;
|
||||
$.ajax({
|
||||
url: g5_url+"/shop/inicis/encryptdata.php",
|
||||
type: "POST",
|
||||
data: {
|
||||
price : frm.good_mny.value
|
||||
},
|
||||
dataType: "json",
|
||||
async: false,
|
||||
cache: false,
|
||||
success: function(data) {
|
||||
if(data.error == "") {
|
||||
frm.ini_encfield.value = data.ini_encfield;
|
||||
frm.ini_certid.value = data.ini_certid;
|
||||
} else {
|
||||
alert(data.error);
|
||||
result = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
function pay(frm)
|
||||
{
|
||||
// MakePayMessage()를 호출함으로써 플러그인이 화면에 나타나며, Hidden Field
|
||||
// 에 값들이 채워지게 됩니다. 일반적인 경우, 플러그인은 결제처리를 직접하는 것이
|
||||
// 아니라, 중요한 정보를 암호화 하여 Hidden Field의 값들을 채우고 종료하며,
|
||||
// 다음 페이지인 INIsecureresult.php로 데이터가 포스트 되어 결제 처리됨을 유의하시기 바랍니다.
|
||||
|
||||
if(document.forderform.clickcontrol.value == "enable")
|
||||
{
|
||||
|
||||
if(document.forderform.goodname.value == "") // 필수항목 체크 (상품명, 상품가격, 구매자명, 구매자 이메일주소, 구매자 전화번호)
|
||||
{
|
||||
alert("상품명이 빠졌습니다. 필수항목입니다.");
|
||||
return false;
|
||||
}
|
||||
else if(document.forderform.buyername.value == "")
|
||||
{
|
||||
alert("구매자명이 빠졌습니다. 필수항목입니다.");
|
||||
return false;
|
||||
}
|
||||
else if(document.forderform.buyeremail.value == "")
|
||||
{
|
||||
alert("구매자 이메일주소가 빠졌습니다. 필수항목입니다.");
|
||||
return false;
|
||||
}
|
||||
else if(document.forderform.buyertel.value == "")
|
||||
{
|
||||
alert("구매자 전화번호가 빠졌습니다. 필수항목입니다.");
|
||||
return false;
|
||||
}
|
||||
else if( ( navigator.userAgent.indexOf("MSIE") >= 0 || navigator.appName == 'Microsoft Internet Explorer' ) && (document.INIpay == null || document.INIpay.object == null) ) // 플러그인 설치유무 체크
|
||||
{
|
||||
alert("\n이니페이 플러그인 128이 설치되지 않았습니다. \n\n안전한 결제를 위하여 이니페이 플러그인 128의 설치가 필요합니다. \n\n다시 설치하시려면 Ctrl + F5키를 누르시거나 메뉴의 [보기/새로고침]을 선택하여 주십시오.");
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
/******
|
||||
* 플러그인이 참조하는 각종 결제옵션을 이곳에서 수행할 수 있습니다.
|
||||
* (자바스크립트를 이용한 동적 옵션처리)
|
||||
*/
|
||||
|
||||
|
||||
if (MakePayMessage(frm))
|
||||
{
|
||||
disable_click();
|
||||
document.getElementById("display_pay_button").style.display = "none";
|
||||
document.getElementById('display_pay_process').style.display = '';
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( IsPluginModule() ) //plugin타입 체크
|
||||
{
|
||||
alert("결제를 취소하셨습니다.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function enable_click()
|
||||
{
|
||||
document.forderform.clickcontrol.value = "enable"
|
||||
}
|
||||
|
||||
function disable_click()
|
||||
{
|
||||
document.forderform.clickcontrol.value = "disable"
|
||||
}
|
||||
|
||||
function focus_control()
|
||||
{
|
||||
if(document.forderform.clickcontrol.value == "disable")
|
||||
openwin.focus();
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php } ?>
|
||||
86
shop/inicis/orderform.2.php
Normal file
86
shop/inicis/orderform.2.php
Normal file
@ -0,0 +1,86 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
|
||||
<?php /* 주문폼 자바스크립트 에러 방지를 위해 추가함 */ ?>
|
||||
<input type="hidden" name="good_mny" value="<?php echo $tot_price; ?>">
|
||||
<?php
|
||||
if($default['de_tax_flag_use']) {
|
||||
?>
|
||||
<input type="hidden" name="comm_tax_mny" value="<?php echo $comm_tax_mny; ?>"> <!-- 과세금액 -->
|
||||
<input type="hidden" name="comm_vat_mny" value="<?php echo $comm_vat_mny; ?>"> <!-- 부가세 -->
|
||||
<input type="hidden" name="comm_free_mny" value="<?php echo $comm_free_mny; ?>"> <!-- 비과세 금액 -->
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<input type="hidden" name="goodname" value="<?php echo $goods; ?>">
|
||||
<input type="hidden" name="buyername" value="">
|
||||
<input type="hidden" name="buyeremail" value="">
|
||||
<input type="hidden" name="parentemail" value="">
|
||||
<input type="hidden" name="buyertel" value="">
|
||||
<input type="hidden" name="recvname" value="">
|
||||
<input type="hidden" name="recvtel" value="">
|
||||
<input type="hidden" name="recvaddr" value="">
|
||||
<input type="hidden" name="recvpostnum" value="">
|
||||
|
||||
<!-- 기타설정 -->
|
||||
<input type="hidden" name="currency" value="WON">
|
||||
|
||||
<!-- 결제방법 -->
|
||||
<input type="hidden" name="gopaymethod" value="">
|
||||
|
||||
<!--
|
||||
SKIN : 플러그인 스킨 칼라 변경 기능 - 6가지 칼라(ORIGINAL, GREEN, ORANGE, BLUE, KAKKI, GRAY)
|
||||
HPP : 컨텐츠 또는 실물 결제 여부에 따라 HPP(1)과 HPP(2)중 선택 적용(HPP(1):컨텐츠, HPP(2):실물).
|
||||
Card(0): 신용카드 지불시에 이니시스 대표 가맹점인 경우에 필수적으로 세팅 필요 ( 자체 가맹점인 경우에는 카드사의 계약에 따라 설정) - 자세한 내용은 메뉴얼 참조.
|
||||
OCB : OK CASH BAG 가맹점으로 신용카드 결제시에 OK CASH BAG 적립을 적용하시기 원하시면 "OCB" 세팅 필요 그 외에 경우에는 삭제해야 정상적인 결제 이루어짐.
|
||||
no_receipt : 은행계좌이체시 현금영수증 발행여부 체크박스 비활성화 (현금영수증 발급 계약이 되어 있어야 사용가능)
|
||||
-->
|
||||
<input type="hidden" name="acceptmethod" value="HPP(2):Card(0):no_receipt:cardpoint<?php echo $useescrow; ?>">
|
||||
|
||||
|
||||
<!--
|
||||
상점 주문번호 : 무통장입금 예약(가상계좌 이체),전화결재 관련 필수필드로 반드시 상점의 주문번호를 페이지에 추가해야 합니다.
|
||||
결제수단 중에 은행 계좌이체 이용 시에는 주문 번호가 결제결과를 조회하는 기준 필드가 됩니다.
|
||||
상점 주문번호는 최대 40 BYTE 길이입니다.
|
||||
주의:절대 한글값을 입력하시면 안됩니다.
|
||||
-->
|
||||
<input type="hidden" name="oid" value="<?php echo $od_id; ?>">
|
||||
|
||||
|
||||
<!--
|
||||
플러그인 좌측 상단 상점 로고 이미지 사용
|
||||
이미지의 크기 : 90 X 34 pixels
|
||||
플러그인 좌측 상단에 상점 로고 이미지를 사용하실 수 있으며,
|
||||
주석을 풀고 이미지가 있는 URL을 입력하시면 플러그인 상단 부분에 상점 이미지를 삽입할수 있습니다.
|
||||
-->
|
||||
<!--input type="hidden" name="ini_logoimage_url" value="http://[사용할 이미지주소]"-->
|
||||
|
||||
<!--
|
||||
좌측 결제메뉴 위치에 이미지 추가
|
||||
이미지의 크기 : 단일 결제 수단 - 91 X 148 pixels, 신용카드/ISP/계좌이체/가상계좌 - 91 X 96 pixels
|
||||
좌측 결제메뉴 위치에 미미지를 추가하시 위해서는 담당 영업대표에게 사용여부 계약을 하신 후
|
||||
주석을 풀고 이미지가 있는 URL을 입력하시면 플러그인 좌측 결제메뉴 부분에 이미지를 삽입할수 있습니다.
|
||||
-->
|
||||
<!--input type="hidden" name="ini_menuarea_url" value="http://[사용할 이미지주소]"-->
|
||||
|
||||
<!--
|
||||
플러그인에 의해서 값이 채워지거나, 플러그인이 참조하는 필드들
|
||||
삭제/수정 불가
|
||||
uid 필드에 절대로 임의의 값을 넣지 않도록 하시기 바랍니다.
|
||||
-->
|
||||
<input type="hidden" name="ini_encfield" value="">
|
||||
<input type="hidden" name="ini_certid" value="">
|
||||
<input type="hidden" name="quotainterest" value="">
|
||||
<input type="hidden" name="paymethod" value="">
|
||||
<input type="hidden" name="cardcode" value="">
|
||||
<input type="hidden" name="cardquota" value="">
|
||||
<input type="hidden" name="rbankcode" value="">
|
||||
<input type="hidden" name="reqsign" value="DONE">
|
||||
<input type="hidden" name="encrypted" value="">
|
||||
<input type="hidden" name="sessionkey" value="">
|
||||
<input type="hidden" name="uid" value="">
|
||||
<input type="hidden" name="sid" value="">
|
||||
<input type="hidden" name="version" value="4000">
|
||||
<input type="hidden" name="clickcontrol" value="">
|
||||
20
shop/inicis/orderform.3.php
Normal file
20
shop/inicis/orderform.3.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 전자결제를 사용할 때만 실행
|
||||
if($default['de_iche_use'] || $default['de_vbank_use'] || $default['de_hp_use'] || $default['de_card_use']) {
|
||||
?>
|
||||
|
||||
<div id="display_pay_button" class="btn_confirm" style="display:none">
|
||||
<input type="submit" value="주문하기" class="btn_submit">
|
||||
<a href="javascript:history.go(-1);" class="btn01">취소</a>
|
||||
</div>
|
||||
<div id="display_pay_process" style="display:none">
|
||||
<img src="<?php echo G5_URL; ?>/shop/img/loading.gif" alt="">
|
||||
<span>주문완료 중입니다. 잠시만 기다려 주십시오.</span>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<script>
|
||||
document.getElementById("display_pay_button").style.display = "" ;
|
||||
</script>
|
||||
3
shop/inicis/orderform.4.php
Normal file
3
shop/inicis/orderform.4.php
Normal file
@ -0,0 +1,3 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
3
shop/inicis/orderform.5.php
Normal file
3
shop/inicis/orderform.5.php
Normal file
@ -0,0 +1,3 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
79
shop/inicis/orderpartcancel.inc.php
Normal file
79
shop/inicis/orderpartcancel.inc.php
Normal file
@ -0,0 +1,79 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
if($od['od_pg'] != 'inicis') return;
|
||||
|
||||
include_once(G5_SHOP_PATH.'/settle_inicis.inc.php');
|
||||
|
||||
$od_tax_mny = round((int)$mod_tax_mny / 1.1);
|
||||
|
||||
$currency = 'WON';
|
||||
$oldtid = $od['od_tno'];
|
||||
$price = (int)$mod_tax_mny + (int)$mod_free_mny;
|
||||
$confirm_price = (int)$od['od_receipt_price'] - (int)$od['od_refund_price'] - $price;
|
||||
$buyeremail = $od['od_email'];
|
||||
$tax = (int)$mod_tax_mny - $od_tax_mny;
|
||||
$taxfree = (int)$mod_free_mny;
|
||||
|
||||
/***********************
|
||||
* 3. 재승인 정보 설정 *
|
||||
***********************/
|
||||
$inipay->SetField("type", "repay"); // 고정 (절대 수정 불가)
|
||||
$inipay->SetField("pgid", "INIphpRPAY"); // 고정 (절대 수정 불가)
|
||||
$inipay->SetField("subpgip", "203.238.3.10"); // 고정
|
||||
$inipay->SetField("mid", $default['de_inicis_mid']); // 상점아이디
|
||||
$inipay->SetField("admin", $default['de_inicis_admin_key']); //비대칭 사용키 키패스워드
|
||||
$inipay->SetField("oldtid", $oldtid); // 취소할 거래의 거래아이디
|
||||
$inipay->SetField("currency", $currency); // 화폐단위
|
||||
$inipay->SetField("price", $price); // 취소금액
|
||||
$inipay->SetField("confirm_price", $confirm_price); // 승인요청금액
|
||||
$inipay->SetField("buyeremail", $buyeremail); // 구매자 이메일 주소
|
||||
$inipay->SetField("tax", $tax); // 부가세금액
|
||||
$inipay->SetField("taxfree", $taxfree); // 비과세금액
|
||||
|
||||
/******************
|
||||
* 4. 재승인 요청 *
|
||||
******************/
|
||||
$inipay->startAction();
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* 5. 재승인 결과 *
|
||||
* *
|
||||
* 신거래번호 : $inipay->getResult('TID') *
|
||||
* 결과코드 : $inipay->getResult('ResultCode') ("00"이면 재승인 성공) *
|
||||
* 결과내용 : $inipay->getResult('ResultMsg') (재승인결과에 대한 설명) *
|
||||
* 원거래 번호 : $inipay->getResult('PRTC_TID') *
|
||||
* 최종결제 금액 : $inipay->getResult('PRTC_Remains') *
|
||||
* 부분취소 금액 : $inipay->getResult('PRTC_Price') *
|
||||
* 부분취소,재승인 구분값 : $inipay->getResult('PRTC_Type') *
|
||||
* ("0" : 재승인, "1" : 부분취소) *
|
||||
* 부분취소(재승인) 요청횟수 : $inipay->getResult('PRTC_Cnt') *
|
||||
*******************************************************************/
|
||||
|
||||
if($inipay->getResult('ResultCode') == '00') {
|
||||
// 환불금액기록
|
||||
$tno = $inipay->getResult('PRTC_TID');
|
||||
$re_price = $inipay->getResult('PRTC_Price');
|
||||
|
||||
$sql = " update {$g5['g5_shop_order_table']}
|
||||
set od_refund_price = od_refund_price + '$re_price',
|
||||
od_shop_memo = concat(od_shop_memo, \"$mod_memo\")
|
||||
where od_id = '{$od['od_id']}'
|
||||
and od_tno = '$tno' ";
|
||||
sql_query($sql);
|
||||
|
||||
// 미수금 등의 정보 업데이트
|
||||
$info = get_order_info($od_id);
|
||||
|
||||
$sql = " update {$g5['g5_shop_order_table']}
|
||||
set od_misu = '{$info['od_misu']}',
|
||||
od_tax_mny = '{$info['od_tax_mny']}',
|
||||
od_vat_mny = '{$info['od_vat_mny']}',
|
||||
od_free_mny = '{$info['od_free_mny']}'
|
||||
where od_id = '$od_id' ";
|
||||
sql_query($sql);
|
||||
} else {
|
||||
alert(iconv_utf8($inipay->GetResult("ResultMsg")).' 코드 : '.$inipay->GetResult("ResultCode"));
|
||||
}
|
||||
?>
|
||||
197
shop/inicis/taxsave_form.php
Normal file
197
shop/inicis/taxsave_form.php
Normal file
@ -0,0 +1,197 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
|
||||
<script>
|
||||
// 현금영수증 MAIN FUNC
|
||||
function jsf__pay_cash( form )
|
||||
{
|
||||
jsf__show_progress(true);
|
||||
|
||||
if ( jsf__chk_cash( form ) == false )
|
||||
{
|
||||
jsf__show_progress(false);
|
||||
return;
|
||||
}
|
||||
|
||||
form.submit();
|
||||
}
|
||||
|
||||
// 진행 바
|
||||
function jsf__show_progress( show )
|
||||
{
|
||||
if ( show == true )
|
||||
{
|
||||
window.show_pay_btn.style.display = "none";
|
||||
window.show_progress.style.display = "inline";
|
||||
}
|
||||
else
|
||||
{
|
||||
window.show_pay_btn.style.display = "inline";
|
||||
window.show_progress.style.display = "none";
|
||||
}
|
||||
}
|
||||
|
||||
// 포맷 체크
|
||||
function jsf__chk_cash( form )
|
||||
{
|
||||
if ( form.tr_code[0].checked )
|
||||
{
|
||||
if ( form.id_info.value.length != 10 &&
|
||||
form.id_info.value.length != 11 &&
|
||||
form.id_info.value.length != 13 )
|
||||
{
|
||||
alert("주민번호 또는 휴대폰번호를 정확히 입력해 주시기 바랍니다.");
|
||||
form.id_info.select();
|
||||
form.id_info.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if ( form.tr_code[1].checked )
|
||||
{
|
||||
if ( form.id_info.value.length != 10 )
|
||||
{
|
||||
alert("사업자번호를 정확히 입력해 주시기 바랍니다.");
|
||||
form.id_info.select();
|
||||
form.id_info.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function jsf__chk_tr_code( form )
|
||||
{
|
||||
var span_tr_code_0 = document.getElementById( "span_tr_code_0" );
|
||||
var span_tr_code_1 = document.getElementById( "span_tr_code_1" );
|
||||
|
||||
if ( form.tr_code[0].checked )
|
||||
{
|
||||
span_tr_code_0.style.display = "inline";
|
||||
span_tr_code_1.style.display = "none";
|
||||
}
|
||||
else if (form.tr_code[1].checked )
|
||||
{
|
||||
span_tr_code_0.style.display = "none";
|
||||
span_tr_code_1.style.display = "inline";
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<div id="scash" class="new_win">
|
||||
<h1 id="win_title"><?php echo $g5['title']; ?></h1>
|
||||
|
||||
<section>
|
||||
<h2>주문정보</h2>
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">주문 번호</th>
|
||||
<td><?php echo $od_id; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">상품 정보</th>
|
||||
<td><?php echo $goods_name; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">주문자 이름</th>
|
||||
<td><?php echo $od_name; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">주문자 E-Mail</th>
|
||||
<td><?php echo $od_email; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">주문자 전화번호</th>
|
||||
<td><?php echo $od_tel; ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>현금영수증 발급 정보</h2>
|
||||
|
||||
<form method="post" action="<?php echo G5_SHOP_URL; ?>/inicis/taxsave_result.php">
|
||||
<input type="hidden" name="tx" value="<?php echo $tx; ?>">
|
||||
<input type="hidden" name="od_id" value="<?php echo $od_id; ?>">
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">원 거래 시각</th>
|
||||
<td><?php echo $trad_time; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">발행 용도</th>
|
||||
<td>
|
||||
<input type="radio" name="tr_code" value="1" id="tr_code1" onClick="jsf__chk_tr_code( this.form )" checked>
|
||||
<label for="tr_code1">소득공제용</label>
|
||||
<input type="radio" name="tr_code" value="2" id="tr_code2" onClick="jsf__chk_tr_code( this.form )">
|
||||
<label for="tr_code2">지출증빙용</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<label for="id_info">
|
||||
<span id="span_tr_code_0" style="display:inline">주민(휴대폰)번호</span>
|
||||
<span id="span_tr_code_1" style="display:none">사업자번호</span>
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input type="text" name="id_info" id="id_info" class="frm_input" size="16" maxlength="13"> ("-" 생략)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="buyeremail">이메일</label></th>
|
||||
<td><input type="text" name="buyeremail" id="buyeremail" value="<?php echo $od_email; ?>" required class="required frm_input" size="30"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="buyertel">휴대폰</label></th>
|
||||
<td><input type="text" name="buyertel" id="buyertel" value="" required class="required frm_input" size="20"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">거래금액 총합</th>
|
||||
<td><?php echo number_format($amt_tot); ?>원</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">공급가액</th>
|
||||
<td><?php echo number_format($amt_sup); ?>원<!-- ((거래금액 총합 * 10) / 11) --></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">봉사료</th>
|
||||
<td><?php echo number_format($amt_svc); ?>원</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">부가가치세</th>
|
||||
<td><?php echo number_format($amt_tax); ?>원<!-- 거래금액 총합 - 공급가액 - 봉사료 --></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="scash_apply">
|
||||
<span id="show_pay_btn">
|
||||
<button type="button" onclick="jsf__pay_cash( this.form )">등록요청</button>
|
||||
</span>
|
||||
<span id="show_progress" style="display:none">
|
||||
<b>등록 진행중입니다. 잠시만 기다려주십시오</b>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
193
shop/inicis/taxsave_result.php
Normal file
193
shop/inicis/taxsave_result.php
Normal file
@ -0,0 +1,193 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
include_once(G5_SHOP_PATH.'/settle_inicis.inc.php');
|
||||
|
||||
/* INIreceipt.php
|
||||
*
|
||||
* 현금결제(실시간 은행계좌이체, 무통장입금)에 대한 현금결제 영수증 발행 요청한다.
|
||||
*
|
||||
*
|
||||
* http://www.inicis.com
|
||||
* http://support.inicis.com
|
||||
* Copyright (C) 2006 Inicis, Co. All rights reserved.
|
||||
*/
|
||||
|
||||
if($tx == 'personalpay') {
|
||||
$od = sql_fetch(" select * from {$g5['g5_shop_personalpay_table']} where pp_id = '$od_id' ");
|
||||
if (!$od)
|
||||
die('<p id="scash_empty">개인결제 내역이 존재하지 않습니다.</p>');
|
||||
|
||||
if($od['pp_cash'] == 1)
|
||||
alert('이미 등록된 현금영수증 입니다.');
|
||||
|
||||
$buyername = $od['pp_name'];
|
||||
$goodname = $od['pp_name'].'님 개인결제';
|
||||
$amt_tot = (int)$od['pp_receipt_price'];
|
||||
$amt_sup = (int)round(($amt_tot * 10) / 11);
|
||||
$amt_svc = 0;
|
||||
$amt_tax = (int)($amt_tot - $amt_sup);
|
||||
} else {
|
||||
$od = sql_fetch(" select * from {$g5['g5_shop_order_table']} where od_id = '$od_id' ");
|
||||
if (!$od)
|
||||
die('<p id="scash_empty">주문서가 존재하지 않습니다.</p>');
|
||||
|
||||
if($od['od_cash'] == 1)
|
||||
alert('이미 등록된 현금영수증 입니다.');
|
||||
|
||||
$buyername = $od['od_name'];
|
||||
$goods = get_goods($od['od_id']);
|
||||
$goodname = $goods['full_name'];
|
||||
$amt_tot = (int)$od['od_tax_mny'] + (int)$od['od_vat_mny'] + (int)$od['od_free_mny'];
|
||||
$amt_sup = (int)$od['od_tax_mny'] + (int)$od['od_free_mny'];
|
||||
$amt_tax = (int)$od['od_vat_mny'];
|
||||
$amt_svc = 0;
|
||||
}
|
||||
|
||||
|
||||
$reg_num = $id_info;
|
||||
$useopt = $tr_code;
|
||||
$currency = 'WON';
|
||||
|
||||
/*********************
|
||||
* 3. 발급 정보 설정 *
|
||||
*********************/
|
||||
$inipay->SetField("type" ,"receipt"); // 고정
|
||||
$inipay->SetField("pgid" ,"INIphpRECP"); // 고정
|
||||
$inipay->SetField("paymethod" ,"CASH"); // 고정 (요청분류)
|
||||
$inipay->SetField("currency" ,$currency); // 화폐단위 (고정)
|
||||
/**************************************************************************************************
|
||||
* admin 은 키패스워드 변수명입니다. 수정하시면 안됩니다. 1111의 부분만 수정해서 사용하시기 바랍니다.
|
||||
* 키패스워드는 상점관리자 페이지(https://iniweb.inicis.com)의 비밀번호가 아닙니다. 주의해 주시기 바랍니다.
|
||||
* 키패스워드는 숫자 4자리로만 구성됩니다. 이 값은 키파일 발급시 결정됩니다.
|
||||
* 키패스워드 값을 확인하시려면 상점측에 발급된 키파일 안의 readme.txt 파일을 참조해 주십시오.
|
||||
**************************************************************************************************/
|
||||
$inipay->SetField("admin" ,$default['de_inicis_admin_key']); // 키패스워드(상점아이디에 따라 변경)
|
||||
$inipay->SetField("mid" ,$default['de_inicis_mid']); // 상점아이디
|
||||
$inipay->SetField("goodname" ,iconv_euckr($goodname)); // 상품명
|
||||
$inipay->SetField("cr_price" ,$amt_tot); // 총 현금결제 금액
|
||||
$inipay->SetField("sup_price" ,$amt_sup); // 공급가액
|
||||
$inipay->SetField("tax" ,$amt_tax); // 부가세
|
||||
$inipay->SetField("srvc_price" ,$amt_svc); // 봉사료
|
||||
$inipay->SetField("buyername" ,iconv_euckr($buyername)); // 구매자 성명
|
||||
$inipay->SetField("buyeremail" ,$buyeremail); // 구매자 이메일 주소
|
||||
$inipay->SetField("buyertel" ,$buyertel); // 구매자 전화번호
|
||||
$inipay->SetField("reg_num" ,$reg_num); // 현금결제자 주민등록번호
|
||||
$inipay->SetField("useopt" ,$useopt); // 현금영수증 발행용도 ("1" - 소비자 소득공제용, "2" - 사업자 지출증빙용)
|
||||
$inipay->SetField("companynumber" ,$companynumber); // 서브몰 사업자번호
|
||||
|
||||
|
||||
/****************
|
||||
* 4. 발급 요청 *
|
||||
****************/
|
||||
$inipay->startAction();
|
||||
|
||||
|
||||
/********************************************************************************
|
||||
* 5. 발급 결과 *
|
||||
* *
|
||||
* 결과코드 : $inipay->GetResult('ResultCode') ("00" 이면 발행 성공) *
|
||||
* 승인번호 : $inipay->GetResult('ApplNum') (현금영수증 발행 승인번호) *
|
||||
* 승인날짜 : $inipay->GetResult('ApplDate') (YYYYMMDD) *
|
||||
* 승인시각 : $inipay->GetResult('ApplTime') (HHMMSS) *
|
||||
* 거래번호 : $inipay->GetResult('TID') *
|
||||
* 총현금결제 금액 : $inipay->GetResult('CSHR_ApplPrice') *
|
||||
* 공급가액 : $inipay->GetResult('CSHR_SupplyPrice') *
|
||||
* 부가세 : $inipay->GetResult('CSHR_Tax') *
|
||||
* 봉사료 : $inipay->GetResult('CSHR_ServicePrice') *
|
||||
* 사용구분 : $inipay->GetResult('CSHR_Type') *
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
// DB 반영
|
||||
if($inipay->GetResult('ResultCode') == '00') {
|
||||
$cash_no = $inipay->GetResult('ApplNum');
|
||||
|
||||
$cash = array();
|
||||
$cash['TID'] = $inipay->GetResult('TID');
|
||||
$cash['ApplNum'] = $inipay->GetResult('ApplNum');
|
||||
$cash['ApplDate'] = $inipay->GetResult('ApplDate');
|
||||
$cash['ApplTime'] = $inipay->GetResult('ApplTime');
|
||||
$cash['CSHR_Type'] = $inipay->GetResult('CSHR_Type');
|
||||
$cash_info = serialize($cash);
|
||||
|
||||
if($tx == 'personalpay') {
|
||||
$sql = " update {$g5['g5_shop_personalpay_table']}
|
||||
set pp_cash = '1',
|
||||
pp_cash_no = '$cash_no',
|
||||
pp_cash_info = '$cash_info'
|
||||
where pp_id = '$od_id' ";
|
||||
} else {
|
||||
$sql = " update {$g5['g5_shop_order_table']}
|
||||
set od_cash = '1',
|
||||
od_cash_no = '$cash_no',
|
||||
od_cash_info = '$cash_info'
|
||||
where od_id = '$od_id' ";
|
||||
}
|
||||
|
||||
$result = sql_query($sql, false);
|
||||
|
||||
if(!$result)
|
||||
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
||||
}
|
||||
|
||||
$g5['title'] = '현금영수증 발급';
|
||||
include_once(G5_PATH.'/head.sub.php');
|
||||
?>
|
||||
|
||||
<script>
|
||||
function showreceipt() // 현금 영수증 출력
|
||||
{
|
||||
var showreceiptUrl = "https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/Cash_mCmReceipt.jsp?noTid=<?php echo($inipay->GetResult('TID')); ?>" + "&clpaymethod=22";
|
||||
window.open(showreceiptUrl,"showreceipt","width=380,height=540, scrollbars=no,resizable=no");
|
||||
}
|
||||
</script>
|
||||
|
||||
<div id="lg_req_tx" class="new_win">
|
||||
<h1 id="win_title">현금영수증 - KG이니시스</h1>
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col class="grid_4">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">결과코드</th>
|
||||
<td><?php echo $inipay->GetResult('ResultCode'); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">결과 메세지</th>
|
||||
<td><?php echo iconv_utf8($inipay->GetResult('ResultMsg')); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">현금영수증 거래번호</th>
|
||||
<td><?php echo $inipay->GetResult('TID'); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">현금영수증 승인번호</th>
|
||||
<td><?php echo $inipay->GetResult('ApplNum'); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">승인시간</th>
|
||||
<td><?php echo preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3 \\4:\\5:\\6",$inipay->GetResult('ApplDate').$inipay->GetResult('ApplTime')); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">현금영수증 URL</th>
|
||||
<td>
|
||||
<button type="button" name="receiptView" class="btn_frmline" onClick="javascript:showreceipt();">영수증 확인</button>
|
||||
<p>영수증 확인은 실 등록의 경우에만 가능합니다.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include_once(G5_PATH.'/tail.sub.php');
|
||||
?>
|
||||
@ -90,7 +90,19 @@ if ($xpay->TX()) {
|
||||
//최종결제요청 결과 실패 DB처리
|
||||
//echo "최종결제요청 결과 실패 DB처리하시기 바랍니다.<br>";
|
||||
|
||||
alert($xpay->Response_Msg().' 코드 : '.$xpay->Response_Code());
|
||||
if(G5_IS_MOBILE) {
|
||||
if(isset($_POST['pp_id']) && $_POST['pp_id']) {
|
||||
$page_return_url = G5_SHOP_URL.'/personalpayform.php?pp_id='.get_session('ss_personalpay_id');
|
||||
} else {
|
||||
$page_return_url = G5_SHOP_URL.'/orderform.php';
|
||||
if(get_session('ss_direct'))
|
||||
$page_return_url .= '?sw_direct=1';
|
||||
}
|
||||
|
||||
alert($xpay->Response_Msg().' 코드 : '.$xpay->Response_Code(), $page_return_url);
|
||||
} else {
|
||||
alert($xpay->Response_Msg().' 코드 : '.$xpay->Response_Code());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//2)API 요청실패 화면처리
|
||||
|
||||
@ -30,10 +30,13 @@ $g5['title'] = '주문서 작성';
|
||||
if($default['de_iche_use'] || $default['de_vbank_use'] || $default['de_hp_use'] || $default['de_card_use']) {
|
||||
switch($default['de_pg_service']) {
|
||||
case 'lg':
|
||||
$g5['body_script'] = 'onload="isActiveXOK();"';
|
||||
$g5['body_script'] = ' onload="isActiveXOK();"';
|
||||
break;
|
||||
case 'inicis':
|
||||
$g5['body_script'] = ' onload="javascript:enable_click()"';
|
||||
break;
|
||||
default:
|
||||
$g5['body_script'] = 'onload="CheckPayplusInstall();"';
|
||||
$g5['body_script'] = ' onload="CheckPayplusInstall();"';
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1355,6 +1358,25 @@ function forderform_check(f)
|
||||
f.LGD_CUSTOM_FIRSTPAY.value = "무통장";
|
||||
break;
|
||||
}
|
||||
<?php } else if($default['de_pg_service'] == 'inicis') { ?>
|
||||
switch(settle_method)
|
||||
{
|
||||
case "계좌이체":
|
||||
f.gopaymethod.value = "onlydbank";
|
||||
break;
|
||||
case "가상계좌":
|
||||
f.gopaymethod.value = "onlyvbank";
|
||||
break;
|
||||
case "휴대폰":
|
||||
f.gopaymethod.value = "onlyhpp";
|
||||
break;
|
||||
case "신용카드":
|
||||
f.gopaymethod.value = "onlycard";
|
||||
break;
|
||||
default:
|
||||
f.gopaymethod.value = "무통장";
|
||||
break;
|
||||
}
|
||||
<?php } ?>
|
||||
|
||||
// 결제정보설정
|
||||
@ -1380,7 +1402,8 @@ function forderform_check(f)
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
<?php } if($default['de_pg_service'] == 'lg') { ?>
|
||||
<?php } ?>
|
||||
<?php if($default['de_pg_service'] == 'lg') { ?>
|
||||
f.LGD_BUYER.value = f.od_name.value;
|
||||
f.LGD_BUYEREMAIL.value = f.od_email.value;
|
||||
f.LGD_BUYERPHONE.value = f.od_hp.value;
|
||||
@ -1403,6 +1426,24 @@ function forderform_check(f)
|
||||
f.submit();
|
||||
}
|
||||
<?php } ?>
|
||||
<?php if($default['de_pg_service'] == 'inicis') { ?>
|
||||
f.buyername.value = f.od_name.value;
|
||||
f.buyeremail.value = f.od_email.value;
|
||||
f.buyertel.value = f.od_hp.value ? f.od_hp.value : f.od_tel.value;
|
||||
f.recvname.value = f.od_b_name.value;
|
||||
f.recvtel.value = f.od_b_hp.value ? f.od_b_hp.value : f.od_b_tel.value;
|
||||
f.recvpostnum.value = f.od_b_zip1.value + f.od_b_zip2.value;
|
||||
f.recvaddr.value = f.od_b_addr1.value + " " +f.od_b_addr2.value;
|
||||
|
||||
if(f.gopaymethod.value != "무통장") {
|
||||
if(!set_encrypt_data(f))
|
||||
return false;
|
||||
|
||||
return pay(f);
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
<?php } ?>
|
||||
}
|
||||
|
||||
// 구매자 정보와 동일합니다.
|
||||
|
||||
@ -280,6 +280,9 @@ else if ($od_settle_case == "계좌이체")
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_SHOP_PATH.'/inicis/inipay_result.php';
|
||||
break;
|
||||
default:
|
||||
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
|
||||
$bank_name = iconv("cp949", "utf-8", $bank_name);
|
||||
@ -304,6 +307,10 @@ else if ($od_settle_case == "가상계좌")
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_SHOP_PATH.'/inicis/inipay_result.php';
|
||||
$od_app_no = $app_no;
|
||||
break;
|
||||
default:
|
||||
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
|
||||
$bankname = iconv("cp949", "utf-8", $bankname);
|
||||
@ -325,6 +332,9 @@ else if ($od_settle_case == "휴대폰")
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_SHOP_PATH.'/inicis/inipay_result.php';
|
||||
break;
|
||||
default:
|
||||
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
|
||||
break;
|
||||
@ -334,7 +344,7 @@ else if ($od_settle_case == "휴대폰")
|
||||
$od_receipt_price = $amount;
|
||||
$od_receipt_point = $i_temp_point;
|
||||
$od_receipt_time = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3 \\4:\\5:\\6", $app_time);
|
||||
$od_bank_account = $commid.' '.$mobile_no;
|
||||
$od_bank_account = $commid . ($commid ? ' ' : '').$mobile_no;
|
||||
$pg_price = $amount;
|
||||
$od_misu = $i_price - $od_receipt_price;
|
||||
if($od_misu == 0)
|
||||
@ -346,6 +356,9 @@ else if ($od_settle_case == "신용카드")
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_SHOP_PATH.'/inicis/inipay_result.php';
|
||||
break;
|
||||
default:
|
||||
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
|
||||
$card_name = iconv("cp949", "utf-8", $card_name);
|
||||
@ -376,6 +389,9 @@ if($tno) {
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_cancel.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
||||
break;
|
||||
default:
|
||||
include G5_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php';
|
||||
break;
|
||||
@ -491,6 +507,9 @@ if(!$result) {
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_cancel.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
||||
break;
|
||||
default:
|
||||
include G5_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php';
|
||||
break;
|
||||
@ -527,6 +546,9 @@ if(!$result) {
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_cancel.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
||||
break;
|
||||
default:
|
||||
include G5_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php';
|
||||
break;
|
||||
|
||||
@ -61,6 +61,48 @@ if($od['od_tno']) {
|
||||
alert($msg);
|
||||
}
|
||||
break;
|
||||
case 'inicis':
|
||||
include_once(G5_SHOP_PATH.'/settle_inicis.inc.php');
|
||||
$cancel_msg = iconv_euckr('주문자 본인 취소-'.$cancel_memo);
|
||||
|
||||
/*********************
|
||||
* 3. 취소 정보 설정 *
|
||||
*********************/
|
||||
$inipay->SetField("type", "cancel"); // 고정 (절대 수정 불가)
|
||||
$inipay->SetField("mid", $default['de_inicis_mid']); // 상점아이디
|
||||
/**************************************************************************************************
|
||||
* admin 은 키패스워드 변수명입니다. 수정하시면 안됩니다. 1111의 부분만 수정해서 사용하시기 바랍니다.
|
||||
* 키패스워드는 상점관리자 페이지(https://iniweb.inicis.com)의 비밀번호가 아닙니다. 주의해 주시기 바랍니다.
|
||||
* 키패스워드는 숫자 4자리로만 구성됩니다. 이 값은 키파일 발급시 결정됩니다.
|
||||
* 키패스워드 값을 확인하시려면 상점측에 발급된 키파일 안의 readme.txt 파일을 참조해 주십시오.
|
||||
**************************************************************************************************/
|
||||
$inipay->SetField("admin", $default['de_inicis_admin_key']); //비대칭 사용키 키패스워드
|
||||
$inipay->SetField("tid", $od['od_tno']); // 취소할 거래의 거래아이디
|
||||
$inipay->SetField("cancelmsg", $cancel_msg); // 취소사유
|
||||
|
||||
/****************
|
||||
* 4. 취소 요청 *
|
||||
****************/
|
||||
$inipay->startAction();
|
||||
|
||||
/****************************************************************
|
||||
* 5. 취소 결과 *
|
||||
* *
|
||||
* 결과코드 : $inipay->getResult('ResultCode') ("00"이면 취소 성공) *
|
||||
* 결과내용 : $inipay->getResult('ResultMsg') (취소결과에 대한 설명) *
|
||||
* 취소날짜 : $inipay->getResult('CancelDate') (YYYYMMDD) *
|
||||
* 취소시각 : $inipay->getResult('CancelTime') (HHMMSS) *
|
||||
* 현금영수증 취소 승인번호 : $inipay->getResult('CSHR_CancelNum') *
|
||||
* (현금영수증 발급 취소시에만 리턴됨) *
|
||||
****************************************************************/
|
||||
|
||||
$res_cd = $inipay->getResult('ResultCode');
|
||||
$res_msg = $inipay->getResult('ResultMsg');
|
||||
|
||||
if($res_cd != '00') {
|
||||
alert(iconv_utf8($res_msg).' 코드 : '.$res_cd);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
require_once('./settle_kcp.inc.php');
|
||||
|
||||
|
||||
@ -349,6 +349,8 @@ if($od['od_pg'] == 'lg') {
|
||||
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
|
||||
|
||||
$hp_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
|
||||
} else if($od['od_pg'] == 'inicis') {
|
||||
$hp_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/mCmReceipt_head.jsp?noTid='.$od['od_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
|
||||
} else {
|
||||
$hp_receipt_script = 'window.open(\''.G5_BILL_RECEIPT_URL.'mcash_bill&tno='.$od['od_tno'].'&order_no='.$od['od_id'].'&trade_mony='.$od['od_receipt_price'].'\', \'winreceipt\', \'width=500,height=690,scrollbars=yes,resizable=yes\');';
|
||||
}
|
||||
@ -366,6 +368,8 @@ if($od['od_pg'] == 'lg') {
|
||||
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
|
||||
|
||||
$card_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
|
||||
} else if($od['od_pg'] == 'inicis') {
|
||||
$card_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/mCmReceipt_head.jsp?noTid='.$od['od_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
|
||||
} else {
|
||||
$card_receipt_script = 'window.open(\''.G5_BILL_RECEIPT_URL.'card_bill&tno='.$od['od_tno'].'&order_no='.$od['od_id'].'&trade_mony='.$od['od_receipt_price'].'\', \'winreceipt\', \'width=470,height=815,scrollbars=yes,resizable=yes\');';
|
||||
}
|
||||
@ -427,6 +431,9 @@ if($od['od_pg'] == 'lg') {
|
||||
break;
|
||||
}
|
||||
$cash_receipt_script = 'javascript:showCashReceipts(\''.$LGD_MID.'\',\''.$od['od_id'].'\',\''.$od['od_casseqno'].'\',\''.$trade_type.'\',\''.$CST_PLATFORM.'\');';
|
||||
} else if($od['od_pg'] == 'inicis') {
|
||||
$cash = unserialize($od['od_cash_info']);
|
||||
$cash_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/Cash_mCmReceipt.jsp?noTid='.$cash['TID'].'&clpaymethod=22\',\'showreceipt\',\'width=380,height=540,scrollbars=no,resizable=no\');';
|
||||
} else {
|
||||
require_once G5_SHOP_PATH.'/settle_kcp.inc.php';
|
||||
|
||||
|
||||
@ -21,10 +21,13 @@ $g5['title'] = $pp['pp_name'].'님 개인결제';
|
||||
if($default['de_iche_use'] || $default['de_vbank_use'] || $default['de_hp_use'] || $default['de_card_use']) {
|
||||
switch($default['de_pg_service']) {
|
||||
case 'lg':
|
||||
$g5['body_script'] = 'onload="isActiveXOK();"';
|
||||
$g5['body_script'] = ' onload="isActiveXOK();"';
|
||||
break;
|
||||
case 'inicis':
|
||||
$g5['body_script'] = ' onload="javascript:enable_click()"';
|
||||
break;
|
||||
default:
|
||||
$g5['body_script'] = 'onload="CheckPayplusInstall();"';
|
||||
$g5['body_script'] = ' onload="CheckPayplusInstall();"';
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -92,7 +95,7 @@ require_once('./'.$default['de_pg_service'].'/orderform.1.php');
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="pp_hp">휴대폰</label></th>
|
||||
<td><input type="text" name="pp_hp" value="<?php echo $member['mb_hp']; ?>" id="pp_hp" class="frm_input"></td>
|
||||
<td><input type="text" name="pp_hp" value="<?php echo $member['mb_hp']; ?>" id="pp_hp" required class="required frm_input"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -257,6 +260,25 @@ function forderform_check(f)
|
||||
f.LGD_CUSTOM_FIRSTPAY.value = "무통장";
|
||||
break;
|
||||
}
|
||||
<?php } else if($default['de_pg_service'] == 'inicis') { ?>
|
||||
switch(settle_method)
|
||||
{
|
||||
case "계좌이체":
|
||||
f.gopaymethod.value = "onlydbank";
|
||||
break;
|
||||
case "가상계좌":
|
||||
f.gopaymethod.value = "onlyvbank";
|
||||
break;
|
||||
case "휴대폰":
|
||||
f.gopaymethod.value = "onlyhpp";
|
||||
break;
|
||||
case "신용카드":
|
||||
f.gopaymethod.value = "onlycard";
|
||||
break;
|
||||
default:
|
||||
f.gopaymethod.value = "무통장";
|
||||
break;
|
||||
}
|
||||
<?php } ?>
|
||||
|
||||
// 결제정보설정
|
||||
@ -279,7 +301,8 @@ function forderform_check(f)
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
<?php } if($default['de_pg_service'] == 'lg') { ?>
|
||||
<?php } ?>
|
||||
<?php if($default['de_pg_service'] == 'lg') { ?>
|
||||
f.LGD_BUYER.value = f.pp_name.value;
|
||||
f.LGD_BUYEREMAIL.value = f.pp_email.value;
|
||||
f.LGD_BUYERPHONE.value = f.pp_hp.value;
|
||||
@ -292,6 +315,20 @@ function forderform_check(f)
|
||||
f.submit();
|
||||
}
|
||||
<?php } ?>
|
||||
<?php if($default['de_pg_service'] == 'inicis') { ?>
|
||||
f.buyername.value = f.pp_name.value;
|
||||
f.buyeremail.value = f.pp_email.value;
|
||||
f.buyertel.value = f.pp_hp.value;
|
||||
|
||||
if(f.gopaymethod.value != "무통장") {
|
||||
if(!set_encrypt_data(f))
|
||||
return false;
|
||||
|
||||
return pay(f);
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
<?php } ?>
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -3,7 +3,10 @@ include_once('./_common.php');
|
||||
include_once(G5_LIB_PATH.'/mailer.lib.php');
|
||||
|
||||
if($default['de_pg_service'] == 'lg' && !$_POST['LGD_PAYKEY'])
|
||||
alert('결제등록 요청 후 주문해 주십시오.');
|
||||
alert('결제등록 요청 후 결제해 주십시오.');
|
||||
|
||||
if($default['de_pg_service'] == 'inicis' && !$_POST['P_HASH'])
|
||||
alert('결제등록 요청 후 결제해 주십시오.');
|
||||
|
||||
// 개인결제 정보
|
||||
$pp_check = false;
|
||||
@ -26,6 +29,9 @@ if ($pp_settle_case == "계좌이체")
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_SHOP_PATH.'/inicis/inipay_result.php';
|
||||
break;
|
||||
default:
|
||||
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
|
||||
$bank_name = iconv("cp949", "utf-8", $bank_name);
|
||||
@ -45,6 +51,9 @@ else if ($pp_settle_case == "가상계좌")
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_SHOP_PATH.'/inicis/inipay_result.php';
|
||||
break;
|
||||
default:
|
||||
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
|
||||
$bankname = iconv("cp949", "utf-8", $bankname);
|
||||
@ -64,6 +73,9 @@ else if ($pp_settle_case == "휴대폰")
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_SHOP_PATH.'/inicis/inipay_result.php';
|
||||
break;
|
||||
default:
|
||||
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
|
||||
break;
|
||||
@ -81,6 +93,9 @@ else if ($pp_settle_case == "신용카드")
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_SHOP_PATH.'/inicis/inipay_result.php';
|
||||
break;
|
||||
default:
|
||||
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
|
||||
$card_name = iconv("cp949", "utf-8", $card_name);
|
||||
@ -105,6 +120,9 @@ if((int)$pp['pp_price'] !== (int)$pg_price) {
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_cancel.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
||||
break;
|
||||
default:
|
||||
include G5_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php';
|
||||
break;
|
||||
@ -139,6 +157,9 @@ if(!$result) {
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_cancel.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
||||
break;
|
||||
default:
|
||||
include G5_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php';
|
||||
break;
|
||||
@ -174,6 +195,9 @@ if($pp_receipt_price > 0 && $pp['pp_id'] && $pp['od_id']) {
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_cancel.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
||||
break;
|
||||
default:
|
||||
include G5_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php';
|
||||
break;
|
||||
|
||||
@ -147,6 +147,8 @@ if($pp['pp_pg'] == 'lg') {
|
||||
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
|
||||
|
||||
$hp_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
|
||||
} else if($pp['pp_pg'] == 'inicis') {
|
||||
$hp_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/mCmReceipt_head.jsp?noTid='.$pp['pp_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
|
||||
} else {
|
||||
$hp_receipt_script = 'window.open(\''.G5_BILL_RECEIPT_URL.'mcash_bill&tno='.$pp['pp_tno'].'&order_no='.$pp['pp_id'].'&trade_mony='.$pp['pp_receipt_price'].'\', \'winreceipt\', \'width=500,height=690,scrollbars=yes,resizable=yes\');';
|
||||
}
|
||||
@ -164,6 +166,8 @@ if($pp['pp_pg'] == 'lg') {
|
||||
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
|
||||
|
||||
$card_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
|
||||
} else if($pp['pp_pg'] == 'inicis') {
|
||||
$card_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/mCmReceipt_head.jsp?noTid='.$pp['pp_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
|
||||
} else {
|
||||
$card_receipt_script = 'window.open(\''.G5_BILL_RECEIPT_URL.'card_bill&tno='.$pp['pp_tno'].'&order_no='.$pp['pp_id'].'&trade_mony='.$pp['pp_receipt_price'].'\', \'winreceipt\', \'width=470,height=815,scrollbars=yes,resizable=yes\');';
|
||||
}
|
||||
@ -215,6 +219,9 @@ if($pp['pp_pg'] == 'lg') {
|
||||
break;
|
||||
}
|
||||
$cash_receipt_script = 'javascript:showCashReceipts(\''.$LGD_MID.'\',\''.$pp['pp_id'].'\',\''.$pp['pp_casseqno'].'\',\''.$trade_type.'\',\''.$CST_PLATFORM.'\');';
|
||||
} else if($pp['pp_pg'] == 'inicis') {
|
||||
$cash = unserialize($pp['pp_cash_info']);
|
||||
$cash_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/Cash_mCmReceipt.jsp?noTid='.$cash['TID'].'&clpaymethod=22\',\'showreceipt\',\'width=380,height=540,scrollbars=no,resizable=no\');';
|
||||
} else {
|
||||
require_once G5_SHOP_PATH.'/settle_kcp.inc.php';
|
||||
|
||||
|
||||
@ -164,7 +164,7 @@ HEREDOC;
|
||||
$point = get_item_point($row, $row2['io_id']);
|
||||
|
||||
if($delivery) {
|
||||
$deliv = $delivery;
|
||||
$deliv = 1;
|
||||
$deliv2 = $delivery.'원';
|
||||
} else {
|
||||
$deliv = 0;
|
||||
|
||||
111
shop/settle_inicis.inc.php
Normal file
111
shop/settle_inicis.inc.php
Normal file
@ -0,0 +1,111 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
if ($default['de_card_test']) {
|
||||
if ($default['de_escrow_use'] == 1) {
|
||||
// 에스크로결제 테스트
|
||||
$default['de_inicis_mid'] = 'iniescrow0';
|
||||
$default['de_inicis_admin_key'] = '1111';
|
||||
}
|
||||
else {
|
||||
// 일반결제 테스트
|
||||
$default['de_inicis_mid'] = 'INIpayTest';
|
||||
$default['de_inicis_admin_key'] = '1111';
|
||||
}
|
||||
}
|
||||
else {
|
||||
$default['de_inicis_mid'] = "SIR".$default['de_inicis_mid'];
|
||||
|
||||
if ($default['de_escrow_use'] == 1) {
|
||||
// 에스크로결제 테스트
|
||||
$useescrow = ':useescrow';
|
||||
}
|
||||
else {
|
||||
// 일반결제 테스트
|
||||
$useescrow = '';
|
||||
}
|
||||
}
|
||||
|
||||
/**************************
|
||||
* 1. 라이브러리 인클루드 *
|
||||
**************************/
|
||||
require(G5_SHOP_PATH.'/inicis/libs/INILib.php');
|
||||
|
||||
/***************************************
|
||||
* 2. INIpay50 클래스의 인스턴스 생성 *
|
||||
***************************************/
|
||||
$inipay = new INIpay50;
|
||||
|
||||
$inipay->SetField("inipayhome", G5_SHOP_PATH.'/inicis'); // 이니페이 홈디렉터리(상점수정 필요)
|
||||
$inipay->SetField("debug", "false"); // 로그모드("true"로 설정하면 상세로그가 생성됨.)
|
||||
|
||||
$inipay_nointerest = 'no'; //무이자여부(no:일반, yes:무이자)
|
||||
$inipay_quotabase = '선택:일시불:2개월:3개월:4개월:5개월:6개월:7개월:8개월:9개월:10개월:11개월:12개월'; // 할부기간
|
||||
|
||||
$BANK_CODE = array(
|
||||
'03' => '기업은행',
|
||||
'04' => '국민은행',
|
||||
'05' => '외환은행',
|
||||
'07' => '수협중앙회',
|
||||
'11' => '농협중앙회',
|
||||
'20' => '우리은행',
|
||||
'23' => 'SC 제일은행',
|
||||
'31' => '대구은행',
|
||||
'32' => '부산은행',
|
||||
'34' => '광주은행',
|
||||
'37' => '전북은행',
|
||||
'39' => '경남은행',
|
||||
'53' => '한국씨티은행',
|
||||
'71' => '우체국',
|
||||
'81' => '하나은행',
|
||||
'88' => '신한은행',
|
||||
'D1' => '동양종합금융증권',
|
||||
'D2' => '현대증권',
|
||||
'D3' => '미래에셋증권',
|
||||
'D4' => '한국투자증권',
|
||||
'D5' => '우리투자증권',
|
||||
'D6' => '하이투자증권',
|
||||
'D7' => 'HMC 투자증권',
|
||||
'D8' => 'SK 증권',
|
||||
'D9' => '대신증권',
|
||||
'DA' => '하나대투증권',
|
||||
'DB' => '굿모닝신한증권',
|
||||
'DC' => '동부증권',
|
||||
'DD' => '유진투자증권',
|
||||
'DE' => '메리츠증권',
|
||||
'DF' => '신영증권'
|
||||
);
|
||||
|
||||
$CARD_CODE = array(
|
||||
'01' => '외환',
|
||||
'03' => '롯데',
|
||||
'04' => '현대',
|
||||
'06' => '국민',
|
||||
'11' => 'BC',
|
||||
'12' => '삼성',
|
||||
'14' => '신한',
|
||||
'15' => '한미',
|
||||
'16' => 'NH',
|
||||
'17' => '하나 SK',
|
||||
'21' => '해외비자',
|
||||
'22' => '해외마스터',
|
||||
'23' => 'JCB',
|
||||
'24' => '해외아멕스',
|
||||
'25' => '해외다이너스'
|
||||
);
|
||||
|
||||
$PAY_METHOD = array(
|
||||
'VCard' => '신용카드',
|
||||
'Card' => '신용카드',
|
||||
'DirectBank' => '계좌이체',
|
||||
'HPP' => '휴대폰',
|
||||
'VBank' => '가상계좌'
|
||||
);
|
||||
|
||||
// 플러그인 호출 URL
|
||||
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on') {
|
||||
$ini_js_url = 'https://plugin.inicis.com/pay61_secunissl_crossl.js';
|
||||
} else {
|
||||
$ini_js_url = 'http://plugin.inicis.com/pay61_secuni_cross.js';
|
||||
}
|
||||
?>
|
||||
183
shop/settle_inicis_common.php
Normal file
183
shop/settle_inicis_common.php
Normal file
@ -0,0 +1,183 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
//**********************************************************************************
|
||||
//이니시스가 전달하는 가상계좌이체의 결과를 수신하여 DB 처리 하는 부분 입니다.
|
||||
//필요한 파라메터에 대한 DB 작업을 수행하십시오.
|
||||
//**********************************************************************************
|
||||
|
||||
//**********************************************************************************
|
||||
// 이부분에 로그파일 경로를 수정해주세요.
|
||||
|
||||
$INIpayHome = G5_SHOP_PATH.'/inicis'; // 이니페이 홈디렉터리
|
||||
$INIpayLog = false; // 로그를 기록하려면 true 로 수정
|
||||
|
||||
//**********************************************************************************
|
||||
|
||||
$TEMP_IP = getenv("REMOTE_ADDR");
|
||||
$PG_IP = substr($TEMP_IP,0, 10);
|
||||
|
||||
if( $PG_IP == "203.238.37" || $PG_IP == "210.98.138" ) //PG에서 보냈는지 IP로 체크
|
||||
{
|
||||
$msg_id = $msg_id; //메세지 타입
|
||||
$no_tid = $no_tid; //거래번호
|
||||
$no_oid = $no_oid; //상점 주문번호
|
||||
$id_merchant = $id_merchant; //상점 아이디
|
||||
$cd_bank = $cd_bank; //거래 발생 기관 코드
|
||||
$cd_deal = $cd_deal; //취급 기관 코드
|
||||
$dt_trans = $dt_trans; //거래 일자
|
||||
$tm_trans = $tm_trans; //거래 시간
|
||||
$no_msgseq = $no_msgseq; //전문 일련 번호
|
||||
$cd_joinorg = $cd_joinorg; //제휴 기관 코드
|
||||
|
||||
$dt_transbase = $dt_transbase; //거래 기준 일자
|
||||
$no_transeq = $no_transeq; //거래 일련 번호
|
||||
$type_msg = $type_msg; //거래 구분 코드
|
||||
$cl_close = $cl_close; //마감 구분코드
|
||||
$cl_kor = $cl_kor; //한글 구분 코드
|
||||
$no_msgmanage = $no_msgmanage; //전문 관리 번호
|
||||
$no_vacct = $no_vacct; //가상계좌번호
|
||||
$amt_input = $amt_input; //입금금액
|
||||
$amt_check = $amt_check; //미결제 타점권 금액
|
||||
$nm_inputbank = $nm_inputbank; //입금 금융기관명
|
||||
$nm_input = $nm_input; //입금 의뢰인
|
||||
$dt_inputstd = $dt_inputstd; //입금 기준 일자
|
||||
$dt_calculstd = $dt_calculstd; //정산 기준 일자
|
||||
$flg_close = $flg_close; //마감 전화
|
||||
|
||||
//가상계좌채번시 현금영수증 자동발급신청시에만 전달
|
||||
$dt_cshr = $dt_cshr; //현금영수증 발급일자
|
||||
$tm_cshr = $tm_cshr; //현금영수증 발급시간
|
||||
$no_cshr_appl = $no_cshr_appl; //현금영수증 발급번호
|
||||
$no_cshr_tid = $no_cshr_tid; //현금영수증 발급TID
|
||||
|
||||
// 입금결과 처리
|
||||
$sql = " select pp_id, od_id from {$g5['g5_shop_personalpay_table']} where pp_id = '$no_oid' and pp_app_no = '$no_vacct' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
$result = false;
|
||||
$receipt_time = $dt_trans.$tm_trans;
|
||||
|
||||
if($row['pp_id']) {
|
||||
// 개인결제 UPDATE
|
||||
$sql = " update {$g5['g5_shop_personalpay_table']}
|
||||
set pp_receipt_price = '$amt_input',
|
||||
pp_receipt_time = '$receipt_time'
|
||||
where pp_id = '$no_oid'
|
||||
and pp_app_no = '$no_vacct' ";
|
||||
sql_query($sql, false);
|
||||
|
||||
if($row['od_id']) {
|
||||
// 주문서 UPDATE
|
||||
$receipt_time = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3 \\4:\\5:\\6", $receipt_time);
|
||||
$sql = " update {$g5['g5_shop_order_table']}
|
||||
set od_receipt_price = od_receipt_price + '$amt_input',
|
||||
od_receipt_time = '$receipt_time',
|
||||
od_shop_memo = concat(od_shop_memo, \"\\n개인결제 ".$row['pp_id']." 로 결제완료 - ".$receipt_time."\")
|
||||
where od_id = '{$row['od_id']}' ";
|
||||
$result = sql_query($sql, FALSE);
|
||||
}
|
||||
} else {
|
||||
// 주문서 UPDATE
|
||||
$sql = " update {$g5['g5_shop_order_table']}
|
||||
set od_receipt_price = '$amt_input',
|
||||
od_receipt_time = '$receipt_time'
|
||||
where od_id = '$no_oid'
|
||||
and od_app_no = '$no_vacct' ";
|
||||
$result = sql_query($sql, FALSE);
|
||||
}
|
||||
|
||||
if($result) {
|
||||
if($row['od_id'])
|
||||
$od_id = $row['od_id'];
|
||||
else
|
||||
$od_id = $no_oid;
|
||||
|
||||
// 주문정보 체크
|
||||
$sql = " select count(od_id) as cnt
|
||||
from {$g5['g5_shop_order_table']}
|
||||
where od_id = '$od_id'
|
||||
and od_status = '주문' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
if($row['cnt'] == 1) {
|
||||
// 미수금 정보 업데이트
|
||||
$info = get_order_info($od_id);
|
||||
|
||||
$sql = " update {$g5['g5_shop_order_table']}
|
||||
set od_misu = '{$info['od_misu']}' ";
|
||||
if($info['od_misu'] == 0)
|
||||
$sql .= " , od_status = '입금' ";
|
||||
$sql .= " where od_id = '$od_id' ";
|
||||
sql_query($sql, FALSE);
|
||||
|
||||
// 장바구니 상태변경
|
||||
if($info['od_misu'] == 0) {
|
||||
$sql = " update {$g5['g5_shop_cart_table']}
|
||||
set ct_status = '입금'
|
||||
where od_id = '$od_id' ";
|
||||
sql_query($sql, FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($INIpayLog) {
|
||||
$logfile = fopen( $INIpayHome . "/log/result.log", "a+" );
|
||||
|
||||
fwrite( $logfile,"************************************************");
|
||||
fwrite( $logfile,"ID_MERCHANT : ".$id_merchant."\r\n");
|
||||
fwrite( $logfile,"NO_TID : ".$no_tid."\r\n");
|
||||
fwrite( $logfile,"NO_OID : ".$no_oid."\r\n");
|
||||
fwrite( $logfile,"NO_VACCT : ".$no_vacct."\r\n");
|
||||
fwrite( $logfile,"AMT_INPUT : ".$amt_input."\r\n");
|
||||
fwrite( $logfile,"NM_INPUTBANK : ".$nm_inputbank."\r\n");
|
||||
fwrite( $logfile,"NM_INPUT : ".$nm_input."\r\n");
|
||||
fwrite( $logfile,"************************************************");
|
||||
|
||||
fwrite( $logfile,"전체 결과값"."\r\n");
|
||||
fwrite( $logfile, $msg_id."\r\n");
|
||||
fwrite( $logfile, $no_tid."\r\n");
|
||||
fwrite( $logfile, $no_oid."\r\n");
|
||||
fwrite( $logfile, $id_merchant."\r\n");
|
||||
fwrite( $logfile, $cd_bank."\r\n");
|
||||
fwrite( $logfile, $dt_trans."\r\n");
|
||||
fwrite( $logfile, $tm_trans."\r\n");
|
||||
fwrite( $logfile, $no_msgseq."\r\n");
|
||||
fwrite( $logfile, $type_msg."\r\n");
|
||||
fwrite( $logfile, $cl_close."\r\n");
|
||||
fwrite( $logfile, $cl_kor."\r\n");
|
||||
fwrite( $logfile, $no_msgmanage."\r\n");
|
||||
fwrite( $logfile, $no_vacct."\r\n");
|
||||
fwrite( $logfile, $amt_input."\r\n");
|
||||
fwrite( $logfile, $amt_check."\r\n");
|
||||
fwrite( $logfile, $nm_inputbank."\r\n");
|
||||
fwrite( $logfile, $nm_input."\r\n");
|
||||
fwrite( $logfile, $dt_inputstd."\r\n");
|
||||
fwrite( $logfile, $dt_calculstd."\r\n");
|
||||
fwrite( $logfile, $flg_close."\r\n");
|
||||
fwrite( $logfile, "\r\n");
|
||||
|
||||
fclose( $logfile );
|
||||
}
|
||||
|
||||
|
||||
//************************************************************************************
|
||||
|
||||
//위에서 상점 데이터베이스에 등록 성공유무에 따라서 성공시에는 "OK"를 이니시스로
|
||||
//리턴하셔야합니다. 아래 조건에 데이터베이스 성공시 받는 FLAG 변수를 넣으세요
|
||||
//(주의) OK를 리턴하지 않으시면 이니시스 지불 서버는 "OK"를 수신할때까지 계속 재전송을 시도합니다
|
||||
//기타 다른 형태의 PRINT( echo )는 하지 않으시기 바랍니다
|
||||
|
||||
if ($result)
|
||||
{
|
||||
echo "OK"; // 절대로 지우지마세요
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "DB Error";
|
||||
}
|
||||
|
||||
//*************************************************************************************
|
||||
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user