diff --git a/adm/shop_admin/_common.php b/adm/shop_admin/_common.php index ca6c5a8dd..35d85db39 100644 --- a/adm/shop_admin/_common.php +++ b/adm/shop_admin/_common.php @@ -7,4 +7,7 @@ if (!defined('G5_USE_SHOP') || !G5_USE_SHOP) die('
쇼핑몰 설치 후 이용해 주십시오.
'); include_once(G5_ADMIN_PATH.'/admin.lib.php'); +include_once('./admin.shop.lib.php'); + +check_order_inicis_tmps(); ?> diff --git a/adm/shop_admin/admin.shop.lib.php b/adm/shop_admin/admin.shop.lib.php index baa5f3816..7b9da993e 100644 --- a/adm/shop_admin/admin.shop.lib.php +++ b/adm/shop_admin/admin.shop.lib.php @@ -119,4 +119,64 @@ function conv_sms_contents($od_id, $contents) return stripslashes($sms_contents); } + +function check_order_inicis_tmps(){ + global $g5, $config, $default, $member; + + $admin_cookie_time = get_cookie('admin_visit_time'); + + if( ! $admin_cookie_time ){ + + if( $default['de_pg_service'] === 'inicis' && empty($default['de_card_test']) ){ + $sql = " select * from {$g5['g5_shop_inicis_log_table']} where P_TID <> '' and P_TYPE in ('CARD', 'ISP', 'BANK') and P_MID <> '' and P_STATUS = '00' and is_mail_send = 0 and substr(P_AUTH_DT, 1, 14) < '".date('YmdHis', strtotime('-3 minutes', G5_SERVER_TIME))."' "; + + $result = sql_query($sql, false); + + if( !$result ){ + return; + } + + $mail_msg = ''; + + for($i=0;$row=sql_fetch_array($result);$i++){ + + $oid = $row['oid']; + $p_tid = $row['P_TID']; + $p_mid = strtolower($tmps['P_MID']); + + if( in_array($p_mid, array('iniescrow0', 'inipaytest')) ) continue; + + $sql = "update {$g5['g5_shop_inicis_log_table']} set is_mail_send = 1 where oid = '".$oid."' and P_TID = '".$p_tid."' "; + sql_query($sql); + + $sql = " select od_id from {$g5['g5_shop_order_table']} where od_id = '$oid' and od_tno = '$p_tid' "; + $tmp = sql_fetch($sql); + + if( $tmp['od_id'] ) continue; + + $sql = " select pp_id from {$g5['g5_shop_personalpay_table']} where pp_id = '$oid' and pp_tno = '$p_tid' "; + $tmp = sql_fetch($sql); + + if( $tmp['pp_id'] ) continue; + + $mail_msg .= '미완료 발생 주문번호 : '.$oid.'실결제로 결제된 경우 반드시 이니시스 상점 관리자에서 해당 결제건을 확인 후에 주문을 처리해 주세요.
+| 주문번호 | ++ |
|---|---|
| 결제 TID | ++ |
| 결제 MID | ++ |
| 결제 시간 | ++ |
| 결제 수단 | ++ |
| 결제된 금액 | ++ |