$c_PayPlus->mf_clear(); /* ------------------------------------------------------------------------------ */ /* = 02. 인스턴스 생성 및 초기화 END = */ /* ============================================================================== */ /* ============================================================================== */ /* = 03. 처리 요청 정보 설정 = */ /* = -------------------------------------------------------------------------- = */ /* = -------------------------------------------------------------------------- = */ /* = 03-1. 승인 요청 = */ /* = -------------------------------------------------------------------------- = */ if ($req_tx == "pay") { $c_PayPlus->mf_set_encx_data($_POST["enc_data"], $_POST["enc_info"]); } else { if ($req_tx == "mod") { $tran_cd = "00200000"; $c_PayPlus->mf_set_modx_data("tno", $tno); // KCP 원거래 거래번호 $c_PayPlus->mf_set_modx_data("mod_type", $mod_type); // 원거래 변경 요청 종류 $c_PayPlus->mf_set_modx_data("mod_ip", $cust_ip); // 변경 요청자 IP $c_PayPlus->mf_set_modx_data("mod_desc", $mod_desc); // 변경 사유 } } /* ------------------------------------------------------------------------------ */ /* = 03. 처리 요청 정보 설정 END = */ /* ============================================================================== */ /* ============================================================================== */ /* = 04. 실행 = */ /* = -------------------------------------------------------------------------- = */
} // 개별 페이지 접근 불가 if ($od['od_pg'] != 'kcp') { return; } include_once G5_SHOP_PATH . '/settle_kcp.inc.php'; include_once G5_SHOP_PATH . '/kcp/pp_ax_hub_lib.php'; // locale ko_KR.euc-kr 로 설정 setlocale(LC_CTYPE, 'ko_KR.euc-kr'); $req_tx = 'mod_escrow'; $mod_type = 'STE1'; $mod_desc = '에스크로 배송시작 등록'; $cust_ip = getenv('REMOTE_ADDR'); $c_PayPlus = new C_PP_CLI_T(); $c_PayPlus->mf_clear(); $tran_cd = "00200000"; // 에스크로 상태변경 $c_PayPlus->mf_set_modx_data("tno", $escrow_tno); $c_PayPlus->mf_set_modx_data("mod_type", $mod_type); $c_PayPlus->mf_set_modx_data("mod_ip", $cust_ip); $c_PayPlus->mf_set_modx_data("mod_desc", $mod_desc); $c_PayPlus->mf_set_modx_data("deli_numb", $escrow_numb); $c_PayPlus->mf_set_modx_data("deli_corp", $escrow_corp); $c_PayPlus->mf_do_tx($trace_no, $g_conf_home_dir, $g_conf_site_cd, $g_conf_site_key, $tran_cd, "", $g_conf_gw_url, $g_conf_gw_port, "payplus_cli_slib", $ordr_idxx, $cust_ip, "3", 0, 0, $g_conf_key_dir, $g_conf_log_dir); // 응답 전문 처리 $res_cd = $c_PayPlus->m_res_cd; // 결과 코드 $res_msg = $c_PayPlus->m_res_msg; // 결과 메시지 // locale 설정 초기화 setlocale(LC_CTYPE, '');
$g_conf_home_dir = G5_SHOP_PATH . '/kcp'; $g_conf_key_dir = ''; if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { $g_conf_log_dir = G5_SHOP_PATH . '/kcp/log'; $g_conf_key_dir = G5_SHOP_PATH . '/kcp/bin/pub.key'; } $g_conf_site_cd = $default['de_kcp_mid']; if (preg_match("/^T000/", $g_conf_site_cd) || $default['de_card_test']) { $g_conf_gw_url = "testpaygw.kcp.co.kr"; } else { $g_conf_gw_url = "paygw.kcp.co.kr"; } $cancel_msg = iconv_euckr('쇼핑몰 운영자 승인 취소'); $cust_ip = $_SERVER['REMOTE_ADDR']; $bSucc_mod_type = "STSC"; $c_PayPlus->mf_set_modx_data("tno", $tno); // KCP 원거래 거래번호 $c_PayPlus->mf_set_modx_data("mod_type", $bSucc_mod_type); // 원거래 변경 요청 종류 $c_PayPlus->mf_set_modx_data("mod_ip", $cust_ip); // 변경 요청자 IP $c_PayPlus->mf_set_modx_data("mod_desc", $cancel_msg); // 변경 사유 $c_PayPlus->mf_do_tx($tno, $g_conf_home_dir, $g_conf_site_cd, $g_conf_site_key, $tran_cd, "", $g_conf_gw_url, $g_conf_gw_port, "payplus_cli_slib", $ordr_idxx, $cust_ip, "3", 0, 0, $g_conf_key_dir, $g_conf_log_dir); $res_cd = $c_PayPlus->m_res_cd; $res_msg = $c_PayPlus->m_res_msg; if ($res_cd != '0000') { $pg_res_cd = $res_cd; $pg_res_msg = iconv_utf8($res_msg); } // locale 설정 초기화
/* = 02. 인스턴스 생성 및 초기화 END = */ /* ============================================================================== */ /* ============================================================================== */ /* = 03. 처리 요청 정보 설정 = */ /* = -------------------------------------------------------------------------- = */ /* = -------------------------------------------------------------------------- = */ /* = 03-1. 승인 요청 = */ /* = -------------------------------------------------------------------------- = */ if ($req_tx == "pay") { /* 1004원은 실제로 업체에서 결제하셔야 될 원 금액을 넣어주셔야 합니다. 결제금액 유효성 검증 */ $c_PayPlus->mf_set_ordr_data("ordr_mony", $good_mny); $c_PayPlus->mf_set_encx_data($_POST["enc_data"], $_POST["enc_info"]); } else { if ($req_tx == "mod") { $tran_cd = "00200000"; $c_PayPlus->mf_set_modx_data("tno", $tno); // KCP 원거래 거래번호 $c_PayPlus->mf_set_modx_data("mod_type", $mod_type); // 원거래 변경 요청 종류 $c_PayPlus->mf_set_modx_data("mod_ip", $cust_ip); // 변경 요청자 IP $c_PayPlus->mf_set_modx_data("mod_desc", $mod_desc); // 변경 사유 } else { if ($req_tx = "mod_escrow") { $tran_cd = "00200000"; $c_PayPlus->mf_set_modx_data("tno", $tno); // KCP 원거래 거래번호 $c_PayPlus->mf_set_modx_data("mod_type", $mod_type); // 원거래 변경 요청 종류 $c_PayPlus->mf_set_modx_data("mod_ip", $cust_ip);