php8.0 버전 호환 코드 적용 및 PHP 끝 태그 삭제 일괄적용

This commit is contained in:
thisgun
2021-01-04 15:39:15 +09:00
parent 131b170b54
commit 27e9af5e42
1009 changed files with 12120 additions and 10849 deletions

View File

@ -1,3 +1,2 @@
<?php
include_once('../../common.php');
?>
include_once('../../common.php');

View File

@ -111,5 +111,4 @@ $inipay->startAction();
$resultCode = $inipay->GetResult("ResultCode"); // 결과코드 ("00"이면 지불 성공)
$resultMsg = $inipay->GetResult("ResultMsg"); // 결과내용 (지불결과에 대한 설명)
$dlv_date = $inipay->GetResult("DLV_Date");
$dlv_time = $inipay->GetResult("DLV_Time");
?>
$dlv_time = $inipay->GetResult("DLV_Time");

View File

@ -60,5 +60,4 @@ if($cancelFlag == "true")
{
$inipay->MakeTXErrMsg(MERCHANT_DB_ERR,"Merchant DB FAIL");
}
}
?>
}

View File

@ -124,19 +124,19 @@ try {
$app_time = $resultMap['applDate'].$resultMap['applTime'];
$pay_method = $resultMap['payMethod'];
$pay_type = $PAY_METHOD[$pay_method];
$depositor = $resultMap['VACT_InputName'];
$depositor = isset($resultMap['VACT_InputName']) ? $resultMap['VACT_InputName'] : '';
$commid = '';
$mobile_no = $resultMap['HPP_Num'];
$app_no = $resultMap['applNum'];
$card_name = $CARD_CODE[$resultMap['CARD_Code']];
$mobile_no = isset($resultMap['HPP_Num']) ? $resultMap['HPP_Num'] : '';
$app_no = isset($resultMap['applNum']) ? $resultMap['applNum'] : '';
$card_name = isset($resultMap['CARD_Code']) ? $CARD_CODE[$resultMap['CARD_Code']] : '';
switch($pay_type) {
case '계좌이체':
$bank_name = $BANK_CODE[$resultMap['ACCT_BankCode']];
$bank_name = isset($BANK_CODE[$resultMap['ACCT_BankCode']]) ? $BANK_CODE[$resultMap['ACCT_BankCode']] : '';
if ($default['de_escrow_use'] == 1)
$escw_yn = 'Y';
break;
case '가상계좌':
$bankname = $BANK_CODE[$resultMap['VACT_BankCode']];
$bankname = isset($BANK_CODE[$resultMap['VACT_BankCode']]) ? $BANK_CODE[$resultMap['VACT_BankCode']] : '';
$account = $resultMap['VACT_Num'].' '.$resultMap['VACT_Name'];
$app_no = $resultMap['VACT_Num'];
if ($default['de_escrow_use'] == 1)
@ -211,5 +211,4 @@ try {
if( !$inicis_pay_result ){
die("<br><br>결제 에러가 일어났습니다. 에러 이유는 위와 같습니다.");
}
?>
}

View File

@ -74,5 +74,4 @@ if(isset($data['pp_id']) && $data['pp_id']) { //개인결제
$od_send_cost2 = (int) $_POST['od_send_cost2'];
include_once(G5_SHOP_PATH.'/orderformupdate.php');
}
?>
}

View File

@ -96,25 +96,4 @@ class CreateIdModule {
return $strNum;
}
}
?>
}

View File

@ -144,6 +144,4 @@ class HttpClient {
return $this->body;
}
}
?>
}

View File

@ -15,56 +15,61 @@ require_once ( "INIXml.php" );
/* ----------------------------------------------------- */
extract($_POST);
extract($_GET);
$paymethod = isset($paymethod) ? preg_replace('/[^0-9a-z_\-]/i', '', $paymethod) : '';
switch ($paymethod) {
case(Card): // 신용카드
case('Card'): // 신용카드
$pgid = "CARD";
break;
case(Account): // 은행 계좌 이체
case('Account'): // 은행 계좌 이체
$pgid = "ACCT";
break;
case(DirectBank): // 실시간 계좌 이체
case('DirectBank'): // 실시간 계좌 이체
$pgid = "DBNK";
break;
case(OCBPoint): // OCB
case('OCBPoint'): // OCB
$pgid = "OCBP";
break;
case(VCard): // ISP 결제
case('VCard'): // ISP 결제
$pgid = "ISP_";
break;
case(HPP): // 휴대폰 결제
case('HPP'): // 휴대폰 결제
$pgid = "HPP_";
break;
case(ArsBill): // 700 전화결제
case('ArsBill'): // 700 전화결제
$pgid = "ARSB";
break;
case(PhoneBill): // PhoneBill 결제(받는 전화)
case('PhoneBill'): // PhoneBill 결제(받는 전화)
$pgid = "PHNB";
break;
case(Ars1588Bill):// 1588 전화결제
case('Ars1588Bill'):// 1588 전화결제
$pgid = "1588";
break;
case(VBank): // 가상계좌 이체
case('VBank'): // 가상계좌 이체
$pgid = "VBNK";
break;
case(Culture): // 문화상품권 결제
case('Culture'): // 문화상품권 결제
$pgid = "CULT";
break;
case(CMS): // CMS 결제
case('CMS'): // CMS 결제
$pgid = "CMS_";
break;
case(AUTH): // 신용카드 유효성 검사
case('AUTH'): // 신용카드 유효성 검사
$pgid = "AUTH";
break;
case(INIcard): // 네티머니 결제
case('INIcard'): // 네티머니 결제
$pgid = "INIC";
break;
case(MDX): // 몬덱스카드
case('MDX'): // 몬덱스카드
$pgid = "MDX_";
break;
default: // 상기 지불수단 외 추가되는 지불수단의 경우 기본으로 paymethod가 4자리로 넘어온다.
$pgid = $paymethod;
}
$quotainterest = isset($quotainterest) ? $quotainterest : '';
if ($quotainterest == "1") {
$interest = "(무이자할부)";
}
@ -78,7 +83,7 @@ function Base64Encode($str) {
}
function GetMicroTime() {
list($usec, $sec) = explode(" ", microtime(true));
list($usec, $sec) = explode(" ", microtime());
return (float) $usec + (float) $sec;
}
@ -110,11 +115,11 @@ class INILog {
$this->debug_msg = array("", "CRITICAL", "ERROR", "NOTICE", "4", "INFO", "6", "DEBUG", "8");
$this->debug_mode = $request["debug"];
$this->type = $request["type"];
$this->log = $request["log"];
$this->log = isset($request["log"]) ? $request["log"] : '';
$this->homedir = $request["inipayhome"];
$this->mid = $request["mid"];
$this->starttime = GetMicroTime();
$this->mergelog = $request["mergelog"];
$this->mergelog = isset($request["mergelog"]) ? $request["mergelog"] : '';
}
function StartLog() {
@ -272,7 +277,7 @@ class INIData {
$this->m_sCmd = CMD_REQ_PAY;
$this->m_sCrypto = FLAG_CRYPTO_3DES;
}
$this->m_sPayMethod = $this->m_REQUEST["paymethod"];
$this->m_sPayMethod = isset($this->m_REQUEST["paymethod"]) ? $this->m_REQUEST["paymethod"] : '';
$this->m_TXVersion = sprintf("%-6.6s", VERSION) .
sprintf("B%-8.8s", BUILDDATE) .
@ -511,15 +516,21 @@ class INIData {
$PD = $xml->add_node($CS, TX_CSHR_SUBSERVICEPRICE1, $this->m_REQUEST[""] );
*/
} else if ($this->m_Type == TYPE_CANCEL) {
$cancelcode = isset($this->m_REQUEST["cancelcode"]) ? $this->m_REQUEST["cancelcode"] : '';
$CI = $xml->add_node("", CANCELINFO);
$CD = $xml->add_node($CI, TX_CANCELTID, $this->m_REQUEST["tid"]);
$CD = $xml->add_node($CI, TX_CANCELMSG, $this->m_REQUEST["cancelmsg"], array("urlencode" => "1"));
$CD = $xml->add_node($CI, TX_CANCELREASON, $this->m_REQUEST["cancelcode"]);
$CD = $xml->add_node($CI, TX_CANCELREASON, $cancelcode);
$node_racctnum = isset($this->m_REQUEST["racctnum"]) ? $this->m_REQUEST["racctnum"] : '';
$node_rbankcode = isset($this->m_REQUEST["rbankcode"]) ? $this->m_REQUEST["rbankcode"] : '';
$node_racctname = isset($this->m_REQUEST["racctname"]) ? $this->m_REQUEST["racctname"] : '';
//휴대폰 익월환불 추가
$CD = $xml->add_node($CI, TX_REFUNDACCTNUM, $this->m_REQUEST["racctnum"]);
$CD = $xml->add_node($CI, TX_REFUNDBANKCODE, $this->m_REQUEST["rbankcode"]);
$CD = $xml->add_node($CI, TX_REFUNDACCTNAME, $this->m_REQUEST["racctname"], array("urlencode" => "1"));
$CD = $xml->add_node($CI, TX_REFUNDACCTNUM, $node_racctnum);
$CD = $xml->add_node($CI, TX_REFUNDBANKCODE, $node_rbankcode);
$CD = $xml->add_node($CI, TX_REFUNDACCTNAME, $node_racctname, array("urlencode" => "1"));
$this->AddUserDefinedEntity(CANCELINFO, "", $xml, $CI);
} else if ($this->m_Type == TYPE_REPAY) {
@ -644,10 +655,13 @@ class INIData {
$this->m_sHead .= sprintf("%20s", $this->m_TXPGPubSN);
$this->m_sHead .= sprintf("%4s", $this->m_sCmd);
$this->m_sHead .= sprintf("%10s", $this->m_REQUEST["mid"]);
if ($this->m_Type == TYPE_RECEIPT)
$this->m_sHead .= sprintf("%20s", $this->m_REQUEST["cr_price"]);
else
$this->m_sHead .= sprintf("%20s", $this->m_REQUEST["price"]);
if ($this->m_Type == TYPE_RECEIPT) {
$cr_price = isset($this->m_REQUEST["cr_price"]) ? $this->m_REQUEST["cr_price"] : 0;
$this->m_sHead .= sprintf("%20s", $cr_price);
} else {
$price = isset($this->m_REQUEST["price"]) ? $this->m_REQUEST["price"] : 0;
$this->m_sHead .= sprintf("%20s", $price);
}
$this->m_sHead .= sprintf("%40s", $this->m_REQUEST["tid"]);
$this->m_sMsg = $this->m_sHead . $this->m_sBody . $this->m_sTail;
@ -699,24 +713,27 @@ class INIData {
//GoodsInfo
//장바구니 기능 추가(2010.04.13)
//==goodscnt가 없을 경우(장바구니 기능이 아닐경우) 기본 값 1로 설정
$tGoodCnt = ($this->m_REQUEST["goodscnt"] != null && (int) $this->m_REQUEST["goodscnt"] > 0 ) ? $this->m_REQUEST["goodscnt"] : 1;
$tGoodCnt = (isset($this->m_REQUEST["goodscnt"]) && (int) $this->m_REQUEST["goodscnt"] > 0 ) ? $this->m_REQUEST["goodscnt"] : 1;
$request_oid = isset($this->m_REQUEST["oid"]) ? $this->m_REQUEST["oid"] : '';
$request_taxfree = isset($this->m_REQUEST["taxfree"]) ? $this->m_REQUEST["taxfree"] : '';
$GI = $xml->add_node($root, GOODSINFO);
//장바구니 기능 추가(2010.04.13)
//==TX_GOOSCNT는 $tGoodCnt로 부터 입력
//$GP = $xml->add_node($GI, TX_GOOSCNT, "1" );
$GP = $xml->add_node($GI, TX_GOOSCNT, $tGoodCnt);
$GP = $xml->add_node($GI, TX_MOID, $this->m_REQUEST["oid"], array("urlencode" => "1"));
$GP = $xml->add_node($GI, TX_MOID, $request_oid, array("urlencode" => "1"));
$GP = $xml->add_node($GI, TX_CURRENCY, $this->m_REQUEST["currency"]);
$GP = $xml->add_node($GI, TX_TAX, $this->m_REQUEST["tax"]);
$GP = $xml->add_node($GI, TX_TAXFREE, $this->m_REQUEST["taxfree"]);
$GP = $xml->add_node($GI, TX_TAXFREE, $request_taxfree);
$this->AddUserDefinedEntity(GOODSINFO, "", $xml, $GI);
//장바구니 기능 추가(2010.04.13) [START]
//==장바구니 XML 전문 추가
$iGoodCnt = 1;
while ($iGoodCnt <= $tGoodCnt) {
if ($this->m_REQUEST["smid_" . $iGoodCnt] != "" && strlen($this->m_REQUEST["smid_" . $iGoodCnt]) > 0) {
if (isset($this->m_REQUEST["smid_" . $iGoodCnt]) && strlen($this->m_REQUEST["smid_" . $iGoodCnt]) > 0) {
$GS = $xml->add_node($GI, GOODS);
$GD = $xml->add_node($GS, TX_SMID, $this->m_REQUEST["smid_" . $iGoodCnt]);
$GD = $xml->add_node($GS, TX_GOODSNAME, $this->m_REQUEST["goodsname_" . $iGoodCnt], array("urlencode" => "1"));
@ -739,6 +756,16 @@ class INIData {
$iGoodCnt++;
}
//장바구니 기능 추가(2010.04.13) [END]
$request_parentemail = isset($this->m_REQUEST["parentemail"]) ? $this->m_REQUEST["parentemail"] : '';
$request_recvname = isset($this->m_REQUEST["recvname"]) ? $this->m_REQUEST["recvname"] : '';
$request_recvtel = isset($this->m_REQUEST["recvtel"]) ? $this->m_REQUEST["recvtel"] : '';
$request_recvmsg = isset($this->m_REQUEST["recvmsg"]) ? $this->m_REQUEST["recvmsg"] : '';
$request_recvaddr = isset($this->m_REQUEST["recvaddr"]) ? $this->m_REQUEST["recvaddr"] : '';
$request_recvpostnum = isset($this->m_REQUEST["recvpostnum"]) ? $this->m_REQUEST["recvpostnum"] : '';
$request_joincard = isset($this->m_REQUEST["joincard"]) ? $this->m_REQUEST["joincard"] : '';
$request_joinexpire = isset($this->m_REQUEST["joinexpire"]) ? $this->m_REQUEST["joinexpire"] : '';
$request_mailorder = isset($this->m_REQUEST["mailorder"]) ? $this->m_REQUEST["mailorder"] : '';
$this->AddUserDefinedEntity(GOODSINFO, GOODS, $xml, $GS);
//BuyerInfo
@ -746,20 +773,20 @@ class INIData {
$BP = $xml->add_node($BI, TX_BUYERNAME, $this->m_REQUEST["buyername"], array("urlencode" => "1"));
$BP = $xml->add_node($BI, TX_BUYERTEL, $this->m_REQUEST["buyertel"]);
$BP = $xml->add_node($BI, TX_BUYEREMAIL, $this->m_REQUEST["buyeremail"], array("urlencode" => "1"));
$BP = $xml->add_node($BI, TX_PARENTEMAIL, $this->m_REQUEST["parentemail"], array("urlencode" => "1"));
$BP = $xml->add_node($BI, TX_RECVNAME, $this->m_REQUEST["recvname"], array("urlencode" => "1"));
$BP = $xml->add_node($BI, TX_RECVTEL, $this->m_REQUEST["recvtel"], array("urlencode" => "1"));
$BP = $xml->add_node($BI, TX_RECVMSG, $this->m_REQUEST["recvmsg"], array("urlencode" => "1"));
$BP = $xml->add_node($BI, TX_RECVADDR, $this->m_REQUEST["recvaddr"], array("urlencode" => "1"));
$BP = $xml->add_node($BI, TX_RECVPOSTNUM, $this->m_REQUEST["recvpostnum"], array("urlencode" => "1"));
$BP = $xml->add_node($BI, TX_PARENTEMAIL, $request_parentemail, array("urlencode" => "1"));
$BP = $xml->add_node($BI, TX_RECVNAME, $request_recvname, array("urlencode" => "1"));
$BP = $xml->add_node($BI, TX_RECVTEL, $request_recvtel, array("urlencode" => "1"));
$BP = $xml->add_node($BI, TX_RECVMSG, $request_recvmsg, array("urlencode" => "1"));
$BP = $xml->add_node($BI, TX_RECVADDR, $request_recvaddr, array("urlencode" => "1"));
$BP = $xml->add_node($BI, TX_RECVPOSTNUM, $request_recvpostnum, array("urlencode" => "1"));
$this->AddUserDefinedEntity(BUYERINFO, "", $xml, $BI);
//PaymentInfo
$PI = $xml->add_node($root, PAYMENTINFO);
$PM = $xml->add_node($PI, PAYMENT);
$PD = $xml->add_node($PM, TX_PAYMETHOD, $this->m_REQUEST["paymethod"]);
$PD = $xml->add_node($PM, TX_JOINCARD, $this->m_REQUEST["joincard"]);
$PD = $xml->add_node($PM, TX_JOINEXPIRE, $this->m_REQUEST["joinexpire"]);
$PD = $xml->add_node($PM, TX_MAILORDER, $this->m_REQUEST["mailorder"]);
$PD = $xml->add_node($PM, TX_JOINCARD, $request_joincard);
$PD = $xml->add_node($PM, TX_JOINEXPIRE, $request_joinexpire);
$PD = $xml->add_node($PM, TX_MAILORDER, $request_mailorder);
if ($this->m_Type == TYPE_SECUREPAY) {
$PD = $xml->add_node($PM, TX_SESSIONKEY, $this->m_REQUEST["sessionkey"]);
$PD = $xml->add_node($PM, TX_ENCRYPTED, $this->m_REQUEST["encrypted"], array("urlencode" => "1"));
@ -841,30 +868,39 @@ class INIData {
}
//장바구니 기능 추가(2010.04.13) [END]
$this->AddUserDefinedEntity(OPENSUBINFO, "", $xml, $OI);
}
}
$node_mreserved1 = isset($this->m_REQUEST["mreserved1"]) ? $this->m_REQUEST["mreserved1"] : '';
$node_mreserved2 = isset($this->m_REQUEST["mreserved2"]) ? $this->m_REQUEST["mreserved2"] : '';
$node_mreserved3 = isset($this->m_REQUEST["mreserved3"]) ? $this->m_REQUEST["mreserved3"] : '';
$node_language = isset($this->m_REQUEST["language"]) ? $this->m_REQUEST["language"] : '';
$node_url = isset($this->m_REQUEST["url"]) ? $this->m_REQUEST["url"] : '';
$node_id_customer = isset($this->m_REQUEST["id_customer"]) ? $this->m_REQUEST["id_customer"] : '';
$node_id_regnum = isset($this->m_REQUEST["id_regnum"]) ? $this->m_REQUEST["id_regnum"] : '';
//ReservedInfo
$RI = $xml->add_node($root, RESERVEDINFO);
$RD = $xml->add_node($RI, TX_MRESERVED1, $this->m_REQUEST["mreserved1"]);
$RD = $xml->add_node($RI, TX_MRESERVED2, $this->m_REQUEST["mreserved2"]);
$RD = $xml->add_node($RI, TX_MRESERVED3, $this->m_REQUEST["mreserved3"]);
$RD = $xml->add_node($RI, TX_MRESERVED1, $node_mreserved1);
$RD = $xml->add_node($RI, TX_MRESERVED2, $node_mreserved2);
$RD = $xml->add_node($RI, TX_MRESERVED3, $node_mreserved3);
$this->AddUserDefinedEntity(RESERVEDINFO, "", $xml, $RI);
//ManageInfo
$MI = $xml->add_node($root, MANAGEINFO);
$MD = $xml->add_node($MI, TX_LANGUAGE, $this->m_REQUEST["language"]);
$MD = $xml->add_node($MI, TX_URL, $this->m_REQUEST["url"], array("urlencode" => "1"));
$MD = $xml->add_node($MI, TX_LANGUAGE, $node_language);
$MD = $xml->add_node($MI, TX_URL, $node_url, array("urlencode" => "1"));
$MD = $xml->add_node($MI, TX_TXVERSION, $this->m_TXVersion);
//delete UIP(2009.01.21)
//$MD = $xml->add_node($MI, TX_TXUSERIP, $this->m_REQUEST["uip"] );
$MD = $xml->add_node($MI, TX_TXUSERID, $this->m_REQUEST["id_customer"], array("urlencode" => "1"));
$MD = $xml->add_node($MI, TX_TXREGNUM, $this->m_REQUEST["id_regnum"]);
$MD = $xml->add_node($MI, TX_TXUSERID, $node_id_customer, array("urlencode" => "1"));
$MD = $xml->add_node($MI, TX_TXREGNUM, $node_id_regnum);
//Ack, rn
if ($this->m_Type == TYPE_SECUREPAY || $this->m_Type == TYPE_OCBSAVE ||
$this->m_Type == TYPE_FORMPAY || $this->m_Type == TYPE_RECEIPT
) {
$MD = $xml->add_node($MI, TX_ACK, "1");
if ($this->m_REQUEST["rn"] != "")
if (isset($this->m_REQUEST["rn"]) && $this->m_REQUEST["rn"])
$MD = $xml->add_node($MI, TX_RN, $this->m_REQUEST["rn"]);
}
$this->AddUserDefinedEntity(MANAGEINFO, "", $xml, $MI);
@ -908,7 +944,7 @@ class INIData {
$this->m_Xml = $xml->xml_node;
//GOODSINFO
$this->m_RESULT[NM_MOID] = $this->GetXMLData(MOID);
$this->m_RESULT[NM_MOID] = $this->GetXMLData('MOID');
//PAYMENTINFO
//기타지불수단이 paymethod를 주지 않아 임시로 요청 Paymethod로 대체
@ -916,13 +952,14 @@ class INIData {
$this->m_RESULT[NM_PAYMETHOD] = $this->m_sPayMethod;
$ResultCode = $this->GetXMLData("ResultCode");
//if( substr($ResultCode,2, 4) == "0000" )
if (strcmp(substr($ResultCode, 2, 4), "0000") == 0) {
$this->m_RESULT[NM_RESULTCODE] = "00";
$this->m_RESULT[NM_RESULTMSG] = $this->GetXMLData("ResultMsg");
} else {
$this->m_RESULT[NM_RESULTCODE] = "01";
$this->m_RESULT[NM_ERRORCODE] = $ResultCode;
$this->m_RESULT['NM_ERRORCODE'] = $ResultCode;
$this->m_RESULT[NM_RESULTMSG] = "[" . $ResultCode . "|" . $this->GetXMLData("ResultMsg") . "]";
}
$encrypted = $this->GetXMLData("Encrypted");
@ -1036,7 +1073,7 @@ class INIData {
function GTHR($err_code, $err_msg) {
//Set
$data["mid"] = $this->m_REQUEST["mid"];
$data["paymethod"] = $this->m_REQUEST["paymethod"];
$data["paymethod"] = isset($this->m_REQUEST["paymethod"]) ? $this->m_REQUEST["paymethod"] : '';
//delete UIP(2009.01.21)
//$data["user_ip"] = $this->m_REQUEST["uip"];
$data["tx_version"] = $this->m_TXVersion;
@ -1063,20 +1100,24 @@ class INIData {
}
function ParsePIEncrypted() {
parse_str($this->m_REQUEST["encrypted"]);
$this->m_PIPGPubSN = $CertVer;
$this->m_PG1 = $pg1;
$this->m_PG2 = $pg2;
$this->m_PG1IP = $pg1ip;
$this->m_PG2IP = $pg2ip;
$output = array();
if( isset($this->m_REQUEST["encrypted"]) ) {
parse_str($this->m_REQUEST["encrypted"], $output);
}
$this->m_PIPGPubSN = isset($output['CertVer']) ? $output['CertVer'] : '';
$this->m_PG1 = isset($output['pg1']) ? $output['pg1'] : '';
$this->m_PG2 = isset($output['pg2']) ? $output['pg2'] : '';
$this->m_PG1IP = isset($output['pg1ip']) ? $output['pg1ip'] : '';
$this->m_PG2IP = isset($output['pg2ip']) ? $output['pg2ip'] : '';
}
// Xpath로 안가져온다. 한달을 헛지랄 했다!!
// added by ddaemiri, 2007.09.03
function GetXMLData($node) {
$content = $this->m_Xml[$node . "[1]"]["text"];
if ($this->m_Xml[$node . "[1]"]["attr"]["urlencode"] == "1")
$content = isset($this->m_Xml[$node . "[1]"]["text"]) ? $this->m_Xml[$node . "[1]"]["text"] : '';
if (isset($this->m_Xml[$node . "[1]"]["attr"]["urlencode"]) && $this->m_Xml[$node . "[1]"]["attr"]["urlencode"] == "1")
$content = urldecode($content);
return $content;
}
@ -1101,7 +1142,7 @@ class INICrypto {
$this->homedir = $request["inipayhome"];
$this->mid = $request["mid"];
$this->admin = $request["admin"];
$this->mkey = $request["mkey"];
$this->mkey = isset($request["mkey"]) ? $request["mkey"] : '';
if(isset($request['encMethod']) && !empty($request['encMethod'])){
$this->encMethod = strtolower($request['encMethod']);
}
@ -1294,12 +1335,12 @@ class INICrypto {
function remove_ctrl($string) {
for ($i = 0; $i < strlen($string); $i++) {
$chr = $string{$i};
$chr = $string[$i];
$ord = ord($chr);
if ($ord < 10)
$string{$i} = " ";
$string[$i] = " ";
else
$string{$i} = $chr;
$string[$i] = $chr;
}
return trim($string);
}
@ -1310,7 +1351,7 @@ class INICrypto {
}
function pkcs5_unpad($text) {
$pad = ord($text{strlen($text) - 1});
$pad = ord($text[strlen($text) - 1]);
if ($pad > strlen($text))
return false;
if (strspn($text, chr($pad), strlen($text) - $pad) != $pad)
@ -1356,5 +1397,4 @@ class INICrypto {
return $cipher;
}
}
?>
}

View File

@ -75,7 +75,7 @@ define("PROGRAM", "INIPHP");
define("LANG", "PHP");
define("VERSION", "NV5053");
define("BUILDDATE", "20190404");
define("TID_LEN", 40);
if( ! defined('TID_LEN')) define("TID_LEN", 40);
define("MAX_KEY_LEN", 24);
define("MAX_IV_LEN", 8);
@ -135,7 +135,6 @@ define("TXPGPUBSN_LEN", 20);
define("CMD_LEN", 4);
define("MID_LEN", 10);
define("TOTPRICE_LEN", 20);
define("TID_LEN", 40);
//------------------------------------------------------
@ -671,5 +670,4 @@ define("NULL_ESCROWMSG_ERR", "TX6001");
define("NULL_FIELD_REFUNDACCTNUM", "TX9245");
define("NULL_FIELD_REFUNDBANKCODE", "TX9243");
define("NULL_FIELD_REFUNDACCTNAME", "TX9244");
?>
define("NULL_FIELD_REFUNDACCTNAME", "TX9244");

View File

@ -54,7 +54,7 @@ class INIpay50 {
/* -------------------------------------------------- */
function GetResult($name) { //Default Entity
$result = $this->m_RESULT[$name];
$result = isset($this->m_RESULT[$name]) ? $this->m_RESULT[$name] : '';
if ($result == "")
$result = $this->m_Data->GetXMLData($name);
if ($result == "")
@ -246,7 +246,7 @@ class INIpay50 {
if($this->m_type == TYPE_ESCROW && ($this->m_Data->m_EscrowType == TYPE_ESCROW_CNF || $this->m_Data->m_EscrowType == TYPE_ESCROW_DNY)) $is_plugin_escrow = TRUE;
if($this->m_REQUEST["pgn"] != "") {
if(isset($this->m_REQUEST["pgn"]) && $this->m_REQUEST["pgn"] != "") {
$host = $this->m_REQUEST["pgn"];
} else {
if ($this->m_type == TYPE_SECUREPAY || $is_plugin_escrow == TRUE) { //plugin
@ -732,6 +732,4 @@ class INIpay50 {
return;
}
}
?>
}

View File

@ -90,7 +90,8 @@ class INISocket {
$read = array($this->hnd);
$write = array($this->hnd);
$rtv = @socket_select($read, $write, $except = NULL, TIMEOUT_CONNECT);
$except = NULL;
$rtv = @socket_select($read, $write, $except, TIMEOUT_CONNECT);
if ($rtv == 0) { //TIMEOUT
$this->error();
socket_close($this->hnd);
@ -125,8 +126,10 @@ class INISocket {
}
$vWrite = array($this->hnd);
$vRead = null;
$vExcept = null;
while (($rtv = @socket_select($vRead = null, $vWrite, $vExcept = null, TIMEOUT_WRITE)) === FALSE);
while (($rtv = @socket_select($vRead, $vWrite, $vExcept, TIMEOUT_WRITE)) === FALSE);
if ($rtv == 0) {
$this->error();
@ -157,7 +160,10 @@ class INISocket {
$read = array($this->hnd);
$buf = null;
while ($nleft > 0) {
$rtv = @socket_select($read, $write = NULL, $except = NULL, TIMEOUT_READ);
$write = null;
$except = null;
$rtv = @socket_select($read, $write, $except, TIMEOUT_READ);
if ($rtv == 0) {
$this->error();
return SOCK_TIMEO_ERR;
@ -217,6 +223,4 @@ class INISocket {
return $this->sSocErr;
}
}
?>
}

View File

@ -17,7 +17,7 @@ class INIStdPayUtil {
$milliseconds = round(microtime(true) * 1000);
$tempValue1 = round($milliseconds / 1000); //max integer 자릿수가 9이므로 뒤 3자리를 뺀다
$tempValue2 = round(microtime(false) * 1000); //뒤 3자리를 저장
$tempValue2 = round((float) microtime(false) * 1000); //뒤 3자리를 저장
switch (strlen($tempValue2)) {
case '3':
break;
@ -121,5 +121,4 @@ class INIStdPayUtil {
return $signature;
}
}
?>
}

View File

@ -209,12 +209,12 @@ class XML {
*/
function remove_ctrl($string) {
for ($i = 0; $i < strlen($string); $i++) {
$chr = $string{$i};
$chr = $string[$i];
$ord = ord($chr);
if ($ord < 10)
$string{$i} = " ";
$string[$i] = " ";
else
$string{$i} = $chr;
$string[$i] = $chr;
}
return trim($string);
}
@ -333,11 +333,12 @@ class XML {
// Now open the tag.
$xml .= "<" . $this->nodes[$root]["name"];
$count_root_attributes = (isset($this->nodes[$root]["attributes"]) && is_array($this->nodes[$root]["attributes"])) ? count($this->nodes[$root]["attributes"]) : 0;
// Check whether there are attributes for this node.
if (count($this->nodes[$root]["attributes"]) > 0) {
if ($count_root_attributes > 0) {
// Run through all attributes.
foreach ($this->nodes[$root]["attributes"] as $key => $value) {
foreach ((array) $this->nodes[$root]["attributes"] as $key => $value) {
// Check whether this attribute is highlighted.
if (in_array($root . "/attribute::" . $key, $highlight)) {
// Add the highlight code to the XML data.
@ -450,7 +451,9 @@ class XML {
$path = $context . "/" . $name;
// Set the relative context and the position.
$position = ++$this->ids[$path];
$othis_ids_path = isset($this->ids[$path]) ? (int) $this->ids[$path] : 0;
$position = ++$othis_ids_path;
$relative = $name . "[" . $position . "]";
// Calculate the full path.
@ -462,7 +465,8 @@ class XML {
// Calculate the position for the following and preceding axis
// detection.
$this->nodes[$fullpath]["document-position"] = $this->nodes[$context]["document-position"] + 1;
$othis_document_position = isset($this->nodes[$context]["document-position"]) ? (int) $this->nodes[$context]["document-position"] : 0;
$this->nodes[$fullpath]["document-position"] = $othis_document_position + 1;
// Save the information about the node.
$this->nodes[$fullpath]["name"] = $name;
@ -470,7 +474,7 @@ class XML {
$this->nodes[$fullpath]["parent"] = $context;
// Add this element to the element count array.
if (!$this->nodes[$context]["children"][$name]) {
if (! (isset($this->nodes[$context]["children"][$name]) && $this->nodes[$context]["children"][$name])) {
// Set the default name.
$this->nodes[$context]["children"][$name] = 1;
} else {
@ -907,7 +911,8 @@ class XML {
$arr = preg_split("/[\/]+/", $this->path, -1, PREG_SPLIT_NO_EMPTY);
//edited by ddaemiri. libexpat은 \n을 분리자로 인식
//$this->xml_node[$arr[count($arr)-1]]["text"] = addslashes(trim($text));
$this->xml_node[$arr[count($arr) - 1]]["text"] = $this->xml_node[$arr[count($arr) - 1]]["text"] . addslashes(trim($text));
$othis_count_text = isset($this->xml_node[$arr[count($arr) - 1]]["text"]) ? $this->xml_node[$arr[count($arr) - 1]]["text"] : '';
$this->xml_node[$arr[count($arr) - 1]]["text"] = $othis_count_text . addslashes(trim($text));
}
/**
@ -3132,6 +3137,4 @@ class XML {
return $a[$attr];
}
}
?>
}

View File

@ -11,5 +11,4 @@ $output['signature'] = array(
'signature' => hash("sha256", $input)
);
echo json_encode($output);
?>
echo json_encode($output);

View File

@ -801,6 +801,4 @@ if (class_exists('PEAR_Error')) {
}
}
}
?>
}

View File

@ -25,6 +25,4 @@ if (!function_exists('json_encode')) {
$json = new Services_JSON;
return $json->encode($content);
}
}
?>
}

View File

@ -409,6 +409,4 @@ if (!function_exists('hash'))
return $algo($data);
}
}
}
?>
}

View File

@ -6,5 +6,4 @@ if( ! ($default['de_inicis_lpay_use'] || $default['de_inicis_kakaopay_use']) ||
return;
}
include_once(G5_SHOP_PATH.'/settle_inicis.inc.php');
?>
include_once(G5_SHOP_PATH.'/settle_inicis.inc.php');

View File

@ -29,5 +29,4 @@ $mKey = hash("sha256", $signKey);
$params = "oid=" . $orderNumber . "&price=" . $price . "&timestamp=" . $timestamp;
$sign = hash("sha256", $params);
die(json_encode(array('error'=>'', 'mKey'=>$mKey, 'timestamp'=>$timestamp, 'sign'=>$sign)));
?>
die(json_encode(array('error'=>'', 'mKey'=>$mKey, 'timestamp'=>$timestamp, 'sign'=>$sign)));

View File

@ -39,4 +39,4 @@ function paybtn(f) {
INIStdPay.pay(f.id);
}
</script>
<?php } ?>
<?php }

View File

@ -76,4 +76,4 @@ no_receipt : 은행계좌이체시 현금영수증 발행여부 체크박스 비
<?php if($default['de_tax_flag_use']) { ?>
<input type="hidden" name="tax" value="<?php echo $comm_vat_mny; ?>">
<input type="hidden" name="taxfree" value="<?php echo $comm_free_mny; ?>">
<?php } ?>
<?php }

View File

@ -1,3 +1,2 @@
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가;

View File

@ -75,5 +75,4 @@ $inipay->startAction();
sql_query($sql);
} else {
alert(iconv_utf8($inipay->GetResult("ResultMsg")).' 코드 : '.$inipay->GetResult("ResultCode"));
}
?>
}

View File

@ -12,6 +12,8 @@ include_once(G5_SHOP_PATH.'/settle_inicis.inc.php');
* Copyright (C) 2006 Inicis, Co. All rights reserved.
*/
$companynumber = isset($_REQUEST['companynumber']) ? clean_xss_tags($_REQUEST['companynumber'], 1, 1) : '';
if($tx == 'personalpay') {
$od = sql_fetch(" select * from {$g5['g5_shop_personalpay_table']} where pp_id = '$od_id' ");
if (!$od)
@ -189,5 +191,4 @@ function showreceipt() // 현금 영수증 출력
</div>
<?php
include_once(G5_PATH.'/tail.sub.php');
?>
include_once(G5_PATH.'/tail.sub.php');