security: KVE-2026-2140 주문 보호와 5.6.39 보안 업데이트 배포
This commit is contained in:
1 parent
2517343d51
commit
f7aa440a80
43 files changed
+1510
-328
No files matched your search
@@ -63,7 +63,7 @@
|
||||
+ "&pay_method=" + form.pay_method.value
|
||||
+ "&escw_used=" + form.escw_used.value
|
||||
+ "&good_name=" + form.good_name.value
|
||||
+ "&Ret_URL=" + form.Ret_URL.value;
|
||||
+ "&Ret_URL=" + encodeURIComponent(form.Ret_URL.value);
|
||||
sendRequest( url + params );
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
include_once(G5_LIB_PATH.'/shop_order_access.lib.php');
|
||||
$access_order_id = isset($_POST['ordr_idxx']) ? $_POST['ordr_idxx'] : '';
|
||||
$data = shop_order_access_load($access_order_id, 'kcp');
|
||||
|
||||
@header('Cache-Control: no-cache, no-store, must-revalidate'); // HTTP 1.1.
|
||||
@header('Pragma: no-cache'); // HTTP 1.0.
|
||||
@@ -235,12 +238,7 @@ include_once('./_common.php');
|
||||
<?php
|
||||
if($enc_data != '' && $enc_info != '' && $tran_cd != '') {
|
||||
// 제외할 필드
|
||||
$exclude = array('req_tx', 'res_cd', 'tran_cd', 'ordr_idxx', 'good_mny', 'good_name', 'buyr_name', 'buyr_tel1', 'buyr_tel2', 'buyr_mail', 'enc_info', 'enc_data', 'use_pay_method', 'rcvr_name', 'rcvr_tel1', 'rcvr_tel2', 'rcvr_mail', 'rcvr_zipx', 'rcvr_add1', 'rcvr_add2', 'param_opt_1', 'param_opt_2', 'param_opt_3');
|
||||
|
||||
$sql = " select * from {$g5['g5_shop_order_data_table']} where od_id = '$ordr_idxx' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
$data = isset($row['dt_data']) ? unserialize(base64_decode($row['dt_data'])) : array();
|
||||
$exclude = array('req_tx', 'res_cd', 'tran_cd', 'ordr_idxx', 'good_mny', 'good_name', 'buyr_name', 'buyr_tel1', 'buyr_tel2', 'buyr_mail', 'enc_info', 'enc_data', 'use_pay_method', 'rcvr_name', 'rcvr_tel1', 'rcvr_tel2', 'rcvr_mail', 'rcvr_zipx', 'rcvr_add1', 'rcvr_add2', 'param_opt_1', 'param_opt_2', 'param_opt_3', 'site_cd');
|
||||
|
||||
if(isset($data['pp_id']) && $data['pp_id']) {
|
||||
$order_action_url = G5_HTTPS_MSHOP_URL.'/personalpayformupdate.php';
|
||||
@@ -253,6 +251,7 @@ if($enc_data != '' && $enc_info != '' && $tran_cd != '') {
|
||||
echo make_order_field($data, $exclude);
|
||||
|
||||
foreach($_POST as $key=>$value) {
|
||||
if (!in_array($key, $exclude, true) || !is_string($value)) continue;
|
||||
echo '<input type="hidden" name="'.get_text($key).'" value="'.get_text($value).'">'.PHP_EOL;
|
||||
}
|
||||
|
||||
@@ -309,7 +308,7 @@ if($enc_data != '' && $enc_info != '' && $tran_cd != '') {
|
||||
<input type="hidden" name="approval_key" id="approval">
|
||||
<!-- 리턴 URL (kcp와 통신후 결제를 요청할 수 있는 암호화 데이터를 전송 받을 가맹점의 주문페이지 URL) -->
|
||||
<!-- 반드시 가맹점 주문페이지의 URL을 입력 해주시기 바랍니다. -->
|
||||
<input type="hidden" name="Ret_URL" value="<?php echo G5_MSHOP_URL; ?>/kcp/order_approval_form.php">
|
||||
<input type="hidden" name="Ret_URL" value="<?php echo G5_MSHOP_URL; ?>/kcp/order_approval_form.php?g5_order_state=<?php echo get_text($data['g5_order_state']); ?>">
|
||||
<!-- 인증시 필요한 파라미터(변경불가)-->
|
||||
<input type="hidden" name="ActionResult" value="<?php echo get_text($ActionResult); ?>">
|
||||
<!-- 에스크로 사용유무 에스크로 사용 업체(가상계좌만 해당)는 Y로 세팅 해주시기 바랍니다.-->
|
||||
|
||||
@@ -1,5 +1,32 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
include_once(G5_LIB_PATH.'/shop_order_access.lib.php');
|
||||
$access_order_id = isset($_POST['ordr_idxx']) ? $_POST['ordr_idxx'] : '';
|
||||
$access_data = shop_order_access_load($access_order_id, 'kcp');
|
||||
$access_personal = !empty($access_data['pp_id']);
|
||||
if ($access_personal !== !empty($_POST['pp_id']) ||
|
||||
($access_personal && (string)$_POST['pp_id'] !== $access_order_id)) shop_order_access_fail();
|
||||
|
||||
// 최종 계산 금액을 검증한 뒤 승인 기록을 원자적으로 확보한다.
|
||||
$kcp_expected = $access_personal ? (int)$pp['pp_price'] : (int)$order_price;
|
||||
if ($kcp_expected <= 0 || !isset($_POST['req_tx'], $_POST['good_mny'], $_POST['enc_data'], $_POST['enc_info']) ||
|
||||
$_POST['req_tx'] !== 'pay' || !is_string($_POST['good_mny']) || !ctype_digit($_POST['good_mny']) ||
|
||||
(int)$_POST['good_mny'] !== $kcp_expected || !is_string($_POST['enc_data']) || !is_string($_POST['enc_info']) ||
|
||||
$_POST['enc_data'] === '' || $_POST['enc_info'] === '') shop_order_access_fail();
|
||||
$kcp_request_key = 'kcp:'.hash('sha256', $_POST['enc_data']."\0".$_POST['enc_info']);
|
||||
$kcp_state = shop_order_state_begin($access_order_id, $kcp_request_key, $kcp_expected);
|
||||
if ($kcp_state['status'] === 'approved') {
|
||||
$kcp_cached = json_decode($kcp_state['response_json'], true);
|
||||
$kcp_cached = isset($kcp_cached['payload']) ? shop_order_decode_data($kcp_cached['payload']) : false;
|
||||
if (!is_array($kcp_cached) || (int)$kcp_cached['amount'] !== $kcp_expected) shop_order_access_fail();
|
||||
foreach (shop_order_kcp_result_fields() as $kcp_field) {
|
||||
if (isset($kcp_cached[$kcp_field])) $$kcp_field = $kcp_cached[$kcp_field];
|
||||
}
|
||||
return;
|
||||
}
|
||||
// KCP 통신 도중 프로세스가 끊긴 거래는 운영 대조 전 재승인하지 않는다.
|
||||
if ($kcp_state['status'] !== 'pending') shop_order_access_fail();
|
||||
|
||||
/* ============================================================================== */
|
||||
/* = PAGE : 지불 요청 및 결과 처리 PAGE = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
@@ -304,4 +331,10 @@
|
||||
}
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 05. 승인 결과 처리 END = */
|
||||
/* ============================================================================== */;
|
||||
/* ============================================================================== */;
|
||||
if (empty($tno) || (int)$amount !== $kcp_expected) shop_order_access_fail();
|
||||
$kcp_snapshot = array();
|
||||
foreach (shop_order_kcp_result_fields() as $kcp_field) {
|
||||
if (isset($$kcp_field)) $kcp_snapshot[$kcp_field] = $$kcp_field;
|
||||
}
|
||||
shop_order_state_approved($access_order_id, array('payload'=>base64_encode(serialize($kcp_snapshot))));
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
include_once(G5_LIB_PATH.'/shop_order_access.lib.php');
|
||||
|
||||
require_once(G5_MSHOP_PATH.'/settle_'.$default['de_pg_service'].'.inc.php');
|
||||
|
||||
@@ -277,7 +278,9 @@ if(function_exists('is_use_easypay') && is_use_easypay('global_nhnkcp')){ //
|
||||
</div>
|
||||
|
||||
<div id="sod_frm" class="sod_frm_mobile">
|
||||
<script src="<?php echo G5_JS_URL; ?>/shop.order-state.js"></script>
|
||||
<form name="forderform" method="post" action="<?php echo $order_action_url; ?>" autocomplete="off">
|
||||
<?php echo shop_order_checkout_fields((string)$od_id, false); ?>
|
||||
<input type="hidden" name="od_price" value="<?php echo $tot_sell_price; ?>">
|
||||
<input type="hidden" name="org_od_price" value="<?php echo $tot_sell_price; ?>">
|
||||
<input type="hidden" name="od_send_cost" value="<?php echo $send_cost; ?>">
|
||||
@@ -1333,14 +1336,14 @@ function pay_approval()
|
||||
|
||||
<?php if($default['de_escrow_use']) { ?>
|
||||
f.cardUseEscrow.value = 'true';
|
||||
f.escrowProducts.value = JSON.stringify(<?php echo json_encode($escrow_products, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); ?>);
|
||||
f.escrowProducts.value = JSON.stringify(<?php echo json_encode($escrow_products); ?>);
|
||||
<?php } ?>
|
||||
|
||||
f.cardflowMode.value = 'DEFAULT';
|
||||
f.cardeasyPay.value = '';
|
||||
if(settle_method == "간편결제") {
|
||||
var provider = $("input[name=od_settle_case]:checked").attr("data-pay");
|
||||
var providers = <?php echo json_encode(array_values(array_map(function ($provider) { return $provider[1]; }, shop_easypay_catalog('toss')))); ?>;
|
||||
var providers = <?php echo json_encode(shop_order_toss_providers()); ?>;
|
||||
if (providers.indexOf(provider) === -1) {
|
||||
alert('간편결제 수단을 다시 선택해 주세요.');
|
||||
return false;
|
||||
@@ -1500,16 +1503,22 @@ function pay_approval()
|
||||
<?php } ?>
|
||||
|
||||
// 주문 정보 임시저장
|
||||
var order_data = $(pf).serialize();
|
||||
var save_result = "";
|
||||
<?php if ($default['de_pg_service'] == 'toss') { ?>
|
||||
// 복귀 페이지에서 요청값으로 덮어쓰지 않도록 PG 필드를 임시 저장 전에 동기화한다.
|
||||
$(f).serializeArray().forEach(function(field) {
|
||||
if (pf.elements[field.name]) pf.elements[field.name].value = field.value;
|
||||
});
|
||||
<?php } ?>
|
||||
var order_data = $(pf).serialize();
|
||||
var save_result = "결제 요청을 저장하지 못했습니다.";
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: order_data,
|
||||
url: g5_url+"/shop/ajax.orderdatasave.php",
|
||||
cache: false,
|
||||
async: false,
|
||||
success: function(data) {
|
||||
save_result = data;
|
||||
success: function(data, textStatus, xhr) {
|
||||
save_result = data || g5_order_state_accept(xhr);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
include_once(G5_LIB_PATH.'/shop_order_access.lib.php');
|
||||
shop_order_state_prepare(false);
|
||||
// PG 호출 전에 저장된 비회원 비밀번호 해시의 주문 소유권을 확인한다.
|
||||
$saved_order_password = ($is_member || $od_settle_case === '무통장') ? null : shop_order_access_password((string)get_session('ss_order_id'));
|
||||
|
||||
|
||||
// 구 주문서나 직접 POST로도 SIRK 전용 결제를 다시 시작하지 않는다.
|
||||
if (isset($od_settle_case) && $od_settle_case === 'KAKAOPAY') {
|
||||
@@ -592,8 +597,8 @@ if($tno) {
|
||||
if ($is_member) {
|
||||
$od_pwd = $member['mb_password'];
|
||||
} else {
|
||||
$post_od_pwd = isset($_POST['od_pwd']) ? $_POST['od_pwd'] : sha1(rand());
|
||||
$od_pwd = get_encrypt_string($_POST['od_pwd']);
|
||||
$od_pwd = $saved_order_password !== null ? $saved_order_password :
|
||||
get_encrypt_string(isset($_POST['od_pwd']) ? $_POST['od_pwd'] : bin2hex(random_bytes(16)));
|
||||
}
|
||||
|
||||
// 주문번호를 얻는다.
|
||||
@@ -700,6 +705,7 @@ $sql = " insert {$g5['g5_shop_order_table']}
|
||||
od_cash_info = '{$pg_receipt_infos['od_cash_info']}',
|
||||
od_test = '{$default['de_card_test']}'
|
||||
";
|
||||
shop_order_state_finalizing();
|
||||
$result = sql_query($sql, false);
|
||||
|
||||
// 정말로 insert 가 되었는지 한번더 체크한다.
|
||||
@@ -717,9 +723,9 @@ if(! $result && (isset($exists_order['od_id']) && $od_id && $exists_order['od_id
|
||||
// 주문정보 입력 오류시 결제 취소
|
||||
if(! $result || ! (isset($exists_order['od_id']) && $od_id && $exists_order['od_id'] === $od_id)) {
|
||||
if($tno) {
|
||||
$cancel_msg = '주문정보 입력 오류';
|
||||
include G5_SHOP_PATH.'/cancel_pg.inc.php';
|
||||
}
|
||||
$cancel_msg = '주문정보 입력 오류';
|
||||
include G5_SHOP_PATH.'/cancel_pg.inc.php';
|
||||
}
|
||||
|
||||
// 관리자에게 오류 알림 메일발송
|
||||
$error = 'order';
|
||||
@@ -1053,6 +1059,7 @@ if( $od_pg == 'inicis' && $od_tno && empty($_POST['inicis_pro']) ){
|
||||
if(function_exists('add_order_post_log')) add_order_post_log('', 'delete');
|
||||
|
||||
// 주문번호제거
|
||||
shop_order_access_forget((string)$od_id);
|
||||
set_session('ss_order_id', '');
|
||||
|
||||
// 기존자료 세션에서 제거
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
include_once(G5_LIB_PATH.'/shop_order_access.lib.php');
|
||||
|
||||
require_once(G5_MSHOP_PATH.'/settle_'.$default['de_pg_service'].'.inc.php');
|
||||
|
||||
@@ -14,7 +15,9 @@ $tablet_size = "1.0"; // 화면 사이즈 조정 - 기기화면에 맞게 수정
|
||||
</div>
|
||||
|
||||
<div id="m_pv_sod_frm">
|
||||
<script src="<?php echo G5_JS_URL; ?>/shop.order-state.js"></script>
|
||||
<form name="forderform" method="post" action="<?php echo $order_action_url; ?>" autocomplete="off">
|
||||
<?php echo shop_order_checkout_fields((string)$pp['pp_id'], true); ?>
|
||||
<input type="hidden" name="pp_id" value="<?php echo $pp['pp_id']; ?>">
|
||||
<section id="m_sod_frm_orderer">
|
||||
<h2>개인결제정보</h2>
|
||||
@@ -311,16 +314,22 @@ function pay_approval()
|
||||
//f.target = "tar_opener";
|
||||
|
||||
// 주문 정보 임시저장
|
||||
var order_data = $(pf).serialize();
|
||||
var save_result = "";
|
||||
<?php if ($default['de_pg_service'] == 'toss') { ?>
|
||||
// 복귀 페이지에서 요청값으로 덮어쓰지 않도록 PG 필드를 임시 저장 전에 동기화한다.
|
||||
$(f).serializeArray().forEach(function(field) {
|
||||
if (pf.elements[field.name]) pf.elements[field.name].value = field.value;
|
||||
});
|
||||
<?php } ?>
|
||||
var order_data = $(pf).serialize();
|
||||
var save_result = "결제 요청을 저장하지 못했습니다.";
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: order_data,
|
||||
url: g5_url+"/shop/ajax.orderdatasave.php",
|
||||
cache: false,
|
||||
async: false,
|
||||
success: function(data) {
|
||||
save_result = data;
|
||||
success: function(data, textStatus, xhr) {
|
||||
save_result = data || g5_order_state_accept(xhr);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
include_once(G5_LIB_PATH.'/shop_order_access.lib.php');
|
||||
shop_order_state_prepare(true);
|
||||
include_once(G5_LIB_PATH.'/mailer.lib.php');
|
||||
|
||||
$page_return_url = G5_SHOP_URL.'/personalpayform.php?pp_id='.get_session('ss_personalpay_id');
|
||||
@@ -233,6 +235,7 @@ $sql = " update {$g5['g5_shop_personalpay_table']}
|
||||
pp_cash_no = '{$pg_receipt_infos['od_cash_no']}',
|
||||
pp_cash_info = '{$pg_receipt_infos['od_cash_info']}'
|
||||
where pp_id = '{$pp['pp_id']}' ";
|
||||
shop_order_state_finalizing();
|
||||
$result = sql_query($sql, false);
|
||||
|
||||
// 결제정보 입력 오류시 결제 취소
|
||||
@@ -343,6 +346,8 @@ $sql = " delete from {$g5['g5_shop_order_data_table']} where od_id = '{$pp['pp_i
|
||||
sql_query($sql);
|
||||
|
||||
// 개인결제번호제거
|
||||
include_once(G5_LIB_PATH.'/shop_order_access.lib.php');
|
||||
shop_order_access_forget((string)$pp['pp_id']);
|
||||
set_session('ss_personalpay_id', '');
|
||||
set_session('ss_personalpay_hash', '');
|
||||
|
||||
|
||||
@@ -1,46 +1,20 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
// 결제 실패 처리인 경우
|
||||
if (isset($_REQUEST['mode']) && $_REQUEST['mode'] === 'fail') {
|
||||
$code = isset($_REQUEST['code']) ? trim($_REQUEST['code']) : '';
|
||||
$message = isset($_REQUEST['message']) ? trim($_REQUEST['message']) : '';
|
||||
include_once(G5_LIB_PATH.'/shop_order_access.lib.php');
|
||||
header('Cache-Control: no-store, private');
|
||||
header('Referrer-Policy: no-referrer');
|
||||
|
||||
alert('결제에 실패하였습니다.\\n\\n[' . $code . '] ' . $message, G5_SHOP_URL . '/orderform.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
if(!isset($_SESSION['PAYREQ_MAP'])){
|
||||
alert('세션이 만료 되었거나 유효하지 않은 요청 입니다.', G5_MSHOP_URL);
|
||||
}
|
||||
|
||||
$payReqMap = $_SESSION['PAYREQ_MAP']; //결제 요청시, Session에 저장했던 파라미터 MAP
|
||||
if (isset($_REQUEST['mode']) && $_REQUEST['mode'] === 'fail') shop_order_state_abort_pending();
|
||||
$orderId = isset($_REQUEST['orderId']) ? $_REQUEST['orderId'] : '';
|
||||
$paymentKey = isset($_REQUEST['paymentKey']) ? $_REQUEST['paymentKey'] : '';
|
||||
$amount = isset($_REQUEST['amount']) ? $_REQUEST['amount'] : '';
|
||||
$data = shop_order_access_payment($orderId, $paymentKey, $amount);
|
||||
|
||||
$g5['title'] = '토스페이먼츠 결제인증 완료처리';
|
||||
$g5['body_script'] = ' onload="setTossResult();"';
|
||||
include_once(G5_PATH.'/head.sub.php');
|
||||
|
||||
// 토스페이먼츠 결제인증 성공시 인증키 주문 임시데이터에 업데이트
|
||||
$paymentKey = isset($_REQUEST['paymentKey']) ? trim($_REQUEST['paymentKey']) : '';
|
||||
$orderId = isset($_REQUEST['orderId']) ? trim($_REQUEST['orderId']) : '';
|
||||
$amount = isset($_REQUEST['amount']) ? trim($_REQUEST['amount']) : '';
|
||||
|
||||
if (empty($paymentKey) || empty($orderId)) {
|
||||
alert('결제정보가 올바르지 않습니다.', G5_MSHOP_URL);
|
||||
exit;
|
||||
}
|
||||
|
||||
$sql = " select * from {$g5['g5_shop_order_data_table']} where od_id = '$orderId' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
$data = isset($row['dt_data']) ? unserialize(base64_decode($row['dt_data'])) : array();
|
||||
|
||||
// 주문 임시데이터에 paymentKey 업데이트
|
||||
$data['paymentKey'] = $paymentKey;
|
||||
$data_new = base64_encode(serialize($data));
|
||||
$sql = " update {$g5['g5_shop_order_data_table']} set dt_data = '$data_new' where od_id = '$orderId' limit 1 ";
|
||||
sql_query($sql);
|
||||
|
||||
if(isset($data['pp_id']) && $data['pp_id']) {
|
||||
$order_action_url = G5_HTTPS_MSHOP_URL.'/personalpayformupdate.php';
|
||||
} else {
|
||||
|
||||
@@ -1,53 +1,9 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
// 토스페이먼츠 class
|
||||
require_once(G5_SHOP_PATH.'/toss/toss.inc.php');
|
||||
|
||||
// 개인결제 ID와 주문 ID 설정
|
||||
$ss_order_id = isset($_REQUEST['orderId']) ? $_REQUEST['orderId'] : '';
|
||||
$ss_personalpay_id = get_session('ss_personalpay_id');
|
||||
|
||||
// 장바구니 ID 설정 (바로구매 여부 확인)
|
||||
$ss_cart_id = get_session('ss_direct') ? get_session('ss_cart_direct') : get_session('ss_cart_id');
|
||||
|
||||
// WHERE 조건 추가용 변수
|
||||
$addQuery = "";
|
||||
if (!empty($ss_order_id)) {
|
||||
$addQuery .= " AND od_id = '{$ss_order_id}'";
|
||||
}
|
||||
if (isset($member['mb_id']) && $member['mb_id'] !== '') {
|
||||
$addQuery .= " AND mb_id = '{$member['mb_id']}'";
|
||||
}
|
||||
|
||||
// 개인결제가 아닌 경우 장바구니 ID 조건 추가
|
||||
if (empty($ss_personalpay_id)) {
|
||||
if (!empty($ss_cart_id)) {
|
||||
$addQuery .= " AND cart_id = '{$ss_cart_id}'";
|
||||
}
|
||||
}
|
||||
|
||||
// 최종 검증 (원래 로직 유지)
|
||||
if (empty($ss_order_id) || (empty($ss_personalpay_id) && empty($ss_cart_id))) {
|
||||
alert('주문정보가 올바르지 않습니다.');
|
||||
exit;
|
||||
}
|
||||
|
||||
// 기존 dt_data 가져오기
|
||||
$sql = "
|
||||
SELECT * FROM {$g5['g5_shop_order_data_table']}
|
||||
WHERE 1=1
|
||||
{$addQuery}
|
||||
";
|
||||
$res = sql_fetch($sql);
|
||||
$dt_data = array();
|
||||
if (isset($res['dt_data'])) {
|
||||
$dt_data = unserialize(base64_decode($res['dt_data']));
|
||||
}
|
||||
|
||||
$payReqMap = $dt_data;
|
||||
|
||||
$_SESSION['PAYREQ_MAP'] = $payReqMap;
|
||||
include_once(G5_LIB_PATH.'/shop_order_access.lib.php');
|
||||
$ss_order_id = isset($_REQUEST['orderId']) ? $_REQUEST['orderId'] : '';
|
||||
$payReqMap = shop_order_access_load($ss_order_id, 'toss');
|
||||
|
||||
if(isset($payReqMap['pp_id']) && $payReqMap['pp_id']) {
|
||||
$page_return_url = G5_SHOP_URL.'/personalpayform.php?pp_id='.$payReqMap['pp_id'];
|
||||
@@ -65,23 +21,14 @@ include_once(G5_PATH.'/head.sub.php');
|
||||
|
||||
<form name="forderform">
|
||||
<?php
|
||||
foreach($payReqMap as $key => $value) {
|
||||
if (isset($_REQUEST[$key]) && $_REQUEST[$key]) {
|
||||
$value = $_REQUEST[$key];
|
||||
}
|
||||
if (is_array($value)) {
|
||||
$value = implode(',', $value);
|
||||
}
|
||||
if ($key === 'escrowProducts') {
|
||||
$value = str_replace("\\", "", $value);
|
||||
echo '<input type="hidden" name="'.$key.'" value=\''.$value.'\'>'.PHP_EOL;
|
||||
} else {
|
||||
echo '<input type="hidden" name="'.$key.'" value="'.$value.'">'.PHP_EOL;
|
||||
}
|
||||
if (isset($payReqMap['escrowProducts']) && is_string($payReqMap['escrowProducts'])) {
|
||||
$payReqMap['escrowProducts'] = stripslashes($payReqMap['escrowProducts']);
|
||||
}
|
||||
echo make_order_field($payReqMap, array());
|
||||
?>
|
||||
</form>
|
||||
|
||||
<script src="<?php echo G5_JS_URL; ?>/shop.order-state.js"></script>
|
||||
<script language="javascript" src="https://js.tosspayments.com/v2/standard"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
@@ -124,8 +71,8 @@ async function launchCrossPlatform(frm) {
|
||||
taxFreeAmount: parseInt(frm.taxFreeAmount.value),
|
||||
orderId: frm.orderId.value, // 고유 주문번호
|
||||
orderName: frm.orderName.value,
|
||||
successUrl: "<?php echo G5_MSHOP_URL;?>/toss/returnurl.php", // 결제 요청이 성공하면 리다이렉트되는 URL
|
||||
failUrl: "<?php echo G5_MSHOP_URL;?>/toss/returnurl.php?mode=fail", // 결제 요청이 실패하면 리다이렉트되는 URL
|
||||
successUrl: g5_order_state_url("<?php echo G5_MSHOP_URL;?>/toss/returnurl.php", frm), // 결제 요청이 성공하면 리다이렉트되는 URL
|
||||
failUrl: g5_order_state_url("<?php echo G5_MSHOP_URL;?>/toss/returnurl.php?mode=fail", frm), // 결제 요청이 실패하면 리다이렉트되는 URL
|
||||
customerEmail: frm.customerEmail.value,
|
||||
customerName: frm.customerName.value,
|
||||
customerMobilePhone: frm.customerMobilePhone.value,
|
||||
|
||||
Reference in new issue
Block a user