본인확인 사용
diff --git a/adm/board_form_update.php b/adm/board_form_update.php
index a52fec1bd..b5f7364b7 100644
--- a/adm/board_form_update.php
+++ b/adm/board_form_update.php
@@ -121,7 +121,6 @@ $bo_use_list_view = isset($_POST['bo_use_list_view']) ? (int) $_POST['bo_use_lis
$bo_use_list_file = isset($_POST['bo_use_list_file']) ? (int) $_POST['bo_use_list_file'] : 0;
$bo_use_list_content = isset($_POST['bo_use_list_content']) ? (int) $_POST['bo_use_list_content'] : 0;
$bo_use_email = isset($_POST['bo_use_email']) ? (int) $_POST['bo_use_email'] : 0;
-$bo_use_kakaotalk = isset($_POST['bo_use_kakaotalk']) ? (int) $_POST['bo_use_kakaotalk'] : 0;
$bo_use_sns = isset($_POST['bo_use_sns']) ? (int) $_POST['bo_use_sns'] : 0;
$bo_use_captcha = isset($_POST['bo_use_captcha']) ? (int) $_POST['bo_use_captcha'] : 0;
$bo_table_width = isset($_POST['bo_table_width']) ? (int) $_POST['bo_table_width'] : 0;
@@ -224,7 +223,6 @@ $sql_common = " gr_id = '{$gr_id}',
bo_use_list_file = '{$bo_use_list_file}',
bo_use_list_content = '{$bo_use_list_content}',
bo_use_email = '{$bo_use_email}',
- bo_use_kakaotalk = '{$bo_use_kakaotalk}',
bo_use_cert = '{$bo_use_cert}',
bo_use_sns = '{$bo_use_sns}',
bo_use_captcha = '{$bo_use_captcha}',
@@ -409,7 +407,6 @@ if (is_checked('chk_grp_use_list_view')) $grp_fields .= " , bo_use_list_v
if (is_checked('chk_grp_use_list_file')) $grp_fields .= " , bo_use_list_file = '{$bo_use_list_file}' ";
if (is_checked('chk_grp_use_list_content')) $grp_fields .= " , bo_use_list_content = '{$bo_use_list_content}' ";
if (is_checked('chk_grp_use_email')) $grp_fields .= " , bo_use_email = '{$bo_use_email}' ";
-if (is_checked('chk_grp_use_kakaotalk')) $grp_fields .= " , bo_use_kakaotalk = '{$bo_use_kakaotalk}' ";
if (is_checked('chk_grp_use_cert')) $grp_fields .= " , bo_use_cert = '{$bo_use_cert}' ";
if (is_checked('chk_grp_use_sns')) $grp_fields .= " , bo_use_sns = '{$bo_use_sns}' ";
if (is_checked('chk_grp_use_captcha')) $grp_fields .= " , bo_use_captcha = '{$bo_use_captcha}' ";
@@ -500,7 +497,6 @@ if (is_checked('chk_all_use_list_view')) $all_fields .= " , bo_use_list_v
if (is_checked('chk_all_use_list_file')) $all_fields .= " , bo_use_list_file = '{$bo_use_list_file}' ";
if (is_checked('chk_all_use_list_content')) $all_fields .= " , bo_use_list_content = '{$bo_use_list_content}' ";
if (is_checked('chk_all_use_email')) $all_fields .= " , bo_use_email = '{$bo_use_email}' ";
-if (is_checked('chk_all_use_kakaotalk')) $all_fields .= " , bo_use_kakaotalk = '{$bo_use_kakaotalk}' ";
if (is_checked('chk_all_use_cert')) $all_fields .= " , bo_use_cert = '{$bo_use_cert}' ";
if (is_checked('chk_all_use_sns')) $all_fields .= " , bo_use_sns = '{$bo_use_sns}' ";
if (is_checked('chk_all_use_captcha')) $all_fields .= " , bo_use_captcha = '{$bo_use_captcha}' ";
diff --git a/adm/config_form.php b/adm/config_form.php
index 616c8375f..4312a7001 100644
--- a/adm/config_form.php
+++ b/adm/config_form.php
@@ -8,8 +8,6 @@ if ($is_admin != 'super') {
alert('최고관리자만 접근 가능합니다.');
}
-include_once(G5_KAKAO5_PATH.'/kakao5.lib.php'); // 카카오톡 설정 확인
-
// https://github.com/gnuboard/gnuboard5/issues/296 이슈처리
$sql = " select * from {$g5['config_table']} limit 1";
$config = sql_fetch($sql);
@@ -424,20 +422,6 @@ if (!isset($config['cf_cert_kcp_enckey'])) {
$config['cf_cert_kcp_enckey'] = '';
}
-// 카카오톡 설정 필드 추가
-if (!isset($config['cf_kakaotalk_use'])) {
- sql_query(
- " ALTER TABLE `{$g5['config_table']}`
- ADD `cf_kakaotalk_use` varchar(50) NOT NULL DEFAULT '' AFTER `cf_recaptcha_secret_key`,
- ADD `cf_kakaotalk_corpnum` varchar(50) NOT NULL DEFAULT '' AFTER `cf_kakaotalk_use`,
- ADD `cf_kakaotalk_sender_hp` varchar(50) NOT NULL DEFAULT '' AFTER `cf_kakaotalk_corpnum`,
- ADD `cf_popbill_userid` varchar(100) NOT NULL DEFAULT '' AFTER `cf_kakaotalk_sender_hp`,
- ADD `cf_popbill_link_id` varchar(100) NOT NULL DEFAULT '' AFTER `cf_popbill_userid`,
- ADD `cf_popbill_secretkey` varchar(255) NOT NULL DEFAULT '' AFTER `cf_popbill_link_id` ",
- true
- );
-}
-
// 광고성 정보 수신 동의 사용 필드 추가
if (!isset($config['cf_use_promotion'])) {
sql_query(
@@ -478,10 +462,10 @@ $pg_anchor = '
회원가입
본인확인
짧은주소
- 기본알림환경
- 글작성알림
- 가입알림
- 투표알림
+ 기본메일환경
+ 글작성메일
+ 가입메일
+ 투표메일
SNS
레이아웃 추가설정
SMS
@@ -1156,12 +1140,12 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
?>
- 기본 알림 환경 설정
+ 기본 메일 환경 설정
- 게시판 글 작성 시 알림 설정
+ 게시판 글 작성 시 메일 설정
- 게시판 글 작성 시 알림 설정
+ 게시판 글 작성 시 메일 설정
@@ -1315,12 +1233,12 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
- 회원가입 시 알림 설정
+ 회원가입 시 메일 설정
- 회원가입 시 알림 설정
+ 회원가입 시 메일 설정
@@ -1347,12 +1265,12 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
- 투표 기타의견 작성 시 알림 설정
+ 투표 기타의견 작성 시 메일 설정
- 투표 기타의견 작성 시 알림 설정
+ 투표 기타의견 작성 시 메일 설정
@@ -1849,50 +1767,6 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
});
-
-', 1); // 카카오톡5 솔루션 js 추가 ?>
-
-
'char',
'cf_captcha' => 'char',
'cf_syndi_token' => '',
- 'cf_syndi_except' => '',
- 'cf_kakaotalk_use' => 'char',
- 'cf_kakaotalk_corpnum' => 'char',
- 'cf_kakaotalk_sender_hp' => 'char',
- 'cf_popbill_userid' => 'char',
- 'cf_popbill_link_id' => 'char',
- 'cf_popbill_secretkey' => 'char'
+ 'cf_syndi_except' => ''
);
for ($i = 1; $i <= 10; $i++) {
@@ -356,12 +350,6 @@ $sql = " update {$g5['config_table']}
cf_recaptcha_secret_key = '{$_POST['cf_recaptcha_secret_key']}',
cf_payco_clientid = '{$_POST['cf_payco_clientid']}',
cf_payco_secret = '{$_POST['cf_payco_secret']}',
- cf_kakaotalk_use = '{$_POST['cf_kakaotalk_use']}',
- cf_kakaotalk_corpnum = '{$_POST['cf_kakaotalk_corpnum']}',
- cf_kakaotalk_sender_hp = '{$_POST['cf_kakaotalk_sender_hp']}',
- cf_popbill_userid = '{$_POST['cf_popbill_userid']}',
- cf_popbill_link_id = '{$_POST['cf_popbill_link_id']}',
- cf_popbill_secretkey = '{$_POST['cf_popbill_secretkey']}',
cf_1_subj = '{$_POST['cf_1_subj']}',
cf_2_subj = '{$_POST['cf_2_subj']}',
cf_3_subj = '{$_POST['cf_3_subj']}',
diff --git a/adm/css/admin.css b/adm/css/admin.css
index 20802f756..a84db1507 100644
--- a/adm/css/admin.css
+++ b/adm/css/admin.css
@@ -104,8 +104,6 @@ h2{font-size: 1.083em;font-weight: bold;margin:10px 0}
#gnb .on .btn_op.menu-400{background:url(../img/menu-7.png) 50% 50% no-repeat #fff}
#gnb .gnb_li .btn_op.menu-500{background:url(../img/menu-6-1.png) 50% 50% no-repeat #ebebeb }
#gnb .on .btn_op.menu-500{background:url(../img/menu-6.png) 50% 50% no-repeat #fff}
-#gnb .gnb_li .btn_op.menu-800{background:url(../img/menu-8-1.png) 50% 50% no-repeat #ebebeb }
-#gnb .on .btn_op.menu-800{background:url(../img/menu-8.png) 50% 50% no-repeat #fff}
#gnb .gnb_li .btn_op.menu-900{background:url(../img/menu-4-1.png) 50% 50% no-repeat #ebebeb }
#gnb .on .btn_op.menu-900{background:url(../img/menu-4.png) 50% 50% no-repeat #fff}
#gnb .gnb_li button:hover{background-color:#f3f3f3}
@@ -233,8 +231,6 @@ a.btn_submit{background:#ff4081;color:#fff}
.btn_02,a.btn_02{background:#9eacc6;color:#fff;}
.btn_03,a.btn_03{background:#3f51b5;color:#fff;}
-.btn_04,a.btn_04{background:#555;color:#fff}
-.btn_04:hover,a.btn_04:hover{background:#666}
.btn_frmline{display:inline-block;background:#9eacc6;color:#fff;height:35px;border:0;border-radius:5px;padding:0 10px}
a.btn_frmline{display:inline-block;background:#9eacc6;color:#fff;height:35px;line-height:33px;border-radius:5px;padding:0 10px;text-decoration:none !important}
@@ -1220,25 +1216,4 @@ input[type="text"]{max-width:200px}
@media only screen and (max-device-width : 480px) and (orientation : portrait){
/* Styles */
input[type="text"]{max-width:200px}
-}
-
-/* 쇼핑몰관리 > 알림톡프리셋관리 */
-.template_preview {display:none;z-index:10;position:absolute;padding:20px;width:400px;min-height:300px;max-height:300px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;text-align: left;}
-.template_preview_txt {padding:10px;width:100%;height:300px;border:1px solid #696c71;background:#f7f7f7;overflow-y:scroll;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}
-.btn_template_preview_open {padding:5px 10px;width:77px;height:30px;line-height:10px;border:0;border-radius:5px;background:#484848;color:#fff}
-.btn_template_preview_close {margin:0;padding:0;width:100%;height:40px;line-height:40px;border:0;background:#484848;color:#fff}
-.variable_table {overflow:hidden;max-height:0;transition:max-height 0.7s}
-.variable_table.is-visible {max-height:1000px !important;}
-.variable_table .tbl_head01 tbody td {background-color: #fff;}
-
-.preset-toggle{position:relative;display:inline-block;width:50px;height:24px}
-.preset-toggle input{opacity:0;width:0;height:0}
-.preset-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background:#ccc;transition:.4s;border-radius:24px}
-.preset-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background:#fff;transition:.4s;border-radius:50%}
-input:checked+.preset-slider{background:#4CAF50}
-input:checked+.preset-slider:before{transform:translateX(26px)}
-
-/* 친구톡 전송 관련 */
-.kakao-send-svg { width: 16px; height: 16px; fill: currentColor; margin-bottom: -3px; }
-.kakao-setting-btn { height: auto; padding: 7px 12px; background: #3d70ff; color: white; border: none; border-radius: 6px; font-weight: 600; min-width: 110px;}
-.kakao-setting-btn:hover { background: #2c5bd3; }
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/adm/dbupgrade.php b/adm/dbupgrade.php
index a26c55ec1..a6f1e3e76 100644
--- a/adm/dbupgrade.php
+++ b/adm/dbupgrade.php
@@ -289,101 +289,6 @@ if($g5['sms5_prefix'] != 'sms5_' && sql_num_rows(sql_query("show tables like 'sm
$is_check = true;
}
-// 카카오톡 프리셋 테이블
-if( isset($g5['kakao5_preset_table']) && !sql_query(" DESC {$g5['kakao5_preset_table']} ", false)) {
- sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['kakao5_preset_table']}` (
- `kp_id` int(11) NOT NULL AUTO_INCREMENT,
- `kp_type` varchar(20) NOT NULL DEFAULT '',
- `kp_category` varchar(20) NOT NULL DEFAULT '',
- `kp_preset_code` varchar(100) NOT NULL DEFAULT '',
- `kp_preset_name` varchar(100) NOT NULL DEFAULT '',
- `kp_template_name` varchar(100) NOT NULL DEFAULT '',
- `kp_alt_send` varchar(100) NOT NULL DEFAULT '1',
- `kp_active` tinyint(1) NOT NULL DEFAULT '1',
- `kp_created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `kp_updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`kp_id`)
- ) ", true);
-
- // 기본 프리셋 데이터 추가
- sql_query("INSERT INTO `{$g5['kakao5_preset_table']}`
- (`kp_type`, `kp_category`, `kp_preset_code`, `kp_preset_name`, `kp_template_name`, `kp_alt_send`, `kp_active`, `kp_created_at`, `kp_updated_at`)
- VALUES
- ('회원', '회원', 'CU-MB01', '회원가입완료', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
- ('최고관리자', '회원', 'AD-MB01', '회원가입완료', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
-
- ('작성자', '게시판', 'CU-BO01', '새 게시글 작성', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
- ('최고관리자', '게시판', 'AD-BO01', '새 게시글 작성', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
- ('그룹관리자', '게시판', 'AD-BO02', '새 게시글 작성', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
- ('게시판관리자', '게시판', 'AD-BO03', '새 게시글 작성', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
- ('작성자', '게시판', 'CU-BO02', '새 댓글 작성', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
- ('댓글 작성자', '게시판', 'CU-BO03', '새 댓글 작성', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
- ('답변글 작성자', '게시판', 'CU-BO04', '답변글 작성', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
- ('최고관리자', '투표', 'AD-VO01', '기타의견 작성', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
-
- ('주문자', '쇼핑몰', 'CU-OR01', '주문 완료', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
- ('최고관리자', '쇼핑몰', 'AD-OR01', '주문 완료', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
- ('주문자', '쇼핑몰', 'CU-OR02', '무통장입금 주문 완료', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
- ('최고관리자', '쇼핑몰', 'AD-OR02', '무통장입금 주문 완료', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
- ('주문자', '쇼핑몰', 'CU-OR03', '무통장입금 완료', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
- ('최고관리자', '쇼핑몰', 'AD-OR03', '무통장입금 완료', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
- ('주문자', '쇼핑몰', 'CU-OR04', '(주문자)주문 취소', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
- ('최고관리자', '쇼핑몰', 'AD-OR04', '(주문자)주문 취소', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
- ('주문자', '쇼핑몰', 'CU-OR05', '(관리자)주문 취소', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
- ('최고관리자', '쇼핑몰', 'AD-OR05', '(관리자)주문 취소', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
- ('주문자', '쇼핑몰', 'CU-OR06', '반품', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
- ('주문자', '쇼핑몰', 'CU-OR07', '품절', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
- ('주문자', '쇼핑몰', 'CU-DE01', '배송 준비', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
- ('주문자', '쇼핑몰', 'CU-DE02', '배송중', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
- ('주문자', '쇼핑몰', 'CU-DE03', '배송 완료', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
- ('요청자', '쇼핑몰', 'CU-ST01', '재입고알림', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
-
- ('문의자', '1:1문의', 'CU-IQ01', '문의 등록', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
- ('최고관리자', '1:1문의', 'AD-IQ01', '문의 등록', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
- ('문의자', '1:1문의', 'CU-IQ02', '답변 등록', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
- ", true);
- $is_check = true;
-}
-
-// 카카오톡 프리셋 전송내역 테이블
-if( isset($g5['kakao5_preset_history_table']) && !sql_query(" DESC {$g5['kakao5_preset_history_table']} ", false)) {
- sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['kakao5_preset_history_table']}` (
- `ph_id` int(11) NOT NULL AUTO_INCREMENT,
- `kp_id` int(11) NOT NULL DEFAULT '0',
- `mb_id` varchar(20) NOT NULL DEFAULT '',
- `ph_rcvnm` varchar(100) NOT NULL DEFAULT '',
- `ph_rcv` varchar(100) NOT NULL DEFAULT '',
- `ph_template_code` varchar(100) NOT NULL DEFAULT '',
- `ph_alt_send` varchar(100) NOT NULL DEFAULT '',
- `ph_request_num` varchar(100) NOT NULL DEFAULT '',
- `ph_receipt_num` varchar(100) NOT NULL DEFAULT '',
- `ph_send_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `ph_state` tinyint(1) NOT NULL DEFAULT '0',
- `ph_log` text NOT NULL,
- PRIMARY KEY (`ph_id`),
- KEY `kp_id` (`kp_id`),
- KEY `mb_id` (`mb_id`)
- ) ", true);
-
- $is_check = true;
-}
-
-// 카카오톡 설정 필드 추가
-if (!isset($config['cf_kakaotalk_use'])) {
- sql_query(
- " ALTER TABLE `{$g5['config_table']}`
- ADD `cf_kakaotalk_use` varchar(50) NOT NULL DEFAULT '' AFTER `cf_recaptcha_secret_key`,
- ADD `cf_kakaotalk_corpnum` varchar(50) NOT NULL DEFAULT '' AFTER `cf_kakaotalk_use`,
- ADD `cf_kakaotalk_sender_hp` varchar(50) NOT NULL DEFAULT '' AFTER `cf_kakaotalk_corpnum`,
- ADD `cf_popbill_userid` varchar(100) NOT NULL DEFAULT '' AFTER `cf_kakaotalk_sender_hp`,
- ADD `cf_popbill_link_id` varchar(100) NOT NULL DEFAULT '' AFTER `cf_popbill_userid`,
- ADD `cf_popbill_secretkey` varchar(255) NOT NULL DEFAULT '' AFTER `cf_popbill_link_id` ",
- true
- );
-
- $is_check = true;
-}
-
// 광고성 정보 수신 동의 사용 필드 추가
if (!isset($config['cf_use_promotion'])) {
sql_query(
@@ -412,47 +317,6 @@ if (!isset($member['mb_marketing_agree'])) {
$is_check = true;
}
-// 게시판 설정 - SMS/알림톡 사용 여부 추가
-if(!sql_query(" select bo_use_kakaotalk from {$g5['board_table']} limit 1", false)) {
- sql_query(
- " ALTER TABLE `{$g5['board_table']}`
- ADD `bo_use_kakaotalk` VARCHAR(50) NOT NULL DEFAULT '' AFTER `bo_use_email` ",
- true
- );
-
- $is_check = true;
-}
-
-// 게시판 알림 설정 필드 추가
-if (!isset($member['mb_board_post'])) {
- sql_query(
- " ALTER TABLE `{$g5['member_table']}`
- ADD `mb_board_post` tinyint(1) NOT NULL DEFAULT '0' AFTER `mb_agree_log`,
- ADD `mb_board_reply` tinyint(1) NOT NULL DEFAULT '0' AFTER `mb_board_post`,
- ADD `mb_board_comment` tinyint(1) NOT NULL DEFAULT '0' AFTER `mb_board_reply`,
- ADD `mb_board_recomment` tinyint(1) NOT NULL DEFAULT '0' AFTER `mb_board_comment` ",
- true
- );
-
- $is_check = true;
-}
-
-// 재입고 알림 - 채널 구분 (1=SMS, 2=알림톡)
-if (defined('G5_USE_SHOP') && G5_USE_SHOP) {
- if(sql_query(" DESC {$g5['g5_shop_item_stocksms_table']} ", false)) {
- if(!sql_query(" select ss_channel from {$g5['g5_shop_item_stocksms_table']} limit 1", false)) {
- sql_query(
- " ALTER TABLE `{$g5['g5_shop_item_stocksms_table']}`
- ADD `ss_channel` tinyint(4) NOT NULL DEFAULT '1' AFTER `ss_ip` ",
- true
- );
-
- $is_check = true;
- }
- }
-}
-
-
$is_check = run_replace('admin_dbupgrade', $is_check);
$db_upgrade_msg = $is_check ? 'DB 업그레이드가 완료되었습니다.' : '더 이상 업그레이드 할 내용이 없습니다. 현재 DB 업그레이드가 완료된 상태입니다.';
diff --git a/adm/img/svc_btn_07.jpg b/adm/img/svc_btn_07.jpg
deleted file mode 100644
index f76bd70d5..000000000
Binary files a/adm/img/svc_btn_07.jpg and /dev/null differ
diff --git a/adm/member_form.php b/adm/member_form.php
index 2ba6d3f22..28287bd74 100644
--- a/adm/member_form.php
+++ b/adm/member_form.php
@@ -57,10 +57,6 @@ if ($w == '') {
$mb['mb_level'] = $config['cf_register_level'];
$mb['mb_marketing_agree'] = 0;
$mb['mb_thirdparty_agree'] = 0;
- $mb['mb_board_post'] = 1;
- $mb['mb_board_reply'] = 1;
- $mb['mb_board_comment'] = 1;
- $mb['mb_board_recomment'] = 1;
$html_title = '추가';
} elseif ($w == 'u') {
$mb = get_member($mb_id);
@@ -154,19 +150,6 @@ $mb_marketing_agree_no = !$mb['mb_marketing_agree'] ? 'checked="checked"' :
$mb_thirdparty_agree_yes = $mb['mb_thirdparty_agree'] ? 'checked="checked"' : '';
$mb_thirdparty_agree_no = !$mb['mb_thirdparty_agree'] ? 'checked="checked"' : '';
-// 알림 설정 (전용 컬럼 사용)
-$mb_board_post_yes = !empty($mb['mb_board_post']) ? 'checked="checked"' : '';
-$mb_board_post_no = empty($mb['mb_board_post']) ? 'checked="checked"' : '';
-
-$mb_board_reply_yes = !empty($mb['mb_board_reply']) ? 'checked="checked"' : '';
-$mb_board_reply_no = empty($mb['mb_board_reply']) ? 'checked="checked"' : '';
-
-$mb_board_comment_yes = !empty($mb['mb_board_comment']) ? 'checked="checked"' : '';
-$mb_board_comment_no = empty($mb['mb_board_comment']) ? 'checked="checked"' : '';
-
-$mb_board_recomment_yes = !empty($mb['mb_board_recomment']) ? 'checked="checked"' : '';
-$mb_board_recomment_no = empty($mb['mb_board_recomment']) ? 'checked="checked"' : '';
-
if (isset($mb['mb_certify'])) {
// 날짜시간형이라면 drop 시킴
if (preg_match("/-/", $mb['mb_certify'])) {
@@ -639,42 +622,6 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
run_event('admin_member_form_add', $mb, $w, 'table');
?>
-
- 게시글 작성 완료 알림
-
- >
- 예
- >
- 아니오
-
-
- 게시글 답변 알림
-
- >
- 예
- >
- 아니오
-
-
-
-
- 댓글 알림
-
- >
- 예
- >
- 아니오
-
-
- 대댓글 알림
-
- >
- 예
- >
- 아니오
-
-
-
여분 필드
diff --git a/adm/member_form_update.php b/adm/member_form_update.php
index 8616200be..1bf338e68 100644
--- a/adm/member_form_update.php
+++ b/adm/member_form_update.php
@@ -22,12 +22,6 @@ $mb_zip = isset($_POST['mb_zip']) ? preg_replace('/[^0-9a-z_]/i', '', $_
$mb_marketing_agree = isset($_POST['mb_marketing_agree']) ? clean_xss_tags($_POST['mb_marketing_agree'], 1, 1) : '0';
$mb_thirdparty_agree = isset($_POST['mb_thirdparty_agree']) ? clean_xss_tags($_POST['mb_thirdparty_agree'], 1, 1) : '0';
-// 게시판알림 설정
-$mb_board_post = isset($_POST['mb_board_post']) ? (int)$_POST['mb_board_post'] : 0;
-$mb_board_reply = isset($_POST['mb_board_reply']) ? (int)$_POST['mb_board_reply'] : 0;
-$mb_board_comment = isset($_POST['mb_board_comment']) ? (int)$_POST['mb_board_comment'] : 0;
-$mb_board_recomment = isset($_POST['mb_board_recomment']) ? (int)$_POST['mb_board_recomment'] : 0;
-
// 관리자가 자동등록방지를 사용해야 할 경우 ( 회원의 비밀번호 변경시 캡챠를 체크한다 )
if ($mb_password) {
include_once(G5_CAPTCHA_PATH . '/captcha.lib.php');
@@ -122,10 +116,6 @@ $sql_common = " mb_name = '{$posts['mb_name']}',
mb_level = '{$posts['mb_level']}',
mb_marketing_agree = '{$mb_marketing_agree}',
mb_thirdparty_agree = '{$mb_thirdparty_agree}',
- mb_board_post = '{$mb_board_post}',
- mb_board_reply = '{$mb_board_reply}',
- mb_board_comment = '{$mb_board_comment}',
- mb_board_recomment = '{$mb_board_recomment}',
mb_1 = '{$posts['mb_1']}',
mb_2 = '{$posts['mb_2']}',
mb_3 = '{$posts['mb_3']}',
diff --git a/adm/member_list_exel.lib.php b/adm/member_list_exel.lib.php
index 32e845670..cdce04c8d 100644
--- a/adm/member_list_exel.lib.php
+++ b/adm/member_list_exel.lib.php
@@ -215,8 +215,7 @@ function member_export_build_where($params)
$range = $params['ad_range_type'] ?? '';
// 공통: 마케팅 목적 수집·이용 동의 + (필요 시) 제3자 동의
- $needs_thirdparty = ($config['cf_sms_use'] !== '' || $config['cf_kakaotalk_use'] !== '');
- $thirdparty_clause = $needs_thirdparty ? " AND mb_thirdparty_agree = 1" : "";
+ $thirdparty_clause = $config['cf_sms_use'] !== '' ? " AND mb_thirdparty_agree = 1" : "";
$base_marketing = "mb_marketing_agree = 1{$thirdparty_clause}";
if ($range === 'all') {
diff --git a/adm/member_list_exel.php b/adm/member_list_exel.php
index 912b97647..db16c4e55 100644
--- a/adm/member_list_exel.php
+++ b/adm/member_list_exel.php
@@ -31,25 +31,8 @@ $colspan = 14;
파일 생성 시 서버에 임시 생성된 파일 중 오늘 날짜를 제외 한 파일은 자동 삭제 되며, 수동 삭제 필요 시 회원관리파일 일괄삭제 에서 진행하시기 바랍니다.
회원 정보 수정은 회원 관리 에서 진행하실 수 있습니다.
-
-
- 친구톡 양식 은 카카오톡 사용 시 에만 이용 가능합니다.
-
- 친구톡 (광고성 카카오톡 포함) 의 경우 기존 회원 데이터 엑셀 파일 다운로드 후 상단 [친구톡 보내기] 버튼을 누르면 팝빌 홈페이지 로 이동하여 업로드 진행하실 수 있습니다.
-
-
-
-
-
총건수
@@ -206,7 +189,7 @@ $colspan = 14;
개인정보 제3자 제공' : '';
+ $thirdpartyLbl = (!empty($config['cf_sms_use'])) ? ' / 개인정보 제3자 제공 ' : '';
$ad_range_text = [
'all' => "* 광고성 정보 수신(이메일 또는 SMS/카카오톡) / 마케팅 목적의 개인정보 수집 및 이용 {$thirdpartyLbl}에 모두 동의한 회원을 선택합니다.",
@@ -244,11 +227,6 @@ $colspan = 14;
엑셀파일 다운로드
-
-
- 엑셀파일 다운로드 (친구톡 양식)
-
-
초기화
@@ -280,16 +258,9 @@ let eventSource = null;
// 일반 엑셀 다운로드 버튼 클릭
document.getElementById('btnExcelDownload').addEventListener('click', () => {
- startExcelDownload(1);
+ startExcelDownload();
});
-// 팝빌 양식 다운로드 버튼 클릭
-
- document.getElementById('btnExcelDownloadPopbill').addEventListener('click', () => {
- showDownloadPopupPopill();
-});
-
-
// 엑셀 다운로드 실행
// 1. 기존 SSE 종료
function closePreviousEventSource() {
@@ -300,25 +271,20 @@ function closePreviousEventSource() {
}
// 2. FormData QueryString 변환
-function buildDownloadParams(formatType, selectedFields = []) {
+function buildDownloadParams(selectedFields = []) {
const formData = new FormData(document.getElementById('fsearch'));
const params = new URLSearchParams(formData);
params.append('mode', 'start');
- params.append('formatType', formatType);
-
- if (formatType === 2 && selectedFields.length > 0) {
- params.append('fields', selectedFields.join(','));
- }
return params.toString();
}
// 3. 메인 함수
-function startExcelDownload(formatType, selectedFields = []) {
+function startExcelDownload(selectedFields = []) {
closePreviousEventSource();
- const query = buildDownloadParams(formatType, selectedFields);
+ const query = buildDownloadParams(selectedFields);
showDownloadPopup();
eventSource = new EventSource(`member_list_exel_export.php?${query}`);
@@ -374,47 +340,6 @@ function handlePopupCloseWithConfirm(e) {
PopupManager.close('popupOverlay');
}
-// 친구톡 양식(팝빌) - 항목 선택 팝업
-function showDownloadPopupPopill() {
- const baseFields = [
- ['mb_id', '아이디'], ['mb_nick', '닉네임'], ['mb_point', '포인트'], ['mb_level', '권한'],
- ['mb_email', '이메일'], ['mb_homepage', '홈페이지'], ['mb_datetime', '회원가입일'], ['mb_intercept_date', '차단여부'],
- ['mb_mailling', '광고성 이메일 수신동의'], ['mb_mailling_date', '광고성 이메일 수신동의일자'],
- ['mb_sms', '광고성 SMS/카카오톡 수신동의'], ['mb_sms_date', '광고성 SMS/카카오톡 수신동의일자'],
- ['mb_marketing_agree', '마케팅목적의개인정보수집및이용동의여부'], ['mb_marketing_date', '마케팅목적의개인정보수집및이용동의일자'],
- ['mb_thirdparty_agree', '개인정보제3자제공동의여부'], ['mb_thirdparty_date', '개인정보제3자제공동의일자']
- ];
- const extraFields = Array.from({ length: 10 }, (_, i) => [`mb_${i + 1}`, `여분 필드 ${i + 1}`]);
-
- let baseFieldHTML = '';
- baseFields.forEach(([value, label]) => {
- baseFieldHTML += ` ${label} \n`;
- });
-
- let extraFieldHTML = '';
- extraFields.forEach(([value, label]) => {
- extraFieldHTML += ` ${label} \n`;
- });
-
- const bodyHTML = `
-
-
팝빌 친구톡 전송을 위한 엑셀 양식을 다운로드하실 수 있습니다.
-
전화번호 와 이름 은 필수 입력 항목이며, 추가로 변수1부터 변수3까지 최대 3개의 선택 항목을 입력하실 수 있습니다.
-
선택된 항목:
-
-
- `;
-
- const footerHTML = `선택 완료 `;
- PopupManager.render('엑셀 양식에 포함할 항목 선택', bodyHTML, footerHTML, { disableOutsideClose: true });
-
- bindFieldSelectEvents();
-}
-
// 체크박스 선택 시 최대 3개 제한 및 선택된 항목 미리보기 표시
function bindFieldSelectEvents() {
const fieldSelectForm = document.getElementById('fieldSelectForm');
@@ -441,26 +366,6 @@ function bindFieldSelectEvents() {
});
}
-// 친구톡 양식 - 항목 선택 후 선택완료 버튼 클릭
-function submitSelectedFields() {
- const checkboxes = document.querySelectorAll('#fieldSelectForm input[name="fields"]:checked');
- const selected = Array.from(checkboxes).map(cb => cb.value);
-
- if (selected.length > 3) {
- alert("최대 3개까지만 선택할 수 있습니다.");
- return;
- }
-
- // 항목을 하나도 선택하지 않았을 때 안내 알럿
- if (selected.length === 0) {
- const confirmProceed = confirm("선택한 항목이 없습니다. 항목 없이 엑셀을 다운로드하시겠습니까?");
- if (!confirmProceed) return;
- }
-
- PopupManager.close('popupOverlay');
- startExcelDownload(2, selected); // formatType 2: Popbill 다운로드
-}
-
// 엑셀 생성 및 다운로드 실행
function handleProgressUpdate() {
return function(e) {
diff --git a/adm/member_list_exel_export.php b/adm/member_list_exel_export.php
index ce451bc36..9421b5905 100644
--- a/adm/member_list_exel_export.php
+++ b/adm/member_list_exel_export.php
@@ -76,7 +76,7 @@ function main_member_export($params)
member_export_send_progress("progress", "", 2, $total, ($pages == $i ? $total : $i * MEMBER_EXPORT_PAGE_SIZE), $pages, $i);
try {
$data = member_export_get_data($params);
- $fileList[] = member_export_create_excel($data, $fileName, $i, $params['formatType']);
+ $fileList[] = member_export_create_excel($data, $fileName, $i);
} catch (Exception $e) {
throw new Exception("총 {$pages}개 중 {$i}번째 파일을 생성하지 못했습니다 " . $e->getMessage());
}
@@ -103,7 +103,7 @@ function main_member_export($params)
member_export_send_progress("progress", "", 1, $total, 0);
$data = member_export_get_data($params);
member_export_send_progress("progress", "", 1, $total, $total/2);
- $fileList[] = member_export_create_excel($data, $fileName, 0, $params['formatType']);
+ $fileList[] = member_export_create_excel($data, $fileName, 0);
member_export_send_progress("progress", "", 1, $total, $total);
}
@@ -142,8 +142,9 @@ function member_export_send_progress($status, $message = "", $downloadType = 1,
/**
* 엑셀 내보내기 설정
*/
-function member_export_get_config($type)
+function member_export_get_config()
{
+ $type = 1;
$configs = [
1 => [
'title' => ["회원관리파일(일반)"],
@@ -155,12 +156,6 @@ function member_export_get_config($type)
'mb_marketing_date', 'mb_thirdparty_agree', 'mb_thirdparty_date'],
'widths' => [20, 20, 20, 20, 20, 30, 30, 10, 15, 25, 10, 20, 25, 20, 25, 20, 25, 20, 25],
],
- 2 => [
- 'title' => ["회원관리파일(팝빌)"],
- 'headers' => ['휴대폰번호', '이름', '변수1', '변수2', '변수3'],
- 'fields' => ['mb_hp', 'mb_name'],
- 'widths' => [20, 15, 30, 30, 30],
- ],
];
return isset($configs[$type]) ? $configs[$type] : $configs[1];
@@ -195,14 +190,8 @@ function member_export_get_data($params)
{
global $g5;
- $config = member_export_get_config($params['formatType']);
+ $config = member_export_get_config();
$fields = $config['fields'];
-
- // 팝빌 타입인 경우 var 추가
- if ($params['formatType'] == 2 && !empty($params['vars'])) {
- $fields = array_merge($fields, array_values($params['vars']));
- }
-
$fields = array_unique($fields);
// SQL 변환 맵 (가공이 필요한 필드만 정의)
@@ -255,9 +244,9 @@ function member_export_get_data($params)
/**
* 엑셀 파일 생성
*/
-function member_export_create_excel($data, $fileName, $index = 0, $type = 1)
+function member_export_create_excel($data, $fileName, $index = 0)
{
- $config = member_export_get_config($type);
+ $config = member_export_get_config();
if (!class_exists('PHPExcel')) {
error_log('[Member Export Error] PHPExcel 라이브러리를 찾을 수 없습니다.');
@@ -471,7 +460,6 @@ function member_export_write_log($params, $result = [])
}
}
- $formatType = (isset($params['formatType']) && $params['formatType'] == 2) ? '팝빌' : '일반';
$success = isset($result['success']) && $result['success'] === true;
$status = $success ? '성공' : '실패';
@@ -538,7 +526,7 @@ function member_export_write_log($params, $result = [])
}
$conditionStr = !empty($condition) ? implode(', ', $condition) : '없음';
- $line1 = "[{$datetime}] [{$status}] 관리자: {$username} | 형식: {$formatType}";
+ $line1 = "[{$datetime}] [{$status}] 관리자: {$username}";
// 성공일 경우 추가 정보
if ($success) {
diff --git a/adm/service.php b/adm/service.php
index 055dd3ded..06cf509f6 100644
--- a/adm/service.php
+++ b/adm/service.php
@@ -32,16 +32,6 @@ include_once('./admin.head.php');
-
-
-
-
카카오톡 발송 서비스
-
주문이나 배송시에 상점운영자 또는 고객에게 휴대폰으로 카카오톡을 발송합니다. 연동회원 으로 선택한 후 링크아이디 [SIRSOFT ]를 입력해 주세요.
-
-
-
-
-
diff --git a/adm/shop_admin/itemform.php b/adm/shop_admin/itemform.php
index 1ebf105eb..0f6ec2a11 100644
--- a/adm/shop_admin/itemform.php
+++ b/adm/shop_admin/itemform.php
@@ -680,9 +680,9 @@ $(function(){
- 재입고 알림
+ 재입고SMS 알림
-
+
> 예
diff --git a/adm/shop_admin/itemstocksms.php b/adm/shop_admin/itemstocksms.php
index f05e0b370..1adbbd14f 100644
--- a/adm/shop_admin/itemstocksms.php
+++ b/adm/shop_admin/itemstocksms.php
@@ -4,7 +4,7 @@ include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "r");
-$g5['title'] = '재입고 알림';
+$g5['title'] = '재입고SMS 알림';
include_once (G5_ADMIN_PATH.'/admin.head.php');
// 테이블 생성
@@ -24,12 +24,6 @@ if(!sql_query(" select ss_id from {$g5['g5_shop_item_stocksms_table']} limit 1",
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);
}
-// 채널 구분 (1=SMS, 2=알림톡)
-if(!sql_query(" select ss_channel from {$g5['g5_shop_item_stocksms_table']} limit 1", false)) {
- sql_query(" ALTER TABLE `{$g5['g5_shop_item_stocksms_table']}`
- ADD `ss_channel` tinyint(4) NOT NULL DEFAULT '1' AFTER `ss_ip` ", true);
-}
-
$doc = isset($_GET['doc']) ? clean_xss_tags($_GET['doc'], 1, 1) : '';
$sort1 = (isset($_GET['sort1']) && in_array($_GET['sort1'], array('it_id', 'ss_hp', 'ss_send', 'ss_send_time', 'ss_datetime'))) ? $_GET['sort1'] : 'ss_send';
$sort2 = (isset($_GET['sort2']) && in_array($_GET['sort2'], array('desc', 'asc'))) ? $_GET['sort2'] : 'asc';
@@ -115,9 +109,8 @@ $listall = '전체목
상품명
휴대폰번호
- 전송결과
- 전송채널
- 전송일시
+ SMS전송
+ SMS전송일시
등록일시
@@ -146,14 +139,13 @@ $listall = '전체목
-
자료가 없습니다. ';
+ echo '자료가 없습니다. ';
?>
@@ -165,10 +157,6 @@ $listall = '
전체목
-
-
-
-
@@ -189,8 +177,6 @@ function fitemstocksms_submit(f)
return confirm("선택한 자료를 정말 삭제하시겠습니까?");
case "선택SMS전송":
return confirm("선택한 자료에 대해서 SMS로 재입고 알림을 전송하시겠습니까?");
- case "선택알림톡전송":
- return confirm("선택한 자료에 대해서 알림톡으로 재입고 알림을 전송하시겠습니까?");
default:
return true;
}
diff --git a/adm/shop_admin/itemstocksmsupdate.php b/adm/shop_admin/itemstocksmsupdate.php
index 5cfbe5f82..27cbde6d9 100644
--- a/adm/shop_admin/itemstocksmsupdate.php
+++ b/adm/shop_admin/itemstocksmsupdate.php
@@ -45,8 +45,7 @@ if ($_POST['act_button'] == "선택SMS전송") {
// SMS 전송으로 변경함
$sql = " update {$g5['g5_shop_item_stocksms_table']}
set ss_send = '1',
- ss_send_time = '".G5_TIME_YMDHIS."',
- ss_channel = '1'
+ ss_send_time = '".G5_TIME_YMDHIS."'
where ss_id = '{$ss_id}' ";
sql_query($sql);
}
@@ -99,52 +98,6 @@ if ($_POST['act_button'] == "선택SMS전송") {
$SMS->Init(); // 보관하고 있던 결과값을 지웁니다.
}
}
-} else if ($_POST['act_button'] == "선택알림톡전송") {
- // 알림톡 발송 BEGIN: 재입고알림(CU-ST01) -------------------------------------
- auth_check_menu($auth, $sub_menu, 'w');
- include_once(G5_KAKAO5_PATH.'/kakao5.lib.php');
-
- if (!$config['cf_kakaotalk_use']) {
- alert('카카오톡 사용 설정이 되어 있지 않아 발송할 수 없습니다.\n[환경설정>기본환경설정>기본알림환경]에서 사용 설정을 해주세요.');
- } else {
- // 프리셋 정보 가져오기
- $alimtalk = get_alimtalk_preset_info('CU-ST01');
-
- if (empty($alimtalk['success'])) {
- alert('재입고 알림톡 설정이 되어 있지 않아 발송할 수 없습니다.\n[환경설정>알림톡프리셋 관리]에서 설정해주세요.');
- } else {
- for ($i=0; $i<$count_post_chk; $i++) {
-
- // 실제 번호를 넘김
- $k = isset($_POST['chk'][$i]) ? (int) $_POST['chk'][$i] : 0;
- $ss_id = isset($_POST['ss_id'][$k]) ? (int) $_POST['ss_id'][$k] : 0;
-
- $sql = " select a.ss_id, a.ss_hp, a.ss_send, b.it_id, b.it_name
- from {$g5['g5_shop_item_stocksms_table']} a left join {$g5['g5_shop_item_table']} b on ( a.it_id = b.it_id )
- where a.ss_id = '$ss_id' ";
- $row = sql_fetch($sql);
-
- if(!$row['ss_id'] || !$row['it_id'] || $row['ss_send'])
- continue;
-
- $conditions = ['it_id' => $row['it_id'], 'it_name' => get_text($row['it_name'])]; // 변수 치환 정보
-
- $cu_atk = send_alimtalk_preset('CU-ST01', ['rcv' => $row['ss_hp']], $conditions); // 회원
-
- // 성공한 건만 완료 처리
- if (!empty($cu_atk) && !empty($cu_atk['success']))
- {
- sql_query(" update {$g5['g5_shop_item_stocksms_table']}
- set ss_send = '1',
- ss_send_time = '".G5_TIME_YMDHIS."',
- ss_channel = '2'
- where ss_id = '{$ss_id}' ");
- }
- }
- }
- }
- // 알림톡 발송 END -------------------------------------------------------------
-
} else if ($_POST['act_button'] == "선택삭제") {
if ($is_admin != 'super')
diff --git a/adm/shop_admin/orderalimtalk.inc.php b/adm/shop_admin/orderalimtalk.inc.php
deleted file mode 100644
index aebdd57a0..000000000
--- a/adm/shop_admin/orderalimtalk.inc.php
+++ /dev/null
@@ -1,22 +0,0 @@
- $od_id, 'od_name' => $od_name, 'it_name' => $it_name_str]; // 변수 치환 정보
- $cu_atk = send_alimtalk_preset('CU-OR03', ['rcv' => $od_hp ?: $od['od_tel'], 'rcvnm' => $od_name], $conditions); // 회원
- // 알림톡 발송 END --------------------------------------------------------
-}
-
-// 배송 알림
-if($od_alimtalk_baesong_check){
- // 알림톡 발송 BEGIN: 배송중(CU-DE02) ------------------------------
- $conditions = ['od_id' => $od_id, 'od_name' => $od_name, 'it_name' => $it_name_str]; // 변수 치환 정보
- $cu_atk = send_alimtalk_preset('CU-DE02', ['rcv' => $od_hp ?: $od['od_tel'], 'rcvnm' => $od_name], $conditions); // 회원
- // 알림톡 발송 END --------------------------------------------------------
-}
\ No newline at end of file
diff --git a/adm/shop_admin/orderdeliveryupdate.php b/adm/shop_admin/orderdeliveryupdate.php
index 6b2886cd7..3030de506 100644
--- a/adm/shop_admin/orderdeliveryupdate.php
+++ b/adm/shop_admin/orderdeliveryupdate.php
@@ -3,7 +3,6 @@ $sub_menu = '400400';
include_once('./_common.php');
include_once('./admin.shop.lib.php');
include_once(G5_LIB_PATH.'/mailer.lib.php');
-include_once(G5_KAKAO5_PATH.'/kakao5.lib.php');
auth_check_menu($auth, $sub_menu, "w");
@@ -99,14 +98,6 @@ if(isset($_FILES['excelfile']['tmp_name']) && $_FILES['excelfile']['tmp_name'])
include(G5_SHOP_PATH.'/'.$od['od_pg'].'/escrow.register.php');
}
-
- // 알림톡 발송 BEGIN: 배송중(CU-DE02/AD-DE02) ------------------------------
- $it_name_str = get_alimtalk_cart_item_name($od_id); // 상품명
-
- $conditions = ['od_id' => $od_id, 'od_name' => $od['od_name'], 'it_name' => $it_name_str]; // 변수 치환 정보
- $cu_atk = send_alimtalk_preset('CU-DE02', ['rcv' => $od['od_hp'] ?: $od['od_tel'], 'rcvnm' => $od['od_name']], $conditions); // 회원
- $ad_atk = send_admin_alimtalk('AD-DE02', 'super', $conditions); // 관리자
- // 알림톡 발송 END --------------------------------------------------------
}
}
diff --git a/adm/shop_admin/orderform.php b/adm/shop_admin/orderform.php
index baffdc4de..ed763744e 100644
--- a/adm/shop_admin/orderform.php
+++ b/adm/shop_admin/orderform.php
@@ -1,7 +1,6 @@
주문, 입금, 준비, 배송, 완료는 장바구니와 주문서 상태를 모두 변경하지만, 취소, 반품, 품절은 장바구니의 상태만 변경하며, 주문서 상태는 변경하지 않습니다.
개별적인(이곳에서의) 상태 변경은 모든 작업을 수동으로 처리합니다. 예를 들어 주문에서 입금으로 상태 변경시 입금액(결제금액)을 포함한 모든 정보는 수동 입력으로 처리하셔야 합니다.
-
- * 알림톡 프리셋 : [준비, 완료, 취소, 반품, 품절] 은 자동 으로 발송되며, [입금완료, 배송] 은 결제상세정보에서 수동 으로 발송하셔야 합니다.
-
@@ -724,15 +720,6 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
-
-
-
- 입금완료 알림톡전송
-
-
-
@@ -841,16 +828,6 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
-
-
-
- 배송 알림톡전송
-
-
-
diff --git a/adm/shop_admin/orderformcartupdate.php b/adm/shop_admin/orderformcartupdate.php
index 84bcb5681..4d47da98b 100644
--- a/adm/shop_admin/orderformcartupdate.php
+++ b/adm/shop_admin/orderformcartupdate.php
@@ -1,7 +1,6 @@
'DE01', '완료' => 'DE03', '취소' => 'OR05', '반품' => 'OR06', '품절' => 'OR07' ]; // 알림톡 코드 매핑
-
- // 처리상품명 및 치환 변수 값 세팅
- $order = sql_fetch("select * from {$g5['g5_shop_order_table']} where od_id = '$od_id'"); // 주문 정보 조회
- $it_name = !empty($od_names) ? $od_names[0] . (count($od_names) > 1 ? ' 외 ' . (count($od_names) - 1) . '건' : '') : ''; // 상품명
- $conditions = [ 'od_id' => $od_id, 'it_name' => $it_name ]; // 변수 치환 정보
-
- if (isset($alimtalk_map[$_POST['ct_status']])) {
- $status_code = $alimtalk_map[$_POST['ct_status']];
-
- // 고객 발송 (준비, 완료, 취소, 반품, 품절 공통)
- $cu_atk = send_alimtalk_preset('CU-' . $status_code, ['rcv' => $order['od_hp'] ?: $order['od_tel'], 'rcvnm' => $order['od_name']], $conditions); // 회원
-
- // 관리자 발송 (취소만)
- if ($_POST['ct_status'] === '취소') {
- $ad_atk = send_admin_alimtalk('AD-' . $status_code, 'super', $conditions); // 관리자
- }
- }
- // 알림톡 발송 END -------------------------------------------------------------------------------------------------------------------
-
+} else {
// 1.06.06
$od = sql_fetch(" select od_receipt_point from {$g5['g5_shop_order_table']} where od_id = '$od_id' ");
if ($od['od_receipt_point'])
diff --git a/adm/shop_admin/orderformreceiptupdate.php b/adm/shop_admin/orderformreceiptupdate.php
index de2ca0be8..7bfb6b787 100644
--- a/adm/shop_admin/orderformreceiptupdate.php
+++ b/adm/shop_admin/orderformreceiptupdate.php
@@ -161,9 +161,6 @@ include "./ordermail.inc.php";
define("_ORDERSMS_", true);
include "./ordersms.inc.php";
-// 알림톡 전송 문자전송
-define("_ORDERALIMTALK_", true);
-include "./orderalimtalk.inc.php";
// 에스크로 배송처리
if($posts['od_tno'] && $posts['od_escrow'] == 1)
diff --git a/adm/shop_admin/orderlistupdate.php b/adm/shop_admin/orderlistupdate.php
index 1aa492e91..20929a3b1 100644
--- a/adm/shop_admin/orderlistupdate.php
+++ b/adm/shop_admin/orderlistupdate.php
@@ -3,7 +3,6 @@ $sub_menu = '400400';
include_once('./_common.php');
include_once('./admin.shop.lib.php');
include_once(G5_LIB_PATH.'/mailer.lib.php');
-include_once(G5_KAKAO5_PATH.'/kakao5.lib.php');
check_admin_token();
@@ -49,7 +48,6 @@ for ($i=0; $i<$count_post_chk; $i++)
$current_status = $od['od_status'];
$change_status = isset($_POST['od_status']) ? clean_xss_tags($_POST['od_status'], 1, 1) : '';
- $it_name_str = get_alimtalk_cart_item_name($od_id); // 상품명
switch ($current_status)
{
@@ -71,12 +69,6 @@ for ($i=0; $i<$count_post_chk; $i++)
}
}
- // 알림톡 발송 BEGIN: 입금완료(CU-OR03/AD-OR03) ------------------------------
- $conditions = ['od_id' => $od_id, 'od_name' => $od['od_name'], 'it_name' => $it_name_str]; // 변수 치환 정보
- $cu_atk = send_alimtalk_preset('CU-OR03', ['rcv' => $od['od_hp'] ?: $od['od_tel'], 'rcvnm' => $od['od_name']], $conditions); // 회원
- $ad_atk = send_admin_alimtalk('AD-OR03', 'super', $conditions); // 관리자
- // 알림톡 발송 END --------------------------------------------------------
-
// 메일
if($config['cf_email_use'] && $od_send_mail)
include './ordermail.inc.php';
@@ -86,12 +78,6 @@ for ($i=0; $i<$count_post_chk; $i++)
case '입금' :
if ($change_status != '준비') continue 2;
change_status($od_id, '입금', '준비');
-
- // 알림톡 발송 BEGIN: 배송준비(CU-DE01/AD-DE01) ------------------------------
- $conditions = ['od_id' => $od_id, 'it_name' => $it_name_str]; // 변수 치환 정보
- $cu_atk = send_alimtalk_preset('CU-DE01', ['rcv' => $od['od_hp'] ?: $od['od_tel'], 'rcvnm' => $od['od_name']], $conditions); // 회원
- $ad_atk = send_admin_alimtalk('AD-DE01', 'super', $conditions); // 관리자
- // 알림톡 발송 END -------------------------------------------------------------
break;
case '준비' :
@@ -129,11 +115,6 @@ for ($i=0; $i<$count_post_chk; $i++)
include(G5_SHOP_PATH.'/'.$od['od_pg'].'/escrow.register.php');
}
- // 알림톡 발송 BEGIN: 배송중(CU-DE02/AD-DE02) -------------------------------------
- $conditions = ['od_id' => $od_id, 'it_name' => $it_name_str]; // 변수 치환 정보
- $cu_atk = send_alimtalk_preset('CU-DE02', ['rcv' => $od['od_hp'] ?: $od['od_tel'], 'rcvnm' => $od['od_name']], $conditions); // 회원
- $ad_atk = send_admin_alimtalk('AD-DE02', 'super', $conditions); // 관리자
- // 알림톡 발송 END -------------------------------------------------------------
break;
case '배송' :
@@ -158,12 +139,6 @@ for ($i=0; $i<$count_post_chk; $i++)
sql_query($sql3);
}
*/
-
- // 알림톡 발송 BEGIN: 배송완료(CU-DE03/AD-DE03) -------------------------------------
- $conditions = ['od_id' => $od_id, 'it_name' => $it_name_str]; // 변수 치환 정보
- $cu_atk = send_alimtalk_preset('CU-DE03', ['rcv' => $od['od_hp'] ?: $od['od_tel'], 'rcvnm' => $od['od_name']], $conditions); // 회원
- $ad_atk = send_admin_alimtalk('AD-DE03', 'super', $conditions); // 관리자
- // 알림톡 발송 END -------------------------------------------------------------
break;
} // switch end
diff --git a/bbs/poll_etc_update.php b/bbs/poll_etc_update.php
index 8e47e5954..772826872 100644
--- a/bbs/poll_etc_update.php
+++ b/bbs/poll_etc_update.php
@@ -43,12 +43,6 @@ if ($w == '')
$from_email = $member['mb_email'] ? $member['mb_email'] : $admin['mb_email'];
mailer($name, $from_email, $admin['mb_email'], '['.$config['cf_title'].'] 설문조사 기타의견 메일', $content, 1);
}
-
- // 알림톡 발송 BEGIN: 기타의견 작성(AD-VO01) -------------------------------------
- include_once(G5_KAKAO5_PATH.'/kakao5.lib.php');
- $conditions = ['po_id' => $po_id, 'pc_id' => $pc_id]; // 변수 치환 정보
- $ad_atk = send_admin_alimtalk('AD-VO01', 'super', $conditions); // 관리자
- // 알림톡 발송 END -------------------------------------------------------------
}
else if ($w == 'd')
{
diff --git a/bbs/qawrite_update.php b/bbs/qawrite_update.php
index 7c3d8825b..4c6902936 100644
--- a/bbs/qawrite_update.php
+++ b/bbs/qawrite_update.php
@@ -472,25 +472,6 @@ if(($w == '' || $w == 'r') && trim($qaconfig['qa_admin_email'])) {
mailer($config['cf_admin_email_name'], $qa_email, $qaconfig['qa_admin_email'], $subject, $content, 1);
}
-// 알림톡 발송 BEGIN: 1:1 문의(CU-IQ01/CU-IQ02/AD-IQ01) -------------------------------------
-include_once(G5_KAKAO5_PATH.'/kakao5.lib.php');
-$conditions = ['qa_id' => $qa_id, 'qa_name' => $write['qa_name'] ?? $member['mb_nick'], 'mb_name' => $write['qa_name'] ?? $member['mb_nick']]; // 변수 치환 정보
-
-// 답변글은 질문 등록자에게 전송
-if ($w == 'a' && !empty($write['qa_hp'])) {
- $cu_atk = send_alimtalk_preset('CU-IQ02', ['rcv' => $write['qa_hp'], 'rcvnm' => $write['qa_name']], $conditions); // 회원
-}
-
-// 문의글 등록시 질문등록자/관리자에게 전송
-if ($w == '' || $w == 'r') {
- $ad_atk = send_admin_alimtalk('AD-IQ01', 'super', $conditions); // 관리자
-
- if (!empty($qa_hp)) {
- $cu_atk = send_alimtalk_preset('CU-IQ01', ['rcv' => $qa_hp, 'rcvnm' => $member['mb_nick']], $conditions); // 회원
- }
-}
-// 알림톡 발송 END -------------------------------------------------------------
-
if($w == 'a')
$result_url = G5_BBS_URL.'/qaview.php?qa_id='.$qa_id.$qstr;
else if($w == 'u' && $write['qa_type'])
diff --git a/bbs/register_form_update.php b/bbs/register_form_update.php
index 3a574df67..76dc5c1be 100644
--- a/bbs/register_form_update.php
+++ b/bbs/register_form_update.php
@@ -76,10 +76,6 @@ $mb_addr_jibeon = preg_match("/^(N|R)$/", $mb_addr_jibeon) ? $mb_addr_jibeon : '
$mb_marketing_agree = isset($_POST['mb_marketing_agree']) ? trim($_POST['mb_marketing_agree']) : "0";
$mb_thirdparty_agree = isset($_POST['mb_thirdparty_agree']) ? trim($_POST['mb_thirdparty_agree']) : "0";
-$mb_board_post = isset($_POST['mb_board_post']) ? trim($_POST['mb_board_post']) : "0";
-$mb_board_reply = isset($_POST['mb_board_reply']) ? trim($_POST['mb_board_reply']) : "0";
-$mb_board_comment = isset($_POST['mb_board_comment']) ? trim($_POST['mb_board_comment']) : "0";
-$mb_board_recomment = isset($_POST['mb_board_recomment']) ? trim($_POST['mb_board_recomment']) : "0";
run_event('register_form_update_before', $mb_id, $w);
@@ -258,11 +254,7 @@ if ($w == '') {
mb_9 = '{$mb_9}',
mb_10 = '{$mb_10}',
mb_marketing_agree = '{$mb_marketing_agree}',
- mb_thirdparty_agree = '{$mb_thirdparty_agree}',
- mb_board_post = '{$mb_board_post}',
- mb_board_reply = '{$mb_board_reply}',
- mb_board_comment = '{$mb_board_comment}',
- mb_board_recomment = '{$mb_board_recomment}'
+ mb_thirdparty_agree = '{$mb_thirdparty_agree}'
{$sql_certify} ";
// 이메일 인증을 사용하지 않는다면 이메일 인증시간을 바로 넣는다
@@ -366,17 +358,6 @@ if ($w == '') {
insert_member_cert_history($mb_id, $mb_name, $mb_hp, get_session('ss_cert_birth'), get_session('ss_cert_type') ); // 본인인증 후 정보 수정 시 내역 기록
}
- // 알림톡 발송 BEGIN: 회원가입 (CU-MB01/AD-MB01) -------------------------------------
- include_once(G5_KAKAO5_PATH.'/kakao5.lib.php');
- $conditions = ['mb_id' => $mb_id]; // 변수 치환 정보
-
- $ad_atk = send_admin_alimtalk('AD-MB01', 'super', $conditions); // 관리자
-
- // 회원 - 휴대폰 번호가 있을 경우만
- if (!empty($mb_hp)) {
- $cu_atk = send_alimtalk_preset('CU-MB01', ['rcv' => $mb_hp, 'rcvnm' => $mb_name], $conditions); // 회원
- }
- // 알림톡 발송 END --------------------------------------------------------
} else if ($w == 'u') {
if (!trim(get_session('ss_mb_id')))
alert('로그인 되어 있지 않습니다.');
@@ -465,11 +446,7 @@ if ($w == '') {
mb_9 = '{$mb_9}',
mb_10 = '{$mb_10}',
mb_marketing_agree = '{$mb_marketing_agree}',
- mb_thirdparty_agree = '{$mb_thirdparty_agree}',
- mb_board_post = '{$mb_board_post}',
- mb_board_reply = '{$mb_board_reply}',
- mb_board_comment = '{$mb_board_comment}',
- mb_board_recomment = '{$mb_board_recomment}'
+ mb_thirdparty_agree = '{$mb_thirdparty_agree}'
{$sql_password}
{$sql_nick_date}
{$sql_open_date}
diff --git a/bbs/write_comment_update.php b/bbs/write_comment_update.php
index c164c8e25..ed1984251 100644
--- a/bbs/write_comment_update.php
+++ b/bbs/write_comment_update.php
@@ -260,56 +260,6 @@ if ($w == 'c') // 댓글 입력
}
}
- // 알림톡 발송 BEGIN: 새 댓글 작성(CU-BO02,CU-BO03) -------------------------------------
- if ($config['cf_kakaotalk_use'] && $board['bo_use_kakaotalk']) {
- include_once(G5_KAKAO5_PATH.'/kakao5.lib.php');
-
- // 댓글 작성자 ID (회원/게스트 모두 고려)
- $current_mb_id = $member['mb_id'] ?? '';
-
- // 방금 저장된 댓글 레코드 로드 (실패 시 중단)
- $comment = get_write($write_table, $comment_id);
- if ($comment && !empty($comment['wr_id'])) {
- $conditions = ['bo_table' => $bo_table, 'wr_id'=> $wr['wr_id'], 'wr_name_comment' => $comment['wr_name'] ?? '']; // 변수 치환 정보
-
- // 1) 원글 작성자 알림 (CU-BO02)
- $post_mb_id = $wr['mb_id'] ?? '';
- if ($post_mb_id !== '' && $post_mb_id !== $current_mb_id) {
- $mb_post = get_member($post_mb_id);
- if (!empty($mb_post['mb_board_comment']) && !empty($mb_post['mb_hp'])) {
- $cu_atk = send_alimtalk_preset('CU-BO02', ['rcv' => $mb_post['mb_hp'], 'rcvnm' => ($mb_post['mb_name'] ?? $mb_post['mb_nick'] ?? '')], $conditions);
- }
- }
-
- // 2) 직속 부모 댓글 작성자 알림 (CU-BO03)
- $reply = $comment['wr_comment_reply'] ?? '';
- if ($reply !== '') {
- $parent_reply_esc = sql_escape_string(substr($reply, 0, -1));
- $wr_parent = $wr['wr_id'];
- $wr_comment = $comment['wr_comment'];
-
- $sql_parent = "
- SELECT wr_id, mb_id
- FROM {$write_table}
- WHERE wr_parent = {$wr_parent}
- AND wr_is_comment = 1
- AND wr_comment = {$wr_comment}
- AND wr_comment_reply = '{$parent_reply_esc}'
- LIMIT 1
- ";
- $pr = sql_fetch($sql_parent);
-
- if (!empty($pr['mb_id']) && $pr['mb_id'] !== $current_mb_id && $pr['mb_id'] !== ($post_mb_id ?: '')) {
- $mb_parent = get_member($pr['mb_id']);
- if (!empty($mb_parent['mb_board_recomment']) && !empty($mb_parent['mb_hp'])) {
- $cu_atk = send_alimtalk_preset('CU-BO03', ['rcv' => $mb_parent['mb_hp'], 'rcvnm' => ($mb_parent['mb_name'] ?? $mb_parent['mb_nick'] ?? '')], $conditions);
- }
- }
- }
- }
- }
- // 알림톡 발송 END ------------------------------------------------------------------
-
// SNS 등록
include_once("./write_comment_update.sns.php");
if($wr_facebook_user || $wr_twitter_user) {
diff --git a/bbs/write_update.php b/bbs/write_update.php
index 9e7c2a64a..9b169d732 100644
--- a/bbs/write_update.php
+++ b/bbs/write_update.php
@@ -756,45 +756,6 @@ if (!($w == 'u' || $w == 'cu') && $config['cf_email_use'] && $board['bo_use_emai
}
}
-// 알림톡 발송 BEGIN: 새 게시글/답변 작성 (CU-BO01,CU-BO04/AD-BO01,AD-BO02,AD-BO03) -------------------------------------
-if ($config['cf_kakaotalk_use'] && $board['bo_use_kakaotalk'])
-{
- include_once(G5_KAKAO5_PATH.'/kakao5.lib.php');
- $conditions = ['bo_table' => $bo_table, 'wr_id' => $wr_id, 'mb_id' => $mb_id]; // 변수 치환 정보
-
- // 새 게시글 작성
- if ($w === '') {
- // 관리자 알림
- $ad_atk_super = send_admin_alimtalk('AD-BO01', 'super', $conditions); // 관리자
- $ad_atk_group = send_admin_alimtalk('AD-BO02', 'group', $conditions, ['super']); // 그룹 관리자
- $ad_atk_board = send_admin_alimtalk('AD-BO03', 'board', $conditions, ['super', 'group']); // 게시판 관리자
-
- // 작성자 본인 알림
- if (!empty($mb_id)) {
- $writer = get_member($mb_id);
- if ($writer && !empty($writer['mb_board_post']) && !empty($writer['mb_hp'])) {
- $cu_atk = send_alimtalk_preset('CU-BO01', ['rcv' => $writer['mb_hp'], 'rcvnm' => ($writer['mb_name'] ?? '')], $conditions); // 회원
- }
- }
- }
-
- // 답변 작성
- else if ($w === 'r') {
- $parent_mb_id = $wr['mb_id'] ?? '';
-
- if ($parent_mb_id && $parent_mb_id !== ($member['mb_id'] ?? '')) {
- $conditions['mb_id'] = $parent_mb_id;
- $conditions['wr_subject'] = $wr['wr_subject'];
- $writer = get_member($parent_mb_id);
-
- if ($writer && !empty($writer['mb_board_reply']) && !empty($writer['mb_hp'])) {
- $cu_atk = send_alimtalk_preset('CU-BO04', ['rcv' => $writer['mb_hp'], 'rcvnm' => ($writer['mb_name'] ?? '')], $conditions); // 회원
- }
- }
- }
-}
-// 알림톡 발송 END --------------------------------------------------------
-
// 사용자 코드 실행
@include_once($board_skin_path.'/write_update.skin.php');
@include_once($board_skin_path.'/write_update.tail.skin.php');
diff --git a/extend/kakao5.extend.php b/extend/kakao5.extend.php
deleted file mode 100644
index 6355b52c1..000000000
--- a/extend/kakao5.extend.php
+++ /dev/null
@@ -1,329 +0,0 @@
- ['url' => G5_URL.'/shop/orderinquiryview.php?od_id={od_id}']
-// 위의 경우 $conditions['od_id'] 값이 있어야 {od_id}가 실제 주문번호로 치환됩니다.
-//------------------------------------------------------------------------------
-$kakao5_preset_button_links = [
- // 공통
- '#{홈페이지}' => [
- 'url' => G5_URL,
- 'description' => '홈페이지 메인으로 이동하는 링크입니다.'
- ],
- '#{로그인}' => [
- 'url' => G5_URL.'/bbs/login.php',
- 'description' => '로그인 페이지로 이동하는 링크입니다.'
- ],
- '#{마이페이지}' => [
- 'url' => G5_URL.'/shop/mypage.php',
- 'description' => '마이페이지로 이동하는 링크입니다.'
- ],
-
- // 게시판
- '#{게시판}' => [
- 'url' => G5_URL.'/bbs/board.php?bo_table={bo_table}',
- 'description' => '특정 게시판 목록으로 이동하는 링크입니다. {bo_table}은 게시판 아이디로 자동 치환됩니다.'
- ],
- '#{게시글}' => [
- 'url' => G5_URL.'/bbs/board.php?bo_table={bo_table}&wr_id={wr_id}',
- 'description' => '특정 게시글 상세 페이지로 이동하는 링크입니다. {bo_table}, {wr_id}는 자동 치환됩니다.'
- ],
-
- // 주문/쇼핑몰
- '#{주문내역}' => [
- 'url' => G5_URL.'/shop/orderinquiry.php',
- 'description' => '주문내역(리스트) 페이지로 이동하는 링크입니다.'
- ],
- '#{주문상세}' => [
- 'url' => G5_URL.'/shop/orderinquiryview.php?od_id={od_id}',
- 'description' => '주문상세 페이지로 이동하는 링크입니다. {od_id}는 주문번호로 자동 치환됩니다.'
- ],
- '#{장바구니}' => [
- 'url' => G5_URL.'/shop/cart.php',
- 'description' => '장바구니 페이지로 이동하는 링크입니다.'
- ],
- '#{상품상세}' => [
- 'url' => G5_URL.'/shop/item.php?it_id={it_id}',
- 'description' => '재입고된 상품의 상세 페이지로 이동하는 링크입니다. {it_id}는 상품코드로 자동 치환됩니다.'
- ],
-
- // 1:1 문의
- '#{문의상세}' => [
- 'url' => G5_URL.'/bbs/qaview.php?qa_id={qa_id}',
- 'description' => '1:1 문의 상세 페이지로 이동하는 링크입니다. {qa_id}는 문의글 ID로 자동 치환됩니다.'
- ],
-
- // 관리자
- '#{관리자주문내역}' => [
- 'url' => G5_ADMIN_URL.'/shop_admin/orderlist.php',
- 'description' => '관리자 주문내역(리스트) 페이지로 이동하는 링크입니다.'
- ],
- '#{관리자주문상세}' => [
- 'url' => G5_ADMIN_URL.'/shop_admin/orderform.php?od_id={od_id}',
- 'description' => '관리자 주문상세 페이지로 이동하는 링크입니다. {od_id}는 주문번호로 자동 치환됩니다.'
- ],
- '#{투표상세}' => [
- 'url' => G5_ADMIN_URL.'/poll_form.php?w=u&po_id={po_id}',
- 'description' => '관리자 투표 상세 페이지로 이동하는 링크입니다. {po_id}는 투표 ID로 자동 치환됩니다.'
- ],
-];
-
-//------------------------------------------------------------------------------
-// 알림톡 프리셋 변수 목록 정의 파일
-// - 템플릿에서 사용할 수 있는 변수들의 목록과 각 변수의 설명, 실제 데이터베이스 테이블 및 컬럼 정보를 정의합니다.
-// - 각 카테고리별로 사용 가능한 변수와 설명, 실제 매핑되는 DB 테이블/컬럼 정보를 배열로 관리합니다.
-// - 알림톡 메시지 전송 시, 템플릿 내 #{변수명} 형태로 사용되며, 해당 변수에 맞는 실제 값으로 치환됩니다.
-//------------------------------------------------------------------------------
-$kakao5_preset_variable_list = [
- [
- 'category' => '공통',
- 'variables' => [
- [
- 'name' => '#{회사명}',
- 'description' => '해당 메시지를 발송하는 회사명(브랜드명)이 표시됩니다. (예시 : [마이쇼핑])',
- 'column' => 'cf_title',
- 'table' => 'config_table',
- 'condition_key' => ''
- ],
- ],
- ],
- [
- 'category' => '회원',
- 'variables' => [
- [
- 'name' => '#{이름}',
- 'description' => '회원가입 시 입력한 고객님의 이름이 표시됩니다. (예시 : [홍길동])',
- 'column' => 'mb_name',
- 'table' => 'member_table',
- 'condition_key' => 'mb_id'
- ],
- [
- 'name' => '#{회원아이디}',
- 'description' => '회원가입 시 입력한 아이디가 표시됩니다. (예시 : [user1234])',
- 'table' => 'member_table',
- 'column' => 'mb_id',
- 'condition_key' => 'mb_id'
- ],
- [
- 'name' => '#{닉네임}',
- 'description' => '회원가입 시 입력한 닉네임이 표시됩니다. (예시 : [길동이])',
- 'table' => 'member_table',
- 'column' => 'mb_nick',
- 'condition_key' => 'mb_id'
- ],
- [
- 'name' => '#{이메일}',
- 'description' => '회원가입 시 입력한 이메일 주소가 표시됩니다. (예시 : [hong@example.com])',
- 'table' => 'member_table',
- 'column' => 'mb_email',
- 'condition_key' => 'mb_id'
- ],
- [
- 'name' => '#{가입일}',
- 'description' => '회원가입한 날짜가 표시됩니다. (예시 : [2024-06-20])',
- 'column' => 'mb_datetime',
- 'table' => 'member_table',
- 'condition_key' => 'mb_id'
- ]
- ]
- ],
- [
- 'category' => '게시판',
- 'variables' => [
- [
- 'name' => '#{게시판명}',
- 'description' => '게시판의 제목이 표시됩니다. (예시 : [공지사항])',
- 'table' => 'board_table',
- 'column' => 'bo_subject',
- 'condition_key' => 'bo_table'
- ],
- [
- 'name' => '#{게시글제목}',
- 'description' => '게시글의 제목이 표시됩니다. (예시 : [서비스 점검 안내])',
- 'table' => 'write_prefix',
- 'table_placeholder' => '{bo_table}',
- 'column' => 'wr_subject',
- 'condition_key' => 'wr_id'
- ],
- [
- 'name' => '#{작성자명}',
- 'description' => '게시글 작성자의 이름이 표시됩니다. (예시 : [홍길동])',
- 'table' => 'write_prefix',
- 'table_placeholder' => '{bo_table}',
- 'column' => 'wr_name',
- 'condition_key' => 'wr_id'
- ],
- [
- 'name' => '#{작성일시}',
- 'description' => '게시글이 작성된 일시가 표시됩니다. (예시 : [2024-06-20 14:35:20])',
- 'table' => 'write_prefix',
- 'table_placeholder' => '{bo_table}',
- 'column' => 'wr_datetime',
- 'condition_key' => 'wr_id',
- ],
- [
- 'name' => '#{댓글작성자}',
- 'description' => '댓글 작성자의 이름이 표시됩니다. (예시 : [이몽룡])',
- 'column' => 'wr_name_comment',
- ],
- ]
- ],
- [
- 'category' => '주문',
- 'variables' => [
- [
- 'name' => '#{주문자명}',
- 'description' => '주문 시 입력한 주문자의 이름이 표시됩니다. (예시 : [홍길동])',
- 'column' => 'od_name',
- 'table' => 'g5_shop_order_table',
- 'condition_key' => 'od_id'
- ],
- [
- 'name' => '#{주문번호}',
- 'description' => '해당 주문의 주문번호가 표시됩니다. (예시 : [202406190001])',
- 'column' => 'od_id',
- 'table' => 'g5_shop_order_table',
- 'condition_key' => 'od_id'
- ],
- [
- 'name' => '#{상품명}',
- 'description' => '주문한 또는 처리된 상품명이 표시됩니다. 상품이 여러개인 경우 "외 N건" 형식으로 표시됩니다. (예시: [아메리카노 외 2건])
- - 주문 시 : 주문한 상품명이 표시됩니다.
- - 주문취소 / 반품 / 품절 처리 시 : 해당 처리 대상 상품명만 표시됩니다.',
- 'column' => 'it_name',
- 'table' => 'g5_shop_cart_table',
- 'condition_key' => 'od_id'
- ],
- [
- 'name' => '#{주문금액}',
- 'description' => '주문의 총 결제금액이 표시됩니다. (예시 : [120,000])',
- 'column' => 'od_receipt_price',
- 'table' => 'g5_shop_order_table',
- 'condition_key' => 'od_id',
- 'is_price' => true
- ],
- [
- 'name' => '#{취소사유}',
- 'description' => '고객이 주문취소 시 입력한 취소사유가 표시됩니다. (예시: [단순변심])',
- 'column' => 'cancel_memo',
- ]
- ]
- ],
- [
- 'category' => '주문 - 무통장 입금 관련',
- 'variables' => [
- [
- 'name' => '#{은행계좌번호}',
- 'description' => '무통장 입금 시 제공되는 은행명과 계좌명이 표시됩니다. (예시 : [우리은행 123-456-7890])',
- 'column' => 'od_bank_account',
- 'table' => 'g5_shop_order_table',
- 'condition_key' => 'od_id'
- ],
- [
- 'name' => '#{입금자명}',
- 'description' => '입금자가 입력한 이름이 표시됩니다. (예시 : [홍길동])',
- 'column' => 'od_deposit_name',
- 'table' => 'g5_shop_order_table',
- 'condition_key' => 'od_id'
- ]
- ]
- ],
- [
- 'category' => '배송',
- 'variables' => [
- [
- 'name' => '#{택배회사}',
- 'description' => '배송을 진행하는 택배사 이름이 표시됩니다. (예시 : [CJ대한통운])',
- 'table' => 'g5_shop_order_table',
- 'column' => 'od_delivery_company',
- 'condition_key' => 'od_id'
- ],
- [
- 'name' => '#{운송장번호}',
- 'description' => '배송 송장번호가 표시됩니다. (예시 : [123456789012])',
- 'column' => 'od_invoice',
- 'table' => 'g5_shop_order_table',
- 'condition_key' => 'od_id'
- ]
- ]
- ],
- [
- 'category' => '투표',
- 'variables' => [
- [
- 'name' => '#{투표제목}',
- 'description' => '해당 의견이 속한 투표의 제목입니다. (예시 : [서비스 만족도 조사])',
- 'table' => 'poll_table',
- 'column' => 'po_subject',
- 'condition_key' => 'po_id'
- ],
- [
- 'name' => '#{응답자명}',
- 'description' => '기타 의견을 작성한 응답자의 이름입니다. (예시 : [홍길동])',
- 'table' => 'poll_etc_table',
- 'column' => 'pc_name',
- 'condition_key' => 'pc_id'
- ],
- [
- 'name' => '#{응답일시}',
- 'description' => '기타 의견이 작성된 일시입니다. (예시 : [2024-06-20 14:35:20])',
- 'table' => 'poll_etc_table',
- 'column' => 'pc_datetime',
- 'condition_key' => 'pc_id'
- ],
- [
- 'name' => '#{응답내용}',
- 'description' => '기타 의견으로 작성된 텍스트입니다. (예시 : [서비스가 매우 만족스러웠습니다.])',
- 'table' => 'poll_etc_table',
- 'column' => 'pc_idea',
- 'condition_key' => 'pc_id'
- ],
- ]
- ],
- [
- 'category' => '1:1 문의',
- 'variables' => [
- [
- 'name' => '#{문의제목}',
- 'description' => '1:1 문의 제목이 표시됩니다. (예시 : [상품 환불 관련 문의])',
- 'table' => 'qa_content_table',
- 'column' => 'qa_subject',
- 'condition_key' => 'qa_id'
- ],
- [
- 'name' => '#{문의자명}',
- 'description' => '1:1 문의를 작성한 회원의 이름이 표시됩니다. (예시 : [홍길동])',
- 'table' => 'qa_content_table',
- 'column' => 'qa_name',
- 'condition_key' => 'qa_id'
- ],
- [
- 'name' => '#{문의일시}',
- 'description' => '회원이 1:1 문의를 작성한 일시가 표시됩니다. (예시 : [2024-06-20 14:35:20])',
- 'table' => 'qa_content_table',
- 'column' => 'qa_datetime',
- 'condition_key' => 'qa_id'
- ],
- ]
- ],
-];
\ No newline at end of file
diff --git a/install/gnuboard5.sql b/install/gnuboard5.sql
index 8c2fdb570..98c00e96a 100644
--- a/install/gnuboard5.sql
+++ b/install/gnuboard5.sql
@@ -92,7 +92,6 @@ CREATE TABLE IF NOT EXISTS `g5_board` (
`bo_notice` text NOT NULL,
`bo_upload_count` tinyint(4) NOT NULL DEFAULT '0',
`bo_use_email` tinyint(4) NOT NULL DEFAULT '0',
- `bo_use_kakaotalk` tinyint(4) NOT NULL DEFAULT '0',
`bo_use_cert` enum('','cert','adult','hp-cert','hp-adult') NOT NULL DEFAULT '',
`bo_use_sns` tinyint(4) NOT NULL DEFAULT '0',
`bo_use_captcha` tinyint(4) NOT NULL DEFAULT '0',
@@ -328,12 +327,6 @@ CREATE TABLE IF NOT EXISTS `g5_config` (
`cf_captcha` varchar(100) NOT NULL DEFAULT '',
`cf_recaptcha_site_key` varchar(100) NOT NULL DEFAULT '',
`cf_recaptcha_secret_key` varchar(100) NOT NULL DEFAULT '',
- `cf_kakaotalk_use` varchar(50) NOT NULL DEFAULT '',
- `cf_kakaotalk_corpnum` varchar(50) NOT NULL DEFAULT '',
- `cf_kakaotalk_sender_hp` varchar(50) NOT NULL DEFAULT '',
- `cf_popbill_userid` varchar(100) NOT NULL DEFAULT '',
- `cf_popbill_link_id` varchar(100) NOT NULL DEFAULT '',
- `cf_popbill_secretkey` varchar(255) NOT NULL DEFAULT '',
`cf_1_subj` varchar(255) NOT NULL DEFAULT '',
`cf_2_subj` varchar(255) NOT NULL DEFAULT '',
`cf_3_subj` varchar(255) NOT NULL DEFAULT '',
@@ -542,10 +535,6 @@ CREATE TABLE IF NOT EXISTS `g5_member` (
`mb_thirdparty_agree` tinyint(1) NOT NULL default '0',
`mb_thirdparty_date` datetime NOT NULL default '0000-00-00 00:00:00',
`mb_agree_log` TEXT NOT NULL,
- `mb_board_post` tinyint(1) NOT NULL default '0',
- `mb_board_reply` tinyint(1) NOT NULL default '0',
- `mb_board_comment` tinyint(1) NOT NULL default '0',
- `mb_board_recomment` tinyint(1) NOT NULL default '0',
`mb_1` varchar(255) NOT NULL default '',
`mb_2` varchar(255) NOT NULL default '',
`mb_3` varchar(255) NOT NULL default '',
@@ -974,92 +963,4 @@ CREATE TABLE IF NOT EXISTS `g5_menu` (
`me_use` tinyint(4) NOT NULL DEFAULT '0',
`me_mobile_use` tinyint(4) NOT NULL DEFAULT '0',
PRIMARY KEY (`me_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `g5_kakao5_preset`
---
-
-DROP TABLE IF EXISTS `g5_kakao5_preset`;
-CREATE TABLE IF NOT EXISTS `g5_kakao5_preset` (
- `kp_id` int(11) NOT NULL AUTO_INCREMENT,
- `kp_type` varchar(20) NOT NULL DEFAULT '',
- `kp_category` varchar(20) NOT NULL DEFAULT '',
- `kp_preset_code` varchar(100) NOT NULL DEFAULT '',
- `kp_preset_name` varchar(100) NOT NULL DEFAULT '',
- `kp_template_name` varchar(100) NOT NULL DEFAULT '',
- `kp_alt_send` varchar(100) NOT NULL DEFAULT '1',
- `kp_active` tinyint(1) NOT NULL DEFAULT '1',
- `kp_created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `kp_updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`kp_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Dumping data for table `g5_kakao5_preset`
---
-
-INSERT INTO `g5_kakao5_preset`
-(`kp_type`, `kp_category`, `kp_preset_code`, `kp_preset_name`, `kp_template_name`, `kp_alt_send`, `kp_active`, `kp_created_at`, `kp_updated_at`)
-VALUES
-('회원', '회원', 'CU-MB01', '회원가입완료', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
-('최고관리자', '회원', 'AD-MB01', '회원가입완료', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
-
-('작성자', '게시판', 'CU-BO01', '새 게시글 작성', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
-('최고관리자', '게시판', 'AD-BO01', '새 게시글 작성', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
-('그룹관리자', '게시판', 'AD-BO02', '새 게시글 작성', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
-('게시판관리자', '게시판', 'AD-BO03', '새 게시글 작성', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
-('작성자', '게시판', 'CU-BO02', '새 댓글 작성', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
-('댓글 작성자', '게시판', 'CU-BO03', '새 댓글 작성', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
-('답변글 작성자', '게시판', 'CU-BO04', '답변글 작성', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
-('최고관리자', '투표', 'AD-VO01', '기타의견 작성', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
-
-('주문자', '쇼핑몰', 'CU-OR01', '주문 완료', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
-('최고관리자', '쇼핑몰', 'AD-OR01', '주문 완료', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
-('주문자', '쇼핑몰', 'CU-OR02', '무통장입금 주문 완료', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
-('최고관리자', '쇼핑몰', 'AD-OR02', '무통장입금 주문 완료', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
-('주문자', '쇼핑몰', 'CU-OR03', '무통장입금 완료', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
-('최고관리자', '쇼핑몰', 'AD-OR03', '무통장입금 완료', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
-('주문자', '쇼핑몰', 'CU-OR04', '(주문자)주문 취소', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
-('최고관리자', '쇼핑몰', 'AD-OR04', '(주문자)주문 취소', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
-('주문자', '쇼핑몰', 'CU-OR05', '(관리자)주문 취소', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
-('최고관리자', '쇼핑몰', 'AD-OR05', '(관리자)주문 취소', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
-('주문자', '쇼핑몰', 'CU-OR06', '반품', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
-('주문자', '쇼핑몰', 'CU-OR07', '품절', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
-('주문자', '쇼핑몰', 'CU-DE01', '배송 준비', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
-('주문자', '쇼핑몰', 'CU-DE02', '배송중', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
-('주문자', '쇼핑몰', 'CU-DE03', '배송 완료', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
-('요청자', '쇼핑몰', 'CU-ST01', '재입고알림', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
-
-('문의자', '1:1문의', 'CU-IQ01', '문의 등록', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
-('최고관리자', '1:1문의', 'AD-IQ01', '문의 등록', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
-('문의자', '1:1문의', 'CU-IQ02', '답변 등록', '', 1, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
-
--- --------------------------------------------------------
-
---
--- Table structure for table `g5_kakao5_preset_history`
---
-
-DROP TABLE IF EXISTS `g5_kakao5_preset_history`;
-CREATE TABLE IF NOT EXISTS `g5_kakao5_preset_history` (
- `ph_id` int(11) NOT NULL AUTO_INCREMENT,
- `kp_id` int(11) NOT NULL DEFAULT '0',
- `mb_id` varchar(20) NOT NULL DEFAULT '',
- `ph_rcvnm` varchar(100) NOT NULL DEFAULT '',
- `ph_rcv` varchar(100) NOT NULL DEFAULT '',
- `ph_template_code` varchar(100) NOT NULL DEFAULT '',
- `ph_alt_send` varchar(100) NOT NULL DEFAULT '',
- `ph_request_num` varchar(100) NOT NULL DEFAULT '',
- `ph_receipt_num` varchar(100) NOT NULL DEFAULT '',
- `ph_send_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `ph_state` tinyint(1) NOT NULL DEFAULT '0',
- `ph_log` text NOT NULL,
- PRIMARY KEY (`ph_id`),
- KEY `kp_id` (`kp_id`),
- KEY `mb_id` (`mb_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
\ No newline at end of file
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
\ No newline at end of file
diff --git a/install/install_db.php b/install/install_db.php
index 11dd47a5d..f2cba5b4c 100644
--- a/install/install_db.php
+++ b/install/install_db.php
@@ -317,7 +317,6 @@ if ($g5_install || $is_install === false) {
bo_use_list_view = '0',
bo_use_list_content = '0',
bo_use_email = '0',
- bo_use_kakaotalk = '0',
bo_table_width = '100',
bo_subject_len = '60',
bo_mobile_subject_len = '30',
diff --git a/js/kakao5.js b/js/kakao5.js
deleted file mode 100644
index 3a849bea4..000000000
--- a/js/kakao5.js
+++ /dev/null
@@ -1,26 +0,0 @@
-// 카카오톡 - URL 생성 후 팝업 오픈
-async function openKakao5PopupFromAjax(kakaoUrl, getUrlValue) {
- const currentUrl = kakaoUrl + '/ajax.get_url.php';
- let response, data;
- try {
- response = await fetch(currentUrl, {
- method: 'POST',
- headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
- body: new URLSearchParams({ get_url: getUrlValue })
- });
- data = await response.json();
- } catch (error) {
- alert('서버와 통신에 실패했습니다.');
- return;
- }
-
- if (data && data.url) {
- window.open(
- data.url,
- 'win_template',
- `width=${data.width},height=${data.height},scrollbars=yes`
- );
- } else {
- alert('URL 생성에 실패했습니다.');
- }
-}
\ No newline at end of file
diff --git a/mobile/shop/orderformupdate.php b/mobile/shop/orderformupdate.php
index 8a75af656..8e003b2ae 100644
--- a/mobile/shop/orderformupdate.php
+++ b/mobile/shop/orderformupdate.php
@@ -1,7 +1,6 @@
0) {
- // 무통장 입금일 경우 알림톡 발송 : 주문금액 - 미결제액
- $conditions = ['od_id' => $od_id, 'od_name' => $od_name, 'it_name' => $it_name_str, 'od_receipt_price' => number_format($od_misu)]; // 변수 치환 정보
- $cu_atk = send_alimtalk_preset('CU-OR02', ['rcv' => $od_hp ?: $od_tel, 'rcvnm' => $od_name], $conditions); // 회원
- $ad_atk = send_admin_alimtalk('AD-OR02', 'super', $conditions); // 관리자
-}else{
- // 주문 완료
- $conditions = ['od_id' => $od_id, 'od_name' => $od_name, 'it_name' => $it_name_str, 'od_receipt_price' => number_format($i_price)]; // 변수 치환 정보
- $cu_atk = send_alimtalk_preset('CU-OR01', ['rcv' => $od_hp ?: $od_tel, 'rcvnm' => $od_name], $conditions); // 회원
- $ad_atk = send_admin_alimtalk('AD-OR01', 'super', $conditions); // 관리자
-}
-// 알림톡 발송 END ---------------------------------------------------------------------------------------------
// orderview 에서 사용하기 위해 session에 넣고
$uid = md5($od_id.G5_TIME_YMDHIS.$REMOTE_ADDR);
diff --git a/mobile/skin/member/basic/register_form.skin.php b/mobile/skin/member/basic/register_form.skin.php
index db1f1260d..e44fa71e3 100644
--- a/mobile/skin/member/basic/register_form.skin.php
+++ b/mobile/skin/member/basic/register_form.skin.php
@@ -260,51 +260,6 @@ if ($config['cf_cert_use'] && ($config['cf_cert_simple'] || $config['cf_cert_ipi
-
-
-
-
@@ -371,10 +326,10 @@ if ($config['cf_cert_use'] && ($config['cf_cert_simple'] || $config['cf_cert_ipi
-
+
'아이코드', 'popbill' => '팝빌'];
+ $configKeys = ['cf_sms_use'];
+ $companies = ['icode' => '아이코드'];
$usedCompanies = [];
foreach ($configKeys as $key) {
diff --git a/mobile/skin/shop/basic/item.form.skin.php b/mobile/skin/shop/basic/item.form.skin.php
index e2d0ad970..6db60f890 100644
--- a/mobile/skin/shop/basic/item.form.skin.php
+++ b/mobile/skin/shop/basic/item.form.skin.php
@@ -545,11 +545,11 @@ function popup_item_recommend(it_id)
}
}
-// 재입고 알림
+// 재입고SMS 알림
function popup_stocksms(it_id)
{
url = "/itemstocksms.php?it_id=" + it_id;
- opt = "scrollbars=yes,width=616,height=500,top=10,left=10";
+ opt = "scrollbars=yes,width=616,height=420,top=10,left=10";
popup_window(url, "itemstocksms", opt);
}
diff --git a/mobile/skin/social/social_register_member.skin.php b/mobile/skin/social/social_register_member.skin.php
index 3f5d9e0a8..dc247994d 100644
--- a/mobile/skin/social/social_register_member.skin.php
+++ b/mobile/skin/social/social_register_member.skin.php
@@ -211,10 +211,10 @@ $email_msg = $is_exists_email ? '등록할 이메일이 중복되었습니다.
-
+
'아이코드', 'popbill' => '팝빌'];
+ $configKeys = ['cf_sms_use'];
+ $companies = ['icode' => '아이코드'];
$usedCompanies = [];
foreach ($configKeys as $key) {
diff --git a/plugin/kakao5/Popbill/LICENSE.md b/plugin/kakao5/Popbill/LICENSE.md
deleted file mode 100644
index 57638d9c2..000000000
--- a/plugin/kakao5/Popbill/LICENSE.md
+++ /dev/null
@@ -1,9 +0,0 @@
-MIT License
-
-Copyright (c) 2023 LinkHub
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
diff --git a/plugin/kakao5/Popbill/Linkhub/LICENSE.md b/plugin/kakao5/Popbill/Linkhub/LICENSE.md
deleted file mode 100644
index 57638d9c2..000000000
--- a/plugin/kakao5/Popbill/Linkhub/LICENSE.md
+++ /dev/null
@@ -1,9 +0,0 @@
-MIT License
-
-Copyright (c) 2023 LinkHub
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
diff --git a/plugin/kakao5/Popbill/Linkhub/README.md b/plugin/kakao5/Popbill/Linkhub/README.md
deleted file mode 100644
index 9e0bb56b9..000000000
--- a/plugin/kakao5/Popbill/Linkhub/README.md
+++ /dev/null
@@ -1,4 +0,0 @@
-linkhub.auth.php
-================
-
-링크허브 API 인증 SDK for PHP5
diff --git a/plugin/kakao5/Popbill/Linkhub/example.php b/plugin/kakao5/Popbill/Linkhub/example.php
deleted file mode 100644
index f67cfe34b..000000000
--- a/plugin/kakao5/Popbill/Linkhub/example.php
+++ /dev/null
@@ -1,49 +0,0 @@
-getToken($ServiceID,$AccessID, array('member','110'));
-}catch(LinkhubException $le) {
- echo $le;
-
- exit();
-}
-echo 'Token is issued : '.substr($Token->session_token,0,20).' ...';
-echo chr(10);
-
-try
-{
- $balance = $Linkhub->getBalance($Token->session_token,$ServiceID);
-}catch(LinkhubException $le) {
- echo $le;
-
- exit();
-}
-echo 'remainPoint is '. $balance;
-echo chr(10);
-
-try
-{
- $balance = $Linkhub->getPartnerBalance($Token->session_token,$ServiceID);
-}catch(LinkhubException $le) {
- echo $le;
-
- exit();
-}
-echo 'remainPartnerPoint is '. $balance;
-echo chr(10);
-
-?>
diff --git a/plugin/kakao5/Popbill/Linkhub/linkhub.auth.php b/plugin/kakao5/Popbill/Linkhub/linkhub.auth.php
deleted file mode 100644
index ecf3a451a..000000000
--- a/plugin/kakao5/Popbill/Linkhub/linkhub.auth.php
+++ /dev/null
@@ -1,337 +0,0 @@
-__SecretKey;
- }
- public function getLinkID(){
- return $this->__LinkID;
- }
- public function ServiceURL($V){
- $this->__ServiceURL = $V;
- }
- private static $singleton = null;
- public static function getInstance($LinkID,$secretKey)
- {
- if(is_null(Linkhub::$singleton)) {
- Linkhub::$singleton = new Linkhub();
- }
- Linkhub::$singleton->__LinkID = $LinkID;
- Linkhub::$singleton->__SecretKey = $secretKey;
-
- return Linkhub::$singleton;
- }
- public function gzdecode($data){
- return gzinflate(substr($data, 10, -8));
- }
-
- private function executeCURL($url,$header = array(),$isPost = false, $postdata = null) {
- $base_header = array();
- $base_header[] = 'Accept-Encoding: gzip,deflate';
- $base_header[] = 'User-Agent: PHP5 LINKHUB SDK';
- $arr_header = $header + $base_header;
-
- if($this->__requestMode != "STREAM") {
- $http = curl_init($url);
-
- if($isPost) {
- curl_setopt($http, CURLOPT_POST,1);
- curl_setopt($http, CURLOPT_POSTFIELDS, $postdata);
- }
- curl_setopt($http, CURLOPT_HTTPHEADER,$arr_header);
- curl_setopt($http, CURLOPT_RETURNTRANSFER, TRUE);
- curl_setopt($http, CURLOPT_ENCODING, 'gzip,deflate');
- // Connection timeout 설정
- curl_setopt($http, CURLOPT_CONNECTTIMEOUT_MS, 10 * 1000);
- // 통합 timeout 설정
- curl_setopt($http, CURLOPT_TIMEOUT_MS, 180 * 1000);
-
- $responseJson = curl_exec($http);
-
- // curl Error 추가
- if ($responseJson == false) {
- throw new LinkhubException(curl_error($http));
- }
-
- $http_status = curl_getinfo($http, CURLINFO_HTTP_CODE);
-
- curl_close($http);
-
- $is_gzip = 0 === mb_strpos($responseJson, "\x1f" . "\x8b" . "\x08");
-
- if ($is_gzip) {
- $responseJson = $this->gzdecode($responseJson);
- }
-
- if($http_status != 200) {
- throw new LinkhubException($responseJson);
- }
-
- return json_decode($responseJson);
-
- }
- else {
- if($isPost) {
- $params = array('http' => array(
- 'ignore_errors' => TRUE,
- 'method' => 'POST',
- 'protocol_version' => '1.0',
- 'content' => $postdata,
- 'timeout' => 180
- ));
- } else {
- $params = array('http' => array(
- 'ignore_errors' => TRUE,
- 'method' => 'GET',
- 'protocol_version' => '1.0',
- 'timeout' => 180
- ));
- }
- if ($arr_header !== null) {
- $head = "";
- foreach($arr_header as $h) {
- $head = $head . $h . "\r\n";
- }
- $params['http']['header'] = substr($head,0,-2);
- }
- $ctx = stream_context_create($params);
- $response = file_get_contents($url, false, $ctx);
-
- $is_gzip = 0 === mb_strpos($response , "\x1f" . "\x8b" . "\x08");
- if($is_gzip){
- $response = $this->gzdecode($response);
- }
-
- if ($http_response_header[0] != "HTTP/1.1 200 OK") {
- throw new LinkhubException($response);
- }
-
- return json_decode($response);
- }
- }
-
- public function getTime($useStaticIP = false, $useLocalTimeYN = true, $useGAIP = false) {
- if($useLocalTimeYN) {
- $replace_search = array("@","#");
- $replace_target = array("T","Z");
-
- $date = new DateTime('now', new DateTimeZone('UTC'));
-
- return str_replace($replace_search, $replace_target, $date->format('Y-m-d@H:i:s#'));
- }
- if($this->__requestMode != "STREAM") {
- $targetURL = $this->getTargetURL($useStaticIP, $useGAIP);
-
- $http = curl_init($targetURL.'/Time');
-
- curl_setopt($http, CURLOPT_RETURNTRANSFER, TRUE);
- // Read timeout 설정
- curl_setopt($http, CURLOPT_TIMEOUT_MS, 180 * 1000);
- // Connection timeout 설정
- curl_setopt($http, CURLOPT_CONNECTTIMEOUT_MS, 10 * 1000);
-
- $response = curl_exec($http);
-
- // curl Error 추가
- if ($response == false) {
- throw new LinkhubException(curl_error($http));
- }
-
- $http_status = curl_getinfo($http, CURLINFO_HTTP_CODE);
-
- curl_close($http);
-
- if($http_status != 200) {
- throw new LinkhubException($response);
- }
- return $response;
-
- } else {
- $header = array();
- $header[] = 'Connection: close';
- $params = array('http' => array(
- 'ignore_errors' => TRUE,
- 'protocol_version' => '1.0',
- 'method' => 'GET',
- 'timeout' => 180
- ));
- if ($header !== null) {
- $head = "";
- foreach($header as $h) {
- $head = $head . $h . "\r\n";
- }
- $params['http']['header'] = substr($head,0,-2);
- }
-
- $ctx = stream_context_create($params);
-
- $targetURL = $this->getTargetURL($useStaticIP, $useGAIP);
-
- $response = (file_get_contents( $targetURL.'/Time', false, $ctx));
-
- if ($http_response_header[0] != "HTTP/1.1 200 OK") {
- throw new LinkhubException($response);
- }
- return $response;
- }
- }
-
- public function getToken($ServiceID, $access_id, array $scope = array() , $forwardIP = null, $useStaticIP = false, $useLocalTimeYN = true, $useGAIP = false)
- {
- $xDate = $this->getTime($useStaticIP, $useLocalTimeYN, $useGAIP);
-
- $uri = '/' . $ServiceID . '/Token';
- $header = array();
-
- $TokenRequest = new TokenRequest();
- $TokenRequest->access_id = $access_id;
- $TokenRequest->scope = $scope;
-
- $postdata = json_encode($TokenRequest);
-
- $digestTarget = 'POST'.chr(10);
- $digestTarget = $digestTarget.base64_encode(hash('sha256',$postdata,true)).chr(10);
- $digestTarget = $digestTarget.$xDate.chr(10);
- if(!(is_null($forwardIP) || $forwardIP == '')) {
- $digestTarget = $digestTarget.$forwardIP.chr(10);
- }
- $digestTarget = $digestTarget.Linkhub::VERSION.chr(10);
- $digestTarget = $digestTarget.$uri;
-
- $digest = base64_encode(hash_hmac('sha256',$digestTarget,base64_decode(strtr($this->__SecretKey, '-_', '+/')),true));
-
- $header[] = 'x-lh-date: '.$xDate;
- $header[] = 'x-lh-version: '.Linkhub::VERSION;
- if(!(is_null($forwardIP) || $forwardIP == '')) {
- $header[] = 'x-lh-forwarded: '.$forwardIP;
- }
-
- $header[] = 'Authorization: LINKHUB '.$this->__LinkID.' '.$digest;
- $header[] = 'Content-Type: Application/json';
- $header[] = 'Connection: close';
-
- $targetURL = $this->getTargetURL($useStaticIP, $useGAIP);
-
- return $this->executeCURL($targetURL.$uri , $header,true,$postdata);
- }
-
-
- public function getBalance($bearerToken, $ServiceID, $useStaticIP = false, $useGAIP = false)
- {
- $header = array();
- $header[] = 'Authorization: Bearer '.$bearerToken;
- $header[] = 'Connection: close';
-
- $targetURL = $this->getTargetURL($useStaticIP, $useGAIP);
- $uri = '/'.$ServiceID.'/Point';
-
- $response = $this->executeCURL($targetURL.$uri,$header);
- return $response->remainPoint;
-
- }
-
- public function getPartnerBalance($bearerToken, $ServiceID, $useStaticIP = false, $useGAIP = false)
- {
- $header = array();
- $header[] = 'Authorization: Bearer '.$bearerToken;
- $header[] = 'Connection: close';
-
- $targetURL = $this->getTargetURL($useStaticIP, $useGAIP);
- $uri = '/'.$ServiceID.'/PartnerPoint';
-
- $response = $this->executeCURL($targetURL.$uri,$header);
- return $response->remainPoint;
- }
-
- /*
- * 파트너 포인트 충전 팝업 URL 추가 (2017/08/29)
- */
- public function getPartnerURL($bearerToken, $ServiceID, $TOGO, $useStaticIP = false, $useGAIP = false)
- {
- $header = array();
- $header[] = 'Authorization: Bearer '.$bearerToken;
- $header[] = 'Connection: close';
-
- $targetURL = $this->getTargetURL($useStaticIP, $useGAIP);
- $uri = '/'.$ServiceID.'/URL?TG='.$TOGO;
-
- $response = $this->executeCURL($targetURL.$uri, $header);
- return $response->url;
- }
-
- private function getTargetURL($useStaticIP, $useGAIP){
- if(isset($this->__ServiceURL)) {
- return $this->__ServiceURL;
- }
-
- if($useGAIP){
- return Linkhub::ServiceURL_GA;
- } else if($useStaticIP){
- return Linkhub::ServiceURL_Static;
- } else {
- return Linkhub::ServiceURL;
- }
- }
-}
-
-class TokenRequest
-{
- public $access_id;
- public $scope;
-}
-
-class LinkhubException extends Exception
-{
- public function __construct($response, Exception $previous = null) {
- $Err = json_decode($response);
- if(is_null($Err)) {
- parent::__construct($response, -99999999);
- }
- else {
- parent::__construct($Err->message, $Err->code);
- }
- }
-
- public function __toString() {
- return __CLASS__ . ": [{$this->code}]: {$this->message}\n";
- }
-}
-
-?>
diff --git a/plugin/kakao5/Popbill/PopbillKakao.php b/plugin/kakao5/Popbill/PopbillKakao.php
deleted file mode 100644
index e472bf02c..000000000
--- a/plugin/kakao5/Popbill/PopbillKakao.php
+++ /dev/null
@@ -1,679 +0,0 @@
-AddScope('153');
- $this->AddScope('154');
- $this->AddScope('155');
- }
-
- // 전송 단가 확인
- public function GetUnitCost($CorpNum, $MessageType) {
- if($this->isNullOrEmpty($CorpNum)) {
- throw new PopbillException('팝빌회원 사업자번호가 입력되지 않았습니다.');
- }
- if($this->isNullOrEmpty($MessageType)) {
- throw new PopbillException('카카오톡 전송유형이 입력되지 않았습니다.');
- }
-
- return $this->executeCURL('/KakaoTalk/UnitCost?Type=' . $MessageType, $CorpNum)->unitCost;
- }
-
- // 알림톡/친구톡 전송내역 확인
- public function GetMessages($CorpNum, $ReceiptNum, $UserID = null) {
- if($this->isNullOrEmpty($CorpNum)) {
- throw new PopbillException('팝빌회원 사업자번호가 입력되지 않았습니다.');
- }
- if($this->isNullOrEmpty($ReceiptNum)) {
- throw new PopbillException('카카오톡 접수번호가 입력되지 않았습니다.');
- }
-
- $response = $this->executeCURL('/KakaoTalk/' . $ReceiptNum, $CorpNum, $UserID);
- $DetailInfo = new KakaoSentInfo();
- $DetailInfo->fromJsonInfo($response);
-
- return $DetailInfo;
- }
-
- // 알림톡/친구톡 전송내역 확인 (요청번호 할당)
- public function GetMessagesRN($CorpNum, $RequestNum, $UserID = null) {
- if($this->isNullOrEmpty($CorpNum)) {
- throw new PopbillException('팝빌회원 사업자번호가 입력되지 않았습니다.');
- }
- if($this->isNullOrEmpty($RequestNum)) {
- throw new PopbillException('카카오톡 전송요청번호가 입력되지 않았습니다.');
- }
-
- $response = $this->executeCURL('/KakaoTalk/Get/' . $RequestNum, $CorpNum, $UserID);
- $DetailInfo = new KakaoSentInfo();
- $DetailInfo->fromJsonInfo($response);
-
- return $DetailInfo;
- }
-
- // 카카오톡 채널 목록 확인
- public function ListPlusFriendID($CorpNum) {
- if($this->isNullOrEmpty($CorpNum)) {
- throw new PopbillException('팝빌회원 사업자번호가 입력되지 않았습니다.');
- }
-
- $PlusFriendList = array();
- $response = $this->executeCURL('/KakaoTalk/ListPlusFriendID', $CorpNum);
-
- for ($i = 0; $i < Count($response); $i++) {
- $PlusFriendObj = new PlusFriend();
- $PlusFriendObj->fromJsonInfo($response[$i]);
- $PlusFriendList[$i] = $PlusFriendObj;
- }
-
- return $PlusFriendList;
- }
-
- // 알림톡 템플릿 목록 확인
- public function ListATSTemplate($CorpNum) {
- if($this->isNullOrEmpty($CorpNum)) {
- throw new PopbillException('팝빌회원 사업자번호가 입력되지 않았습니다.');
- }
-
- $result = $this->executeCURL('/KakaoTalk/ListATSTemplate', $CorpNum);
-
- $TemplateList = array();
- for ($i = 0; $i < Count($result); $i++) {
- $TemplateObj = new ATSTemplate();
- $TemplateObj->fromJsonInfo($result[$i]);
- $TemplateList[$i] = $TemplateObj;
- }
-
- return $TemplateList;
- }
-
- // 발신번호 등록여부 확인
- public function CheckSenderNumber($CorpNum, $SenderNumber, $UserID = null) {
- if($this->isNullOrEmpty($CorpNum)) {
- throw new PopbillException('팝빌회원 사업자번호가 입력되지 않았습니다.');
- }
- if($this->isNullOrEmpty($SenderNumber)) {
- throw new PopbillException('발신번호가 입력되지 않았습니다.');
- }
-
- return $this->executeCURL('/KakaoTalk/CheckSenderNumber/' . $SenderNumber, $CorpNum, $UserID);
- }
-
- // 발신번호 목록 확인
- public function GetSenderNumberList($CorpNum) {
- if($this->isNullOrEmpty($CorpNum)) {
- throw new PopbillException('팝빌회원 사업자번호가 입력되지 않았습니다.');
- }
-
- return $this->executeCURL('/Message/SenderNumber', $CorpNum);
- }
-
- // 예약전송 취소 (접수번호)
- public function CancelReserve($CorpNum, $ReceiptNum, $UserID = null) {
- if($this->isNullOrEmpty($CorpNum)) {
- throw new PopbillException('팝빌회원 사업자번호가 입력되지 않았습니다.');
- }
- if($this->isNullOrEmpty($ReceiptNum)) {
- throw new PopbillException('예약전송을 취소할 접수번호가 입력되지 않았습니다.');
- }
-
- return $this->executeCURL('/KakaoTalk/' . $ReceiptNum . '/Cancel', $CorpNum, $UserID);
- }
-
- // 예약전송 전체 취소 (전송 요청번호)
- public function CancelReserveRN($CorpNum, $RequestNum, $UserID = null) {
- if($this->isNullOrEmpty($CorpNum)) {
- throw new PopbillException('팝빌회원 사업자번호가 입력되지 않았습니다.');
- }
- if($this->isNullOrEmpty($RequestNum)) {
- throw new PopbillException('예약전송을 취소할 전송요청번호가 입력되지 않았습니다.');
- }
-
- return $this->executeCURL('/KakaoTalk/Cancel/' . $RequestNum, $CorpNum, $UserID);
- }
-
- // 예약전송 일부 취소 (접수번호)
- public function CancelReservebyRCV($CorpNum, $ReceiptNum, $ReceiveNum, $UserID = null) {
- if($this->isNullOrEmpty($CorpNum)) {
- throw new PopbillException('팝빌회원 사업자번호가 입력되지 않았습니다.');
- }
- if($this->isNullOrEmpty($ReceiptNum)) {
- throw new PopbillException('예약전송 취소할 접수번호가 입력되지 않았습니다.');
- }
- if($this->isNullOrEmpty($ReceiveNum)) {
- throw new PopbillException('예약전송 취소할 수신번호가 입력되지 않았습니다.');
- }
-
- $postdata = json_encode($ReceiveNum);
-
- return $this->executeCURL('/KakaoTalk/' . $ReceiptNum . '/Cancel', $CorpNum, $UserID, true, null, $postdata);
- }
-
- // 예약전송 일부 취소 (전송 요청번호)
- public function CancelReserveRNbyRCV($CorpNum, $RequestNum, $ReceiveNum, $UserID = null) {
- if($this->isNullOrEmpty($CorpNum)) {
- throw new PopbillException('팝빌회원 사업자번호가 입력되지 않았습니다.');
- }
- if($this->isNullOrEmpty($RequestNum)) {
- throw new PopbillException('예약전송 취소할 전송요청번호가 입력되지 않았습니다.');
- }
- if($this->isNullOrEmpty($ReceiveNum)) {
- throw new PopbillException('예약전송 취소할 수신번호가 입력되지 않았습니다.');
- }
-
- $postdata = json_encode($ReceiveNum);
-
- return $this->executeCURL('/KakaoTalk/Cancel/' . $RequestNum, $CorpNum, $UserID, true, null, $postdata);
- }
-
- public function GetURL($CorpNum, $UserID, $TOGO)
- {
- $URI = '/KakaoTalk/?TG=';
-
- if ($TOGO == "SENDER") {
- $URI = '/Message/?TG=';
- }
-
- $response = $this->executeCURL($URI . $TOGO, $CorpNum, $UserID);
- return $response->url;
- }
-
- // 플러스친구 계정관리 팝업 URL
- public function GetPlusFriendMgtURL($CorpNum, $UserID = null) {
- if($this->isNullOrEmpty($CorpNum)) {
- throw new PopbillException('팝빌회원 사업자번호가 입력되지 않았습니다.');
- }
-
- $response = $this->executeCURL('/KakaoTalk/?TG=PLUSFRIEND', $CorpNum, $UserID);
- return $response->url;
- }
-
- // 발신번호 관리 팝업 URL
- public function GetSenderNumberMgtURL($CorpNum, $UserID = null) {
- if($this->isNullOrEmpty($CorpNum)) {
- throw new PopbillException('팝빌회원 사업자번호가 입력되지 않았습니다.');
- }
-
- $response = $this->executeCURL('/Message/?TG=SENDER', $CorpNum, $UserID);
- return $response->url;
- }
-
- // 알림톡 템플릿관리 팝업 URL
- public function GetATSTemplateMgtURL($CorpNum, $UserID = null) {
- if($this->isNullOrEmpty($CorpNum)) {
- throw new PopbillException('팝빌회원 사업자번호가 입력되지 않았습니다.');
- }
-
- $response = $this->executeCURL('/KakaoTalk/?TG=TEMPLATE', $CorpNum, $UserID);
- return $response->url;
- }
-
- // 알림톡 템플릿 정보 확인
- public function GetATSTemplate($CorpNum, $TemplateCode, $UserID = null) {
- if($this->isNullOrEmpty($CorpNum)) {
- throw new PopbillException('팝빌회원 사업자번호가 입력되지 않았습니다.');
- }
- if($this->isNullOrEmpty($TemplateCode)) {
- throw new PopbillException('템플릿코드가 입력되지 않았습니다.');
- }
-
- $result = $this->executeCURL('/KakaoTalk/GetATSTemplate/'.$TemplateCode, $CorpNum, $UserID);
-
- $TemplateInfo = new ATSTemplate();
- $TemplateInfo->fromJsonInfo($result);
-
- return $TemplateInfo;
- }
-
- // 카카오톡 전송내역 팝업 URL
- public function GetSentListURL($CorpNum, $UserID = null) {
- if($this->isNullOrEmpty($CorpNum)) {
- throw new PopbillException('팝빌회원 사업자번호가 입력되지 않았습니다.');
- }
-
- $response = $this->executeCURL('/KakaoTalk/?TG=BOX', $CorpNum, $UserID);
- return $response->url;
- }
-
- // 전송내역 목록 조회
- public function Search($CorpNum, $SDate, $EDate, $State = array(), $Item = array(), $ReserveYN = null, $SenderYN = false, $Page = null, $PerPage = null, $Order = null, $UserID = null, $QString = null) {
- if($this->isNullOrEmpty($CorpNum)) {
- throw new PopbillException('팝빌회원 사업자번호가 입력되지 않았습니다.');
- }
- if($this->isNullOrEmpty($SDate)) {
- throw new PopbillException('시작일자가 입력되지 않았습니다.');
- }
- if(!$this->isValidDate($SDate)) {
- throw new PopbillException('시작일자가 유효하지 않습니다.');
- }
- if($this->isNullOrEmpty($EDate)) {
- throw new PopbillException('종료일자가 입력되지 않았습니다.');
- }
- if(!$this->isValidDate($EDate)) {
- throw new PopbillException('종료일자가 유효하지 않습니다.');
- }
- if($this->isNullOrEmpty($State)) {
- throw new PopbillException('전송상태가 입력되지 않았습니다.');
- }
-
- $uri = '/KakaoTalk/Search';
- $uri .= '?SDate=' . $SDate;
- $uri .= '&EDate=' . $EDate;
- $uri .= '&State=' . implode(',', $State);
-
- if(!$this->isNullOrEmpty($Item)) {
- $uri .= '&Item=' . implode(',', $Item);
- }
- if(!is_null($ReserveYN) && $ReserveYN != "") {
- if($ReserveYN) {
- $uri .= '&ReserveYN=1';
- }else{
- $uri .= '&ReserveYN=0';
- }
- }
- if ($SenderYN) {
- $uri .= '&SenderOnly=1';
- } else {
- $uri .= '&SenderOnly=0';
- }
- if(!$this->isNullOrEmpty($Page)) {
- $uri .= '&Page=' . $Page;
- }
- if(!$this->isNullOrEmpty($PerPage)) {
- $uri .= '&PerPage=' . $PerPage;
- }
- if(!$this->isNullOrEmpty($Order)) {
- $uri .= '&Order=' . $Order;
- }
- if(!$this->isNullOrEmpty($QString)) {
- $uri .= '&QString=' . urlencode($QString);
- }
-
- $response = $this->executeCURL($uri, $CorpNum, $UserID);
-
- $SearchList = new KakaoSearchResult();
- $SearchList->fromJsonInfo($response);
-
- return $SearchList;
-
- }
-
- // 과금정보 확인
- public function GetChargeInfo($CorpNum, $MessageType, $UserID = null)
- {
- if($this->isNullOrEmpty($CorpNum)) {
- throw new PopbillException('팝빌회원 사업자번호가 입력되지 않았습니다.');
- }
- if($this->isNullOrEmpty($MessageType)) {
- throw new PopbillException('카카오톡 전송유형이 입력되지 않았습니다.');
- }
-
- $uri = '/KakaoTalk/ChargeInfo?Type=' . $MessageType;
-
- $response = $this->executeCURL($uri, $CorpNum, $UserID);
- $ChargeInfo = new ChargeInfo();
- $ChargeInfo->fromJsonInfo($response);
-
- return $ChargeInfo;
- }
-
- // 친구톡(이미지)
- public function SendFMS($CorpNum, $PlusFriendID, $Sender = null, $Content = null, $AltContent = null, $AltSendType = null, $AdsYN = false, $Messages = array(), $Btns = array(), $ReserveDT = null, $FilePaths = array(), $ImageURL = null, $UserID = null, $RequestNum = null, $AltSubject = null)
- {
- if($this->isNullOrEmpty($CorpNum)) {
- throw new PopbillException('팝빌회원 사업자번호가 입력되지 않았습니다.');
- }
- if($this->isNullOrEmpty($PlusFriendID)) {
- throw new PopbillException('카카오톡 채널 검색용 아이디가 입력되지 않았습니다.');
- }
- if($this->isNullOrEmpty($Messages)) {
- throw new PopbillException('카카오톡 전송정보가 입력되지 않았습니다.');
- }
- if($this->isNullOrEmpty($FilePaths)) {
- throw new PopbillException('전송할 이미지 파일 경로가 입력되지 않았습니다.');
- }
- if(!$this->isNullOrEmpty($ReserveDT) && !$this->isValidDT($ReserveDT)) {
- throw new PopbillException('전송 예약일시가 유효하지 않습니다.');
- }
-
- $Request = array();
-
- if(!$this->isNullOrEmpty($PlusFriendID)) $Request['plusFriendID'] = $PlusFriendID;
- if(!$this->isNullOrEmpty($Sender)) $Request['snd'] = $Sender;
- if(!$this->isNullOrEmpty($Content)) $Request['content'] = $Content;
- if(!$this->isNullOrEmpty($AltSubject)) $Request['altSubject'] = $AltSubject;
- if(!$this->isNullOrEmpty($AltContent)) $Request['altContent'] = $AltContent;
- if(!$this->isNullOrEmpty($AltSendType)) $Request['altSendType'] = $AltSendType;
- if(!$this->isNullOrEmpty($ReserveDT)) $Request['sndDT'] = $ReserveDT;
- if(!$this->isNullOrEmpty($AdsYN)) $Request['adsYN'] = $AdsYN;
- if(!$this->isNullOrEmpty($ImageURL)) $Request['imageURL'] = $ImageURL;
- if(!$this->isNullOrEmpty($RequestNum)) $Request['requestNum'] = $RequestNum;
- if(!$this->isNullOrEmpty($Btns)) $Request['btns'] = $Btns;
-
- $Request['msgs'] = $Messages;
- $postdata = array();
- $postdata['form'] = json_encode($Request);
-
- $i = 0;
-
- foreach ($FilePaths as $FilePath) {
- $postdata['file'] = '@' . $FilePath;
- }
-
- return $this->executeCURL('/FMS', $CorpNum, $UserID, true, null, $postdata, true)->receiptNum;
- }
-
- // 친구톡(텍스트)
- public function SendFTS($CorpNum, $PlusFriendID, $Sender = null, $Content = null, $AltContent = null, $AltSendType = null, $AdsYN = false, $Messages = array(), $Btns = array(), $ReserveDT = null, $UserID = null, $RequestNum = null, $AltSubject = null)
- {
- if($this->isNullOrEmpty($CorpNum)) {
- throw new PopbillException('팝빌회원 사업자번호가 입력되지 않았습니다.');
- }
- if($this->isNullOrEmpty($PlusFriendID)) {
- throw new PopbillException('카카오톡 채널 검색용 아이디가 입력되지 않았습니다.');
- }
- if($this->isNullOrEmpty($Messages)) {
- throw new PopbillException('카카오톡 전송정보가 입력되지 않았습니다.');
- }
- if(!$this->isNullOrEmpty($ReserveDT) && !$this->isValidDT($ReserveDT)) {
- throw new PopbillException('전송 예약일시가 유효하지 않습니다.');
- }
-
- $Request = array();
-
- if(!$this->isNullOrEmpty($PlusFriendID)) $Request['plusFriendID'] = $PlusFriendID;
- if(!$this->isNullOrEmpty($Sender)) $Request['snd'] = $Sender;
- if(!$this->isNullOrEmpty($Content)) $Request['content'] = $Content;
- if(!$this->isNullOrEmpty($AltSubject)) $Request['altSubject'] = $AltSubject;
- if(!$this->isNullOrEmpty($AltContent)) $Request['altContent'] = $AltContent;
- if(!$this->isNullOrEmpty($AltSendType)) $Request['altSendType'] = $AltSendType;
- if(!$this->isNullOrEmpty($ReserveDT)) $Request['sndDT'] = $ReserveDT;
- if(!$this->isNullOrEmpty($AdsYN)) $Request['adsYN'] = $AdsYN;
- if(!$this->isNullOrEmpty($RequestNum)) $Request['requestNum'] = $RequestNum;
- if(!$this->isNullOrEmpty($Btns)) $Request['btns'] = $Btns;
-
- $Request['msgs'] = $Messages;
- $postdata = json_encode($Request);
-
- return $this->executeCURL('/FTS', $CorpNum, $UserID, true, null, $postdata)->receiptNum;
- }
-
- // 알림톡 단건전송
- public function SendATS($CorpNum, $TemplateCode, $Sender = null, $Content = null, $AltContent = null, $AltSendType = null, $Messages = array(), $ReserveDT = null, $UserID = null, $RequestNum = null, $Btns = null, $AltSubject = null)
- {
- if($this->isNullOrEmpty($CorpNum)) {
- throw new PopbillException('팝빌회원 사업자번호가 입력되지 않았습니다.');
- }
- if($this->isNullOrEmpty($TemplateCode)) {
- throw new PopbillException('승인된 알림톡 템플릿코드가 입력되지 않았습니다.');
- }
- if($this->isNullOrEmpty($Messages)) {
- throw new PopbillException('카카오톡 전송정보가 입력되지 않았습니다.');
- }
- if(!$this->isNullOrEmpty($ReserveDT) && !$this->isValidDT($ReserveDT)) {
- throw new PopbillException('전송 예약일시가 유효하지 않습니다.');
- }
-
- $Request = array();
-
- if(!$this->isNullOrEmpty($TemplateCode)) $Request['templateCode'] = $TemplateCode;
- if(!$this->isNullOrEmpty($Sender)) $Request['snd'] = $Sender;
- if(!$this->isNullOrEmpty($Content)) $Request['content'] = $Content;
- if(!$this->isNullOrEmpty($AltSubject)) $Request['altSubject'] = $AltSubject;
- if(!$this->isNullOrEmpty($AltContent)) $Request['altContent'] = $AltContent;
- if(!$this->isNullOrEmpty($AltSendType)) $Request['altSendType'] = $AltSendType;
- if(!$this->isNullOrEmpty($ReserveDT)) $Request['sndDT'] = $ReserveDT;
- if(!$this->isNullOrEmpty($RequestNum)) $Request['requestNum'] = $RequestNum;
- if(!$this->isNullOrEmpty($Btns)) $Request['btns'] = $Btns;
-
- $Request['msgs'] = $Messages;
-
- $postdata = json_encode($Request);
-
- return $this->executeCURL('/ATS', $CorpNum, $UserID, true, null, $postdata)->receiptNum;
- }
-}
-
-class ENumKakaoType
-{
- const ATS = 'ATS';
- const FTS = 'FTS';
- const FMS = 'FMS';
-}
-
-class KakaoSearchResult
-{
- public $code;
- public $message;
- public $total;
- public $perPage;
- public $pageNum;
- public $pageCount;
-
- public $list;
-
- function fromJsonInfo($jsonInfo)
- {
-
- isset($jsonInfo->code) ? ($this->code = $jsonInfo->code) : null;
- isset($jsonInfo->message) ? ($this->message = $jsonInfo->message) : null;
- isset($jsonInfo->total) ? ($this->total = $jsonInfo->total) : null;
- isset($jsonInfo->perPage) ? ($this->perPage = $jsonInfo->perPage) : null;
- isset($jsonInfo->pageNum) ? ($this->pageNum = $jsonInfo->pageNum) : null;
- isset($jsonInfo->pageCount) ? ($this->pageCount = $jsonInfo->pageCount) : null;
-
- $DetailList = array();
- for ($i = 0; $i < Count($jsonInfo->list); $i++) {
- $SentInfo = new KakaoSentInfoDetail();
- $SentInfo->fromJsonInfo($jsonInfo->list[$i]);
- $DetailList[$i] = $SentInfo;
- }
- $this->list = $DetailList;
- }
-}
-
-class KakaoSentInfo
-{
- public $contentType;
- public $templateCode;
- public $plusFriendID;
- public $sendNum;
- public $altSubject;
- public $altContent;
- public $altSendType;
- public $reserveDT;
- public $adsYN;
- public $imageURL;
- public $sendCnt;
- public $successCnt;
- public $failCnt;
- public $altCnt;
- public $cancelCnt;
-
- public $msgs;
- public $btns;
-
- function fromJsonInfo($jsonInfo)
- {
-
- isset($jsonInfo->contentType) ? ($this->contentType = $jsonInfo->contentType) : null;
- isset($jsonInfo->templateCode) ? ($this->templateCode = $jsonInfo->templateCode) : null;
- isset($jsonInfo->plusFriendID) ? ($this->plusFriendID = $jsonInfo->plusFriendID) : null;
- isset($jsonInfo->sendNum) ? ($this->sendNum = $jsonInfo->sendNum) : null;
- isset($jsonInfo->altSubject) ? ($this->altSubject = $jsonInfo->altSubject) : null;
- isset($jsonInfo->altContent) ? ($this->altContent = $jsonInfo->altContent) : null;
- isset($jsonInfo->altSendType) ? ($this->altSendType = $jsonInfo->altSendType) : null;
- isset($jsonInfo->reserveDT) ? ($this->reserveDT = $jsonInfo->reserveDT) : null;
- isset($jsonInfo->adsYN) ? ($this->adsYN = $jsonInfo->adsYN) : null;
- isset($jsonInfo->imageURL) ? ($this->imageURL = $jsonInfo->imageURL) : null;
- isset($jsonInfo->sendCnt) ? ($this->sendCnt = $jsonInfo->sendCnt) : null;
- isset($jsonInfo->successCnt) ? ($this->successCnt = $jsonInfo->successCnt) : null;
- isset($jsonInfo->failCnt) ? ($this->failCnt = $jsonInfo->failCnt) : null;
- isset($jsonInfo->altCnt) ? ($this->altCnt = $jsonInfo->altCnt) : null;
- isset($jsonInfo->cancelCnt) ? ($this->cancelCnt = $jsonInfo->cancelCnt) : null;
-
- if (isset($jsonInfo->msgs)) {
- $msgsList = array();
- for ($i = 0; $i < Count($jsonInfo->msgs); $i++) {
- $kakaoDetail = new KakaoSentInfoDetail();
- $kakaoDetail->fromJsonInfo($jsonInfo->msgs[$i]);
- $msgsList[$i] = $kakaoDetail;
- }
- $this->msgs = $msgsList;
- } // end of if
-
- if (isset($jsonInfo->btns)) {
- $btnsList = array();
- for ($i = 0; $i < Count($jsonInfo->btns); $i++) {
- $buttonDetail = new KakaoButton();
- $buttonDetail->fromJsonInfo($jsonInfo->btns[$i]);
- $btnsList[$i] = $buttonDetail;
- }
- $this->btns = $btnsList;
- }
-
- }
-
-} // end of KakaoSentInfo class
-
-class KakaoSentInfoDetail
-{
- public $state;
- public $sendDT;
- public $receiveNum;
- public $receiveName;
- public $content;
- public $result;
- public $resultDT;
- public $altSubject;
- public $altContent;
- public $contentType;
- public $altContentType;
- public $altSendDT;
- public $altResult;
- public $altResultDT;
- public $reserveDT;
- public $receiptNum;
- public $requestNum;
- public $interOPRefKey;
-
- public function fromJsonInfo($jsonInfo)
- {
- isset($jsonInfo->state) ? ($this->state = $jsonInfo->state) : null;
- isset($jsonInfo->sendDT) ? ($this->sendDT = $jsonInfo->sendDT) : null;
- isset($jsonInfo->receiveNum) ? ($this->receiveNum = $jsonInfo->receiveNum) : null;
- isset($jsonInfo->receiveName) ? ($this->receiveName = $jsonInfo->receiveName) : null;
- isset($jsonInfo->content) ? ($this->content = $jsonInfo->content) : null;
- isset($jsonInfo->result) ? ($this->result = $jsonInfo->result) : null;
- isset($jsonInfo->resultDT) ? ($this->resultDT = $jsonInfo->resultDT) : null;
- isset($jsonInfo->altSubject) ? ($this->altSubject = $jsonInfo->altSubject) : null;
- isset($jsonInfo->altContent) ? ($this->altContent = $jsonInfo->altContent) : null;
- isset($jsonInfo->contentType) ? ($this->contentType = $jsonInfo->contentType) : null;
- isset($jsonInfo->altContentType) ? ($this->altContentType = $jsonInfo->altContentType) : null;
- isset($jsonInfo->altSendDT) ? ($this->altSendDT = $jsonInfo->altSendDT) : null;
- isset($jsonInfo->altResult) ? ($this->altResult = $jsonInfo->altResult) : null;
- isset($jsonInfo->altResultDT) ? ($this->altResultDT = $jsonInfo->altResultDT) : null;
- isset($jsonInfo->reserveDT) ? ($this->reserveDT = $jsonInfo->reserveDT) : null;
- isset($jsonInfo->receiptNum) ? ($this->receiptNum = $jsonInfo->receiptNum) : null;
- isset($jsonInfo->requestNum) ? ($this->requestNum = $jsonInfo->requestNum) : null;
- isset($jsonInfo->interOPRefKey) ? ($this->interOPRefKey = $jsonInfo->interOPRefKey) : null;
- }
-}
-
-class ATSTemplate
-{
- public $templateCode;
- public $templateName;
- public $template;
- public $plusFriendID;
- public $ads;
- public $appendix;
- public $btns;
- public $secureYN;
- public $state;
- public $stateDT;
-
- public function fromJsonInfo($jsonInfo)
- {
- isset($jsonInfo->templateCode) ? $this->templateCode = $jsonInfo->templateCode : null;
- isset($jsonInfo->templateName) ? $this->templateName = $jsonInfo->templateName : null;
- isset($jsonInfo->template) ? $this->template = $jsonInfo->template : null;
- isset($jsonInfo->plusFriendID) ? $this->plusFriendID = $jsonInfo->plusFriendID : null;
- isset($jsonInfo->ads) ? $this->ads = $jsonInfo->ads : null;
- isset($jsonInfo->appendix) ? $this->appendix = $jsonInfo->appendix : null;
- isset($jsonInfo->secureYN) ? $this->secureYN = $jsonInfo->secureYN : null;
- isset($jsonInfo->state) ? $this->state = $jsonInfo->state : null;
- isset($jsonInfo->stateDT) ? $this->stateDT = $jsonInfo->stateDT : null;
-
- if(isset($jsonInfo->btns)){
- $InfoList = array();
- for ($i = 0; $i < Count($jsonInfo->btns); $i++) {
- $InfoObj = new KakaoButton();
- $InfoObj->fromJsonInfo($jsonInfo->btns[$i]);
- $InfoList[$i] = $InfoObj;
- }
- $this->btns = $InfoList;
- }
- }
-}
-
-class KakaoButton
-{
- public $n;
- public $t;
- public $u1;
- public $u2;
- public $tg;
-
- function fromJsonInfo($jsonInfo)
- {
- isset($jsonInfo->n) ? $this->n = $jsonInfo->n : null;
- isset($jsonInfo->t) ? $this->t = $jsonInfo->t : null;
- isset($jsonInfo->u1) ? $this->u1 = $jsonInfo->u1 : null;
- isset($jsonInfo->u2) ? $this->u2 = $jsonInfo->u2 : null;
- isset($jsonInfo->tg) ? $this->tg = $jsonInfo->tg : null;
- }
-}
-
-class PlusFriend
-{
- public $plusFriendID;
- public $plusFriendName;
- public $regDT;
- public $state;
- public $stateDT;
-
- function fromJsonInfo($jsonInfo)
- {
- isset($jsonInfo->plusFriendID) ? $this->plusFriendID = $jsonInfo->plusFriendID : null;
- isset($jsonInfo->plusFriendName) ? $this->plusFriendName = $jsonInfo->plusFriendName : null;
- isset($jsonInfo->regDT) ? $this->regDT = $jsonInfo->regDT : null;
- isset($jsonInfo->state) ? $this->state = $jsonInfo->state : null;
- isset($jsonInfo->stateDT) ? $this->stateDT = $jsonInfo->stateDT : null;
- }
-}
-
-
-?>
diff --git a/plugin/kakao5/Popbill/PopbillMessaging.php b/plugin/kakao5/Popbill/PopbillMessaging.php
deleted file mode 100644
index 39abde98e..000000000
--- a/plugin/kakao5/Popbill/PopbillMessaging.php
+++ /dev/null
@@ -1,619 +0,0 @@
-AddScope('150');
- $this->AddScope('151');
- $this->AddScope('152');
- }
-
- // 전송단가 확인
- public function GetUnitCost($CorpNum, $MessageType) {
- if($this->isNullOrEmpty($CorpNum)) {
- throw new PopbillException('팝빌회원 사업자번호가 입력되지 않았습니다.');
- }
- if($this->isNullOrEmpty($MessageType)) {
- throw new PopbillException('문자 전송유형이 입력되지 않았습니다.');
- }
-
- return $this->executeCURL('/Message/UnitCost?Type=' . $MessageType, $CorpNum)->unitCost;
- }
-
- // 발신번호 등록여부 확인
- public function CheckSenderNumber($CorpNum, $SenderNumber, $UserID = null) {
- if($this->isNullOrEmpty($CorpNum)) {
- throw new PopbillException('팝빌회원 사업자번호가 입력되지 않았습니다.');
- }
- if($this->isNullOrEmpty($SenderNumber)) {
- throw new PopbillException('발신번호가 입력되지 않았습니다.');
- }
-
- return $this->executeCURL('/Message/CheckSenderNumber/' . $SenderNumber, $CorpNum, $UserID);
- }
-
- /* 단문메시지 전송
- * $CorpNum => 발송사업자번호
- * $Sender => 동보전송용 발신번호 미기재시 개별메시지 발신번호로 전송. 발신번호가 없는 개별메시지에만 동보처리함.
- * $Content => 동보전송용 발신내용 미기재시 개별메시지 내용으로 전송, 발신내용이 없는 개별메시지에만 동보처리함.
- * $Messages => 발신메시지 최대 1000건, 배열
- * 'snd' => 개별발신번호
- * 'sndnm'=> 발신자명
- * 'rcv' => 수신번호, 필수
- * 'rcvnm'=> 수신자 성명
- * 'msg' => 메시지 내용, 미기재시 동보메시지로 전송함.
- * 'sjt' => 메시지 제목(SMS 사용 불가, 미입력시 팝빌에서 설정한 기본값 사용)
- * 'interOPRefKey'=> 파트너 지정 키(SMS/LMS/MMS 대량/동보전송시 파트너가 개별건마다 입력할 수 있는 값)
- * $ReserveDT => 예약전송시 예약시간 yyyyMMddHHmmss 형식으로 기재
- * $adsYN => 광고메시지 전송여부, true:광고/false:일반 중 택 1
- * $UserID => 발신자 팝빌 회원아이디
- * $SenderName=> 동보전송용 발신자명 미기재시 개별메시지 발신자명으로 전송
- * $requestNum=> 전송 요청번호
- */
- public function SendSMS($CorpNum, $Sender = null, $Content = null, $Messages = array(), $ReserveDT = null, $adsYN = false, $UserID = null, $SenderName = null, $RequestNum = null)
- {
- return $this->SendMessage(ENumMessageType::SMS, $CorpNum, $Sender, $SenderName, null, $Content, $Messages, $ReserveDT, $adsYN, $UserID, $RequestNum);
- }
-
- /* 장문메시지 전송
- * $CorpNum => 발송사업자번호
- * $Sender => 동보전송용 발신번호 미기재시 개별메시지 발신번호로 전송. 발신번호가 없는 개별메시지에만 동보처리함.
- * $Subject => 동보전송용 제목 미기재시 개별메시지 제목으로 전송, 제목이 없는 개별메시지에만 동보처리함.
- * $Content => 동보전송용 발신내용 미기재시 개별베시지 내용으로 전송, 발신내용이 없는 개별메시지에만 동보처리함.
- * $Messages => 발신메시지 최대 1000건, 배열
- * 'snd' => 개별발신번호
- * 'sndnm'=> 발신자명
- * 'rcv' => 수신번호, 필수
- * 'rcvnm'=> 수신자 성명
- * 'msg' => 메시지 내용, 미기재시 동보메시지로 전송함.
- * 'sjt' => 메시지 제목(SMS 사용 불가, 미입력시 팝빌에서 설정한 기본값 사용)
- * 'interOPRefKey'=> 파트너 지정 키(SMS/LMS/MMS 대량/동보전송시 파트너가 개별건마다 입력할 수 있는 값)
- * $ReserveDT => 예약전송시 예약시간 yyyyMMddHHmmss 형식으로 기재
- * $adsYN => 광고메시지 전송여부, true:광고/false:일반 중 택 1
- * $UserID => 발신자 팝빌 회원아이디
- * $SenderName=> 동보전송용 발신자명 미기재시 개별메시지 발신자명으로 전송
- * $requestNum=> 전송 요청번호
- */
- public function SendLMS($CorpNum, $Sender = null, $Subject = null, $Content = null, $Messages = array(), $ReserveDT = null, $adsYN = false, $UserID = null, $SenderName = null, $RequestNum = null)
- {
- return $this->SendMessage(ENumMessageType::LMS, $CorpNum, $Sender, $SenderName, $Subject, $Content, $Messages, $ReserveDT, $adsYN, $UserID, $RequestNum);
- }
-
- /* 장/단문메시지 전송 - 메지시 길이에 따라 단문과 장문을 선택하여 전송합니다.
- * $CorpNum => 발송사업자번호
- * $Sender => 동보전송용 발신번호 미기재시 개별메시지 발신번호로 전송. 발신번호가 없는 개별메시지에만 동보처리함.
- * $Subject => 동보전송용 제목 미기재시 개별메시지 제목으로 전송, 제목이 없는 개별메시지에만 동보처리함.
- * $Content => 동보전송용 발신내용 미기재시 개별베시지 내용으로 전송, 발신내용이 없는 개별메시지에만 동보처리함.
- * $Messages => 발신메시지 최대 1000건, 배열
- * 'snd' => 개별발신번호
- * 'sndnm'=> 발신자명
- * 'rcv' => 수신번호, 필수
- * 'rcvnm'=> 수신자 성명
- * 'msg' => 메시지 내용, 미기재시 동보메시지로 전송함.
- * 'sjt' => 메시지 제목(SMS 사용 불가, 미입력시 팝빌에서 설정한 기본값 사용)
- * 'interOPRefKey'=> 파트너 지정 키(SMS/LMS/MMS 대량/동보전송시 파트너가 개별건마다 입력할 수 있는 값)
- * $ReserveDT => 예약전송시 예약시간 yyyyMMddHHmmss 형식으로 기재
- * $adsYN => 광고메시지 전송여부, true:광고/false:일반 중 택 1
- * $UserID => 발신자 팝빌 회원아이디
- * $SenderName=> 동보전송용 발신자명 미기재시 개별메시지 발신자명으로 전송
- * $requestNum=> 전송 요청번호
- */
- public function SendXMS($CorpNum, $Sender = null, $Subject = null, $Content = null, $Messages = array(), $ReserveDT = null, $adsYN = false, $UserID = null, $SenderName = null, $RequestNum = null)
- {
- return $this->SendMessage(ENumMessageType::XMS, $CorpNum, $Sender, $SenderName, $Subject, $Content, $Messages, $ReserveDT, $adsYN, $UserID, $RequestNum);
- }
-
- /* MMS 메시지 전송
- * $CorpNum => 발송사업자번호
- * $Sender => 동보전송용 발신번호 미기재시 개별메시지 발신번호로 전송. 발신번호가 없는 개별메시지에만 동보처리함.
- * $Subject => 동보전송용 제목 미기재시 개별메시지 제목으로 전송, 제목이 없는 개별메시지에만 동보처리함.
- * $Content => 동보전송용 발신내용 미기재시 개별베시지 내용으로 전송, 발신내용이 없는 개별메시지에만 동보처리함.
- * $Messages => 발신메시지 최대 1000건, 배열
- * 'snd' => 개별발신번호
- * 'sndnm'=> 발신자명
- * 'rcv' => 수신번호, 필수
- * 'rcvnm'=> 수신자 성명
- * 'msg' => 메시지 내용, 미기재시 동보메시지로 전송함.
- * 'sjt' => 메시지 제목(SMS 사용 불가, 미입력시 팝빌에서 설정한 기본값 사용)
- * 'interOPRefKey'=> 파트너 지정 키(SMS/LMS/MMS 대량/동보전송시 파트너가 개별건마다 입력할 수 있는 값)
- * $FilePaths => 전송할 파일경로 문자열
- * $ReserveDT => 예약전송시 예약시간 yyyyMMddHHmmss 형식으로 기재
- * $adsYN => 광고메시지 전송여부, true:광고/false:일반 중 택 1
- * $UserID => 발신자 팝빌 회원아이디
- * $SenderName => 동보전송용 발신자명 미기재시 개별메시지 발신자명으로 전송
- * $requestNum => 전송 요청번호
- */
- public function SendMMS($CorpNum, $Sender = null, $Subject = null, $Content = null, $Messages = array(), $FilePaths = array(), $ReserveDT = null, $adsYN = false, $UserID = null, $SenderName = null, $RequestNum = null)
- {
- if($this->isNullOrEmpty($CorpNum)) {
- throw new PopbillException('팝빌회원 사업자번호가 입력되지 않았습니다.');
- }
- if($this->isNullOrEmpty($Messages)) {
- throw new PopbillException('전송할 메시지가 입력되지 않았습니다.');
- }
- if($this->isNullOrEmpty($FilePaths)) {
- throw new PopbillException('전송할 이미지 파일 경로가 입력되지 않았습니다.');
- }
- if(!$this->isNullOrEmpty($ReserveDT) && !$this->isValidDT($ReserveDT)) {
- throw new PopbillException('전송 예약일시가 유효하지 않습니다.');
- }
-
- $Request = array();
-
- if(!$this->isNullOrEmpty($Sender)) $Request['snd'] = $Sender;
- if(!$this->isNullOrEmpty($Subject)) $Request['subject'] = $Subject;
- if(!$this->isNullOrEmpty($Content)) $Request['content'] = $Content;
- if(!$this->isNullOrEmpty($ReserveDT)) $Request['sndDT'] = $ReserveDT;
- if(!$this->isNullOrEmpty($SenderName)) $Request['sndnm'] = $SenderName;
- if(!$this->isNullOrEmpty($RequestNum)) $Request['requestNum'] = $RequestNum;
-
- if ($adsYN) $Request['adsYN'] = $adsYN;
-
- $Request['msgs'] = $Messages;
-
- $postdata = array();
- $postdata['form'] = json_encode($Request);
-
- $i = 0;
-
- foreach ($FilePaths as $FilePath) {
- $postdata['file'] = '@' . $FilePath;
- }
-
- return $this->executeCURL('/MMS', $CorpNum, $UserID, true, null, $postdata, true)->receiptNum;
- }
-
- /* 전송메시지 내역 및 전송상태 확인
- * $CorpNum => 발송사업자번호
- * $ReceiptNum=> 접수번호
- * $UserID => 팝빌 회원아이디
- */
- public function GetMessages($CorpNum, $ReceiptNum, $UserID = null)
- {
- if($this->isNullOrEmpty($CorpNum)) {
- throw new PopbillException('팝빌회원 사업자번호가 입력되지 않았습니다.');
- }
- if($this->isNullOrEmpty($ReceiptNum)) {
- throw new PopbillException('접수번호가 입력되지 않았습니다.');
- }
-
- $result = $this->executeCURL('/Message/' . $ReceiptNum, $CorpNum, $UserID);
-
- $MessageInfoList = array();
-
- for ($i = 0; $i < Count($result); $i++) {
- $MsgInfo = new MessageInfo();
- $MsgInfo->fromJsonInfo($result[$i]);
- $MessageInfoList[$i] = $MsgInfo;
- }
- return $MessageInfoList;
- }
-
- /* 전송메시지 내역 및 전송상태 확인
- * $CorpNum => 발송사업자번호
- * $RequestNum=> 전송요청번호
- * $UserID => 팝빌 회원아이디
- */
- public function GetMessagesRN($CorpNum, $RequestNum, $UserID = null)
- {
- if($this->isNullOrEmpty($CorpNum)) {
- throw new PopbillException('팝빌회원 사업자번호가 입력되지 않았습니다.');
- }
- if($this->isNullOrEmpty($RequestNum)) {
- throw new PopbillException('전송요청번호가 입력되지 않았습니다.');
- }
-
- $result = $this->executeCURL('/Message/Get/' . $RequestNum, $CorpNum, $UserID);
-
- $MessageInfoList = array();
-
- for ($i = 0; $i < Count($result); $i++) {
- $MsgInfo = new MessageInfo();
- $MsgInfo->fromJsonInfo($result[$i]);
- $MessageInfoList[$i] = $MsgInfo;
- }
- return $MessageInfoList;
- }
-
- /* 예약전송 취소
- * $CorpNum => 발송사업자번호
- * $ReceiptNum=> 접수번호
- * $UserID => 팝빌 회원아이디
- */
- public function CancelReserve($CorpNum, $ReceiptNum, $UserID = null)
- {
- if($this->isNullOrEmpty($CorpNum)) {
- throw new PopbillException('팝빌회원 사업자번호가 입력되지 않았습니다.');
- }
- if($this->isNullOrEmpty($ReceiptNum)) {
- throw new PopbillException('예약전송 취소할 접수번호가 입력되지 않았습니다.');
- }
-
- return $this->executeCURL('/Message/' . $ReceiptNum . '/Cancel', $CorpNum, $UserID);
- }
-
- /* 예약전송 취소
- * $CorpNum => 발송사업자번호
- * $RequestNum=> 전송요청번호
- * $UserID => 팝빌 회원아이디
- */
- public function CancelReserveRN($CorpNum, $RequestNum, $UserID = null)
- {
- if($this->isNullOrEmpty($CorpNum)) {
- throw new PopbillException('팝빌회원 사업자번호가 입력되지 않았습니다.');
- }
- if($this->isNullOrEmpty($RequestNum)) {
- throw new PopbillException('예약전송 취소할 전송요청번호가 입력되지 않았습니다.');
- }
-
- return $this->executeCURL('/Message/Cancel/' . $RequestNum, $CorpNum, $UserID);
- }
-
- /* 예약전송 취소
- * $CorpNum => 발송사업자번호
- * $ReceiptNum => 접수번호
- * $ReceiveNum => 수신번호
- * $UserID => 팝빌 회원아이디
- */
- public function CancelReservebyRCV($CorpNum, $ReceiptNum, $ReceiveNum, $UserID = null)
- {
- if($this->isNullOrEmpty($CorpNum)) {
- throw new PopbillException('팝빌회원 사업자번호가 입력되지 않았습니다.');
- }
- if($this->isNullOrEmpty($ReceiptNum)) {
- throw new PopbillException('예약전송 취소할 접수번호가 입력되지 않았습니다.');
- }
- if($this->isNullOrEmpty($ReceiveNum)) {
- throw new PopbillException('예약전송 취소할 수신번호가 입력되지 않았습니다.');
- }
-
- $postdata = json_encode($ReceiveNum);
-
- return $this->executeCURL('/Message/' . $ReceiptNum . '/Cancel', $CorpNum, $UserID, true, null, $postdata);
- }
-
- /* 예약전송 취소
- * $CorpNum => 발송사업자번호
- * $RequestNum => 전송요청번호
- * $ReceiveNum => 수신번호
- * $UserID => 팝빌 회원아이디
- */
- public function CancelReserveRNbyRCV($CorpNum, $RequestNum, $ReceiveNum, $UserID = null)
- {
- if($this->isNullOrEmpty($CorpNum)) {
- throw new PopbillException('팝빌회원 사업자번호가 입력되지 않았습니다.');
- }
- if($this->isNullOrEmpty($RequestNum)) {
- throw new PopbillException('예약전송 취소할 전송요청번호가 입력되지 않았습니다.');
- }
- if($this->isNullOrEmpty($ReceiveNum)) {
- throw new PopbillException('예약전송 취소할 수신번호가 입력되지 않았습니다.');
- }
-
- $postdata = json_encode($ReceiveNum);
-
- return $this->executeCURL('/Message/Cancel/' . $RequestNum, $CorpNum, $UserID, true, null, $postdata);
- }
-
-
- private function SendMessage($MessageType, $CorpNum, $Sender, $SenderName, $Subject, $Content, $Messages = array(), $ReserveDT = null, $adsYN = false, $UserID = null, $RequestNum = null)
- {
- if($this->isNullOrEmpty($CorpNum)) {
- throw new PopbillException('팝빌회원 사업자번호가 입력되지 않았습니다.');
- }
- if($this->isNullOrEmpty($Messages)) {
- throw new PopbillException('전송할 메시지가 입력되지 않았습니다.');
- }
- if(!$this->isNullOrEmpty($ReserveDT) && !$this->isValidDT($ReserveDT)) {
- throw new PopbillException('전송 예약일시가 유효하지 않습니다.');
- }
-
- $Request = array();
-
- if(!$this->isNullOrEmpty($Sender)) $Request['snd'] = $Sender;
- if(!$this->isNullOrEmpty($SenderName)) $Request['sndnm'] = $SenderName;
- if(!$this->isNullOrEmpty($Content)) $Request['content'] = $Content;
- if(!$this->isNullOrEmpty($Subject)) $Request['subject'] = $Subject;
- if(!$this->isNullOrEmpty($ReserveDT)) $Request['sndDT'] = $ReserveDT;
- if(!$this->isNullOrEmpty($RequestNum)) $Request['requestNum'] = $RequestNum;
-
- if ($adsYN) $Request['adsYN'] = $adsYN;
-
- $Request['msgs'] = $Messages;
-
- $postdata = json_encode($Request);
- return $this->executeCURL('/' . $MessageType, $CorpNum, $UserID, true, null, $postdata)->receiptNum;
- }
-
- // 문자 관련 URL함수
- public function GetURL($CorpNum, $UserID = null, $TOGO)
- {
- $response = $this->executeCURL('/Message/?TG=' . $TOGO, $CorpNum, $UserID);
- return $response->url;
- }
-
- // 문자 전송내역 팝업 URL
- public function GetSentListURL($CorpNum, $UserID = null)
- {
- if($this->isNullOrEmpty($CorpNum)) {
- throw new PopbillException('팝빌회원 사업자번호가 입력되지 않았습니다.');
- }
-
- $response = $this->executeCURL('/Message/?TG=BOX', $CorpNum, $UserID);
- return $response->url;
- }
-
- // 발신번호 관리 팝업 URL
- public function GetSenderNumberMgtURL($CorpNum, $UserID = null)
- {
- if($this->isNullOrEmpty($CorpNum)) {
- throw new PopbillException('팝빌회원 사업자번호가 입력되지 않았습니다.');
- }
-
- $response = $this->executeCURL('/Message/?TG=SENDER', $CorpNum, $UserID);
- return $response->url;
- }
-
- // 문자 전송내역 조회
- public function Search($CorpNum, $SDate, $EDate, $State = array(), $Item = array(), $ReserveYN = null, $SenderYN = false, $Page = null, $PerPage = null, $Order = null, $UserID = null, $QString = null)
- {
- if($this->isNullOrEmpty($CorpNum)) {
- throw new PopbillException('팝빌회원 사업자번호가 입력되지 않았습니다.');
- }
- if($this->isNullOrEmpty($SDate)) {
- throw new PopbillException('시작일자가 입력되지 않았습니다.');
- }
- if(!$this->isValidDate($SDate)) {
- throw new PopbillException('시작일자가 유효하지 않습니다.');
- }
- if($this->isNullOrEmpty($EDate)) {
- throw new PopbillException('종료일자가 입력되지 않았습니다.');
- }
- if(!$this->isValidDate($EDate)) {
- throw new PopbillException('종료일자가 유효하지 않습니다.');
- }
- if($this->isNullOrEmpty($State)) {
- throw new PopbillException('전송상태가 입력되지 않았습니다.');
- }
-
- $uri = '/Message/Search';
- $uri .= '?SDate=' . $SDate;
- $uri .= '&EDate=' . $EDate;
- $uri .= '&State=' . implode(',', $State);
-
- if(!$this->isNullOrEmpty($Item)) {
- $uri .= '&Item=' . implode(',', $Item);
- }
- if(!is_null($ReserveYN)) {
- if ($ReserveYN) {
- $uri .= '&ReserveYN=1';
- } else {
- $uri .= '&ReserveYN=0';
- }
- }
- if ($SenderYN) {
- $uri .= '&SenderOnly=1';
- } else {
- $uri .= '&SenderOnly=0';
- }
-
- if(!$this->isNullOrEmpty($Page)) {
- $uri .= '&Page=' . $Page;
- }
- if(!$this->isNullOrEmpty($PerPage)) {
- $uri .= '&PerPage=' . $PerPage;
- }
- if(!$this->isNullOrEmpty($Order)) {
- $uri .= '&Order=' . $Order;
- }
- if(!$this->isNullOrEmpty($QString)) {
- $uri .= '&QString=' . urlencode($QString);
- }
-
- $response = $this->executeCURL($uri, $CorpNum, $UserID);
-
- $SearchList = new MsgSearchResult();
- $SearchList->fromJsonInfo($response);
-
- return $SearchList;
- }
-
- // 080 수신거부목록 조회
- public function GetAutoDenyList($CorpNum, $UserID = null)
- {
- if($this->isNullOrEmpty($CorpNum)) {
- throw new PopbillException('팝빌회원 사업자번호가 입력되지 않았습니다.');
- }
-
- return $this->executeCURL('/Message/Denied', $CorpNum, $UserID);
- }
-
- // 080 수신거부 조회
- public function CheckAutoDenyNumber($CorpNum, $UserID = null)
- {
- if($this->isNullOrEmpty($CorpNum)) {
- throw new PopbillException('팝빌회원 사업자번호가 입력되지 않았습니다.');
- }
-
- return $this->executeCURL('/Message/AutoDenyNumberInfo', $CorpNum, $UserID);
- }
-
- public function GetChargeInfo($CorpNum, $MessageType, $UserID = null)
- {
- if($this->isNullOrEmpty($CorpNum)) {
- throw new PopbillException('팝빌회원 사업자번호가 입력되지 않았습니다.');
- }
- if($this->isNullOrEmpty($MessageType)) {
- throw new PopbillException('문자 전송유형이 입력되지 않았습니다.');
- }
-
- $uri = '/Message/ChargeInfo?Type=' . $MessageType;
-
- $response = $this->executeCURL($uri, $CorpNum, $UserID);
- $ChargeInfo = new ChargeInfo();
- $ChargeInfo->fromJsonInfo($response);
-
- return $ChargeInfo;
- }
-
- // 발신번호 목록 조회
- public function GetSenderNumberList($CorpNum, $UserID = null)
- {
- if($this->isNullOrEmpty($CorpNum)) {
- throw new PopbillException('팝빌회원 사업자번호가 입력되지 않았습니다.');
- }
-
- return $this->executeCURL('/Message/SenderNumber', $CorpNum, $UserID);
- }
-
- // 문자전송결과
- public function GetStates($CorpNum, $ReceiptNumList = array(), $UserID = null)
- {
- if (is_null($ReceiptNumList) || empty($ReceiptNumList)) {
- throw new PopbillException('접수번호가 입력되지 않았습니다.');
- }
-
- $postdata = json_encode($ReceiptNumList);
- $result = $this->executeCURL('/Message/States', $CorpNum, $UserID, true, null, $postdata);
- $MsgInfoList = array();
-
- for ($i = 0; $i < Count($result); $i++) {
- $MsgInfo = new MessageBriefInfo();
- $MsgInfo->fromJsonInfo($result[$i]);
- $MsgInfoList[$i] = $MsgInfo;
- }
-
- return $MsgInfoList;
- }
-}
-
-class ENumMessageType
-{
- const SMS = 'SMS';
- const LMS = 'LMS';
- const XMS = 'XMS';
- const MMS = 'MMS';
-}
-
-class MsgSearchResult
-{
- public $code;
- public $total;
- public $perPage;
- public $pageNum;
- public $pageCount;
- public $message;
- public $list;
-
- public function fromJsonInfo($jsonInfo)
- {
- isset($jsonInfo->code) ? $this->code = $jsonInfo->code : null;
- isset($jsonInfo->total) ? $this->total = $jsonInfo->total : null;
- isset($jsonInfo->perPage) ? $this->perPage = $jsonInfo->perPage : null;
- isset($jsonInfo->pageCount) ? $this->pageCount = $jsonInfo->pageCount : null;
- isset($jsonInfo->pageNum) ? $this->pageNum = $jsonInfo->pageNum : null;
- isset($jsonInfo->message) ? $this->message = $jsonInfo->message : null;
-
- $InfoList = array();
-
- for ($i = 0; $i < Count($jsonInfo->list); $i++) {
- $InfoObj = new MessageInfo();
- $InfoObj->fromJsonInfo($jsonInfo->list[$i]);
- $InfoList[$i] = $InfoObj;
- }
- $this->list = $InfoList;
- }
-}
-
-
-class MessageInfo
-{
- public $state;
- public $result;
- public $subject;
- public $type;
- public $content;
- public $tranNet;
- public $sendNum;
- public $senderName;
- public $receiveNum;
- public $receiveName;
- public $reserveDT;
- public $sendDT;
- public $resultDT;
- public $sendResult;
- public $receiptDT;
- public $receiptNum;
- public $requestNum;
- public $interOPRefKey;
-
- function fromJsonInfo($jsonInfo)
- {
- isset($jsonInfo->state) ? $this->state = $jsonInfo->state : null;
- isset($jsonInfo->result) ? $this->result = $jsonInfo->result : null;
- isset($jsonInfo->subject) ? $this->subject = $jsonInfo->subject : null;
- isset($jsonInfo->tranNet) ? $this->tranNet = $jsonInfo->tranNet : null;
- isset($jsonInfo->type) ? $this->type = $jsonInfo->type : null;
- isset($jsonInfo->content) ? $this->content = $jsonInfo->content : null;
- isset($jsonInfo->sendNum) ? $this->sendNum = $jsonInfo->sendNum : null;
- isset($jsonInfo->senderName) ? $this->senderName = $jsonInfo->senderName : null;
- isset($jsonInfo->receiveNum) ? $this->receiveNum = $jsonInfo->receiveNum : null;
- isset($jsonInfo->receiveName) ? $this->receiveName = $jsonInfo->receiveName : null;
- isset($jsonInfo->reserveDT) ? $this->reserveDT = $jsonInfo->reserveDT : null;
- isset($jsonInfo->sendDT) ? $this->sendDT = $jsonInfo->sendDT : null;
- isset($jsonInfo->resultDT) ? $this->resultDT = $jsonInfo->resultDT : null;
- isset($jsonInfo->sendResult) ? $this->sendResult = $jsonInfo->sendResult : null;
- isset($jsonInfo->receiptDT) ? $this->receiptDT = $jsonInfo->receiptDT : null;
- isset($jsonInfo->receiptNum) ? $this->receiptNum = $jsonInfo->receiptNum : null;
- isset($jsonInfo->requestNum) ? $this->requestNum = $jsonInfo->requestNum : null;
- isset($jsonInfo->interOPRefKey) ? $this->interOPRefKey = $jsonInfo->interOPRefKey : null;
- }
-}
-
-class MessageBriefInfo
-{
- public $sn;
- public $rNum;
- public $stat;
- public $sDT;
- public $rDT;
- public $rlt;
- public $net;
- public $srt;
-
- function fromJsonInfo($jsonInfo)
- {
- isset($jsonInfo->sn) ? $this->sn = $jsonInfo->sn : null;
- isset($jsonInfo->rNum) ? $this->rNum = $jsonInfo->rNum : null;
- isset($jsonInfo->stat) ? $this->stat = $jsonInfo->stat : null;
- isset($jsonInfo->sDT) ? $this->sDT = $jsonInfo->sDT : null;
- isset($jsonInfo->rDT) ? $this->rDT = $jsonInfo->rDT : null;
- isset($jsonInfo->rlt) ? $this->rlt = $jsonInfo->rlt : null;
- isset($jsonInfo->net) ? $this->net = $jsonInfo->net : null;
- isset($jsonInfo->srt) ? $this->srt = $jsonInfo->srt : null;
- }
-}
-
-?>
diff --git a/plugin/kakao5/Popbill/README.md b/plugin/kakao5/Popbill/README.md
deleted file mode 100644
index 847044a4a..000000000
--- a/plugin/kakao5/Popbill/README.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# popbill.sdk.php5
-팝빌 SDK for PHP5
diff --git a/plugin/kakao5/Popbill/crypto.php b/plugin/kakao5/Popbill/crypto.php
deleted file mode 100644
index 04072f546..000000000
--- a/plugin/kakao5/Popbill/crypto.php
+++ /dev/null
@@ -1,44 +0,0 @@
-keyInstance($key);
-
- openssl_public_encrypt($data, $encrypted, $publickey, OPENSSL_PKCS1_OAEP_PADDING);
-
- return base64_encode($encrypted);
- }
-
- public function keyInstance($publickey) {
- // startline , endline 설정
- $start_line = "-----BEGIN PUBLIC KEY-----";
- $end_line = "-----END PUBLIC KEY-----";
-
- // key 추출 (정규식)
- $pattern = "/-+([a-zA-Z\s]*)-+([^-]*)-+([a-zA-Z\s]*)-+/";
- if(preg_match($pattern, $publickey, $matches)) {
- $splitKey = $matches[2];
- $splitKey = preg_replace('/\s+/', '', $splitKey);
- } else {
- return null;
- }
-
- $key = "";
-
- for($pos=1; $pos <= strlen($splitKey); $pos++) {
- if($pos % 64 == 0) {
- $key = $key . $splitKey[$pos-1] . "\n";
- } else {
- $key = $key . $splitKey[$pos-1];
- }
- }
-
- // startline, endline 추가
- $key = $start_line . "\n" . $key . "\n" . $end_line;
-
- return $key;
- }
-}
-
-?>
\ No newline at end of file
diff --git a/plugin/kakao5/Popbill/popbill.php b/plugin/kakao5/Popbill/popbill.php
deleted file mode 100644
index 7a66d9203..000000000
--- a/plugin/kakao5/Popbill/popbill.php
+++ /dev/null
@@ -1,930 +0,0 @@
-Linkhub = Linkhub::getInstance($LinkID, $SecretKey);
- $this->scopes[] = 'member';
- }
-
- public function IsTest($T)
- {
- $this->IsTest = $T;
- }
-
- public function IPRestrictOnOff($V)
- {
- $this->IPRestrictOnOff = $V;
- }
-
- public function UseStaticIP($V)
- {
- $this->UseStaticIP = $V;
- }
-
- public function UseGAIP($V)
- {
- $this->UseGAIP = $V;
- }
-
- public function UseLocalTimeYN($V)
- {
- $this->UseLocalTimeYN = $V;
- }
-
- protected function AddScope($scope)
- {
- $this->scopes[] = $scope;
- }
-
- private function getsession_Token($CorpNum)
- {
- $targetToken = null;
-
- if (array_key_exists($CorpNum, $this->Token_Table)) {
- $targetToken = $this->Token_Table[$CorpNum];
- }
-
- $Refresh = false;
-
- if (is_null($targetToken)) {
- $Refresh = true;
- } else {
- $Expiration = new DateTime($targetToken->expiration, new DateTimeZone("UTC"));
-
- $now = $this->Linkhub->getTime($this->UseStaticIP, $this->UseLocalTimeYN, $this->UseGAIP);
- $Refresh = $Expiration < $now;
- }
-
- if ($Refresh) {
- try {
- $targetToken = $this->Linkhub->getToken($this->IsTest ? PopbillBase::ServiceID_TEST : PopbillBase::ServiceID_REAL, $CorpNum, $this->scopes, $this->IPRestrictOnOff ? null : "*", $this->UseStaticIP, $this->UseLocalTimeYN, $this->UseGAIP);
- } catch (LinkhubException $le) {
- throw new PopbillException($le->getMessage(), $le->getCode());
- }
- $this->Token_Table[$CorpNum] = $targetToken;
- }
- return $targetToken->session_token;
- }
-
- // ID 중복 확인
- public function CheckID($ID)
- {
- if (is_null($ID) || empty($ID)) {
- throw new PopbillException('조회할 아이디가 입력되지 않았습니다.');
- }
- return $this->executeCURL('/IDCheck?ID=' . $ID);
- }
-
- // 담당자 추가
- public function RegistContact($CorpNum, $ContactInfo, $UserID = null)
- {
- $postdata = json_encode($ContactInfo);
- return $this->executeCURL('/IDs/New', $CorpNum, $UserID, true, null, $postdata);
- }
-
- // 담당자 정보 수정
- public function UpdateContact($CorpNum, $ContactInfo, $UserID)
- {
- $postdata = json_encode($ContactInfo);
- return $this->executeCURL('/IDs', $CorpNum, $UserID, true, null, $postdata);
- }
-
- // 담당자 정보 확인
- public function GetContactInfo($CorpNum, $ContactID, $UserID = null)
- {
- $postdata = '{"id":' . '"' . $ContactID . '"}';
- return $this->executeCURL('/Contact', $CorpNum, $UserID, true, null, $postdata);
- }
-
- // 담당자 목록 조회
- public function ListContact($CorpNum, $UserID = null)
- {
- $ContactInfoList = array();
-
- $response = $this->executeCURL('/IDs', $CorpNum, $UserID);
-
- for ($i = 0; $i < Count($response); $i++) {
- $ContactInfo = new ContactInfo();
- $ContactInfo->fromJsonInfo($response[$i]);
- $ContactInfoList[$i] = $ContactInfo;
- }
-
- return $ContactInfoList;
- }
-
- // 회사정보 확인
- public function GetCorpInfo($CorpNum, $UserID = null)
- {
- $response = $this->executeCURL('/CorpInfo', $CorpNum, $UserID);
-
- $CorpInfo = new CorpInfo();
- $CorpInfo->fromJsonInfo($response);
- return $CorpInfo;
- }
-
- // 회사정보 수정
- public function UpdateCorpInfo($CorpNum, $CorpInfo, $UserID = null)
- {
- $postdata = json_encode($CorpInfo);
- return $this->executeCURL('/CorpInfo', $CorpNum, $UserID, true, null, $postdata);
- }
-
- //팝빌 연결 URL함수
- public function GetPopbillURL($CorpNum, $UserID, $TOGO)
- {
- $response = $this->executeCURL('/Member?TG=' . $TOGO, $CorpNum, $UserID);
- return $response->url;
- }
-
- //팝빌 로그인 URL
- public function GetAccessURL($CorpNum, $UserID)
- {
- $response = $this->executeCURL('/Member?TG=LOGIN', $CorpNum, $UserID);
- return $response->url;
- }
-
- // 연동회원 포인트 충전 팝업 URL
- public function GetChargeURL($CorpNum, $UserID)
- {
- $response = $this->executeCURL('/Member?TG=CHRG', $CorpNum, $UserID);
- return $response->url;
- }
-
- // 연동회원 포인트 결제내역 팝업 URL
- public function GetPaymentURL($CorpNum, $UserID)
- {
- $response = $this->executeCURL('/Member?TG=PAYMENT', $CorpNum, $UserID);
- return $response->url;
- }
-
- // 연동회원 포인트 사용내역 팝업 URL
- public function GetUseHistoryURL($CorpNum, $UserID)
- {
- $response = $this->executeCURL('/Member?TG=USEHISTORY', $CorpNum, $UserID);
- return $response->url;
- }
-
- //가입여부 확인
- public function CheckIsMember($CorpNum, $LinkID)
- {
- return $this->executeCURL('/Join?CorpNum=' . $CorpNum . '&LID=' . $LinkID);
- }
-
- //회원가입
- public function JoinMember($JoinForm)
- {
- $postdata = json_encode($JoinForm);
- return $this->executeCURL('/Join', null, null, true, null, $postdata);
- }
-
- // 연동회원 잔여포인트 확인
- public function GetBalance($CorpNum)
- {
- try {
- return $this->Linkhub->getBalance($this->getsession_Token($CorpNum), $this->IsTest ? PopbillBase::ServiceID_TEST : PopbillBase::ServiceID_REAL, $this->UseStaticIP, $this->UseGAIP);
- } catch (LinkhubException $le) {
- throw new PopbillException($le->getMessage(), $le->getCode());
- }
- }
-
- // 연동회원 포인트 사용내역 확인
- public function GetUseHistory($CorpNum, $SDate, $EDate, $Page = null, $PerPage = null, $Order = null, $UserID = null)
- {
- $uri = '/UseHistory';
- $uri .= '?SDate=' . $SDate;
- $uri .= '&EDate=' . $EDate;
- $uri .= '&Page=' . $Page;
- $uri .= '&PerPage=' . $PerPage;
- $uri .= '&Order=' . $Order;
- $response = $this->executeCURL($uri, $CorpNum, $UserID);
-
- $UseHistoryResult = new UseHistoryResult();
- $UseHistoryResult->fromJsonInfo($response);
-
- return $UseHistoryResult;
- }
-
- // 연동회원 포인트 결제내역 확인
- public function GetPaymentHistory($CorpNum, $SDate, $EDate, $Page = null, $PerPage = null, $UserID = null)
- {
- $uri = '/PaymentHistory';
- $uri .= '?SDate=' . $SDate;
- $uri .= '&EDate=' . $EDate;
- $uri .= '&Page=' . $Page;
- $uri .= '&PerPage=' . $PerPage;
- $response = $this->executeCURL($uri, $CorpNum, $UserID);
-
- $PaymentHistoryResult = new PaymentHistoryResult();
- $PaymentHistoryResult->fromJsonInfo($response);
-
- return $PaymentHistoryResult;
- }
-
- // 연동회원 포인트 환불내역 확인
- public function GetRefundHistory($CorpNum, $Page = null, $PerPage = null, $UserID = null)
- {
- $uri = '/RefundHistory';
- $uri .= '?Page=' . $Page;
- $uri .= '&PerPage=' . $PerPage;
- $response = $this->executeCURL($uri, $CorpNum, $UserID);
-
- $RefundHistoryResult = new RefundHistoryResult();
- $RefundHistoryResult->fromJsonInfo($response);
-
- return $RefundHistoryResult;
- }
-
- // 연동회원 포인트 환불신청
- public function Refund($CorpNum, $RefundForm, $UserID = null)
- {
- $postdata = json_encode($RefundForm);
-
- return $this->executeCURL('/Refund', $CorpNum, $UserID, true, null, $postdata);
- }
-
- // 연동회원 무통장 입금신청
- public function PaymentRequest($CorpNum, $PaymentForm, $UserID = null)
- {
- $postdata = json_encode($PaymentForm);
-
- return $this->executeCURL('/Payment', $CorpNum, $UserID, true, null, $postdata);
- }
-
- // 연동회원 무통장 입금신청 정보확인
- public function GetSettleResult($CorpNum, $SettleCode, $UserID = null)
- {
- $uri = '/Payment/' . $SettleCode;
- $response = $this->executeCURL($uri, $CorpNum, $UserID);
-
- $PaymentHistory = new PaymentHistory();
- $PaymentHistory->fromJsonInfo($response);
-
- return $PaymentHistory;
- }
-
- // 파트너 포인트충전 팝업 URL
- // - 2017/08/29 추가
- public function GetPartnerURL($CorpNum, $TOGO)
- {
- try {
- return $this->Linkhub->getPartnerURL($this->getsession_Token($CorpNum), $this->IsTest ? PopbillBase::ServiceID_TEST : PopbillBase::ServiceID_REAL, $TOGO, $this->UseStaticIP, $this->UseGAIP);
- } catch (LinkhubException $le) {
- throw new PopbillException($le->getMessage(), $le->getCode());
- }
- }
-
- // 파트너 잔여포인트 확인
- public function GetPartnerBalance($CorpNum)
- {
- try {
- return $this->Linkhub->getPartnerBalance($this->getsession_Token($CorpNum), $this->IsTest ? PopbillBase::ServiceID_TEST : PopbillBase::ServiceID_REAL, $this->UseStaticIP, $this->UseGAIP);
- } catch (LinkhubException $le) {
- throw new PopbillException($le->getMessage(), $le->getCode());
- }
- }
-
- // 회원 탈퇴
- public function QuitMember($CorpNum, $QuitReason, $UserID = null)
- {
- $postData = json_encode(array("quitReason" => $QuitReason));
- try {
- $response = $this->executeCURL('/QuitRequest', $CorpNum, $UserID, true, null, $postData);
- if($response->code == 1) {
- unset($this-> Token_Table[$CorpNum]);
- }
- } catch (LinkhubException $le) {
- throw new PopbillException($le->getMessage(), $le->getCode());
- }
- return $response;
- }
-
- // 환불가능 포인트 조회
- public function GetRefundableBalance($CorpNum, $UserID = null)
- {
- return $this->executeCURL('/RefundPoint', $CorpNum, $UserID, false, null)->refundableBalance;
- }
-
- // 환불 신청 상태 조회
- public function GetRefundInfo($CorpNum, $RefundCode, $UserID = null)
- {
- if (is_null($RefundCode) || empty($RefundCode)) {
- throw new PopbillException('조회할 환불코드가 입력되지 않았습니다.');
- }
- return $this->executeCURL('/Refund/' . $RefundCode, $CorpNum, $UserID, false, null, null);
- }
-
- protected function executeCURL($uri, $CorpNum = null, $userID = null, $isPost = false, $action = null, $postdata = null, $isMultiPart = false, $contentsType = null, $isBinary = false, $SubmitID = null)
- {
- if ($this->__requestMode != "STREAM") {
-
- $targetURL = $this->getTargetURL();
-
- $http = curl_init($targetURL . $uri);
- $header = array();
-
- $header[] = 'User-Agent: PHP5 POPBILL SDK';
- if (is_null($CorpNum) == false) {
- $header[] = 'Authorization: Bearer ' . $this->getsession_Token($CorpNum);
- }
- if (is_null($userID) == false) {
- $header[] = 'x-pb-userid: ' . $userID;
- }
- if (is_null($action) == false) {
- $header[] = 'X-HTTP-Method-Override: ' . $action;
- if ($action == 'BULKISSUE') {
- $header[] = 'x-pb-message-digest: ' . base64_encode(hash('sha1', $postdata, true));
- $header[] = 'x-pb-submit-id: ' . $SubmitID;
- }
- }
-
- if ($isMultiPart == false) {
- if (is_null($contentsType) == false) {
- $header[] = 'Content-Type: ' . $contentsType;
- } else {
- $header[] = 'Content-Type: Application/json';
- }
- } else {
- if ($isBinary) {
- $boundary = md5(time());
- $header[] = "Content-Type: multipart/form-data; boundary=" . $boundary;
- $postbody = $this->binaryPostbody($boundary, $postdata);
- } else {
- // PHP 5.6 이상 CURL 파일전송 처리
- if ((version_compare(PHP_VERSION, '5.5') >= 0)) {
- curl_setopt($http, CURLOPT_SAFE_UPLOAD, true);
- foreach ($postdata as $key => $value) {
- if (strpos($value, '@') === 0) {
- $filename = ltrim($value, '@');
- if ($key == 'Filedata') {
- $filename = substr($filename, 0, strpos($filename, ';filename'));
- }
- $displayName = substr($value, strpos($value, 'filename=') + strlen('filename='));
- $postdata[$key] = new CURLFile($filename, null, $displayName);
- }
- } // end of foreach
- }
- }
- }
-
- if ($isPost) {
- curl_setopt($http, CURLOPT_POST, 1);
- if ($isBinary) {
- curl_setopt($http, CURLOPT_POSTFIELDS, $postbody);
- } else {
- curl_setopt($http, CURLOPT_POSTFIELDS, $postdata);
- }
- }
-
- curl_setopt($http, CURLOPT_HTTPHEADER, $header);
- curl_setopt($http, CURLOPT_RETURNTRANSFER, TRUE);
- curl_setopt($http, CURLOPT_ENCODING, 'gzip,deflate');
- // Connection timeout 설정
- curl_setopt($http, CURLOPT_CONNECTTIMEOUT_MS, 10 * 1000);
- // 통합 timeout 설정
- curl_setopt($http, CURLOPT_TIMEOUT_MS, 180 * 1000);
-
- $responseJson = curl_exec($http);
-
- // curl Error 추가
- if ($responseJson == false) {
- throw new PopbillException(curl_error($http));
- }
-
- $http_status = curl_getinfo($http, CURLINFO_HTTP_CODE);
-
- $is_gzip = 0 === mb_strpos($responseJson, "\x1f" . "\x8b" . "\x08");
-
- if ($is_gzip) {
- $responseJson = $this->Linkhub->gzdecode($responseJson);
- }
-
- $contentType = strtolower(curl_getinfo($http, CURLINFO_CONTENT_TYPE));
-
- curl_close($http);
- if ($http_status != 200) {
- throw new PopbillException($responseJson);
- }
-
- if (0 === mb_strpos($contentType, 'application/pdf')) {
- return $responseJson;
- }
-
- return json_decode($responseJson);
- } else {
- $header = array();
-
- $header[] = 'Accept-Encoding: gzip,deflate';
- $header[] = 'Connection: close';
- $header[] = 'User-Agent: PHP5 POPBILL SDK';
- if (is_null($CorpNum) == false) {
- $header[] = 'Authorization: Bearer ' . $this->getsession_Token($CorpNum);
- }
- if (is_null($userID) == false) {
- $header[] = 'x-pb-userid: ' . $userID;
- }
- if (is_null($action) == false) {
- $header[] = 'X-HTTP-Method-Override: ' . $action;
- if ($action == 'BULKISSUE') {
- $header[] = 'x-pb-message-digest: ' . base64_encode(hash('sha1', $postdata, true));
- $header[] = 'x-pb-submit-id: ' . $SubmitID;
- }
- }
- if ($isMultiPart == false) {
- if (is_null($contentsType) == false) {
- $header[] = 'Content-Type: ' . $contentsType;
- } else {
- $header[] = 'Content-Type: Application/json';
- }
- $postbody = $postdata;
- } else { //Process MultipartBody.
- $eol = "\r\n";
- $mime_boundary = md5(time());
- $header[] = "Content-Type: multipart/form-data; boundary=" . $mime_boundary . $eol;
- if ($isBinary) {
- $postbody = $this->binaryPostbody($mime_boundary, $postdata);
- } else {
- $postbody = '';
- if (array_key_exists('form', $postdata)) {
- $postbody .= '--' . $mime_boundary . $eol;
- $postbody .= 'content-disposition: form-data; name="form"' . $eol;
- $postbody .= 'content-type: Application/json;' . $eol . $eol;
- $postbody .= $postdata['form'] . $eol;
- foreach ($postdata as $key => $value) {
- if (substr($key, 0, 4) == 'file') {
- if (substr($value, 0, 1) == '@') {
- $value = substr($value, 1);
- }
- if (file_exists($value) == FALSE) {
- throw new PopbillException("전송할 파일이 존재하지 않습니다.", -99999999);
- }
- $displayName = substr($value, strpos($value, 'filename=') + strlen('filename='));
- $fileContents = file_get_contents($value);
- $postbody .= '--' . $mime_boundary . $eol;
- $postbody .= "Content-Disposition: form-data; name=\"file\"; filename=\"" .$displayName . "\"" . $eol;
- $postbody .= "Content-Type: Application/octet-stream" . $eol . $eol;
- $postbody .= $fileContents . $eol;
- }
- }
- }
-
- if (array_key_exists('Filedata', $postdata)) {
- $postbody .= '--' . $mime_boundary . $eol;
- if (substr($postdata['Filedata'], 0, 1) == '@') {
- $value = substr($postdata['Filedata'], 1);
- $splitStr = explode(';', $value);
- $path = $splitStr[0];
- $fileName = substr($splitStr[1], 9);
- }
- if (file_exists($path) == FALSE) {
- throw new PopbillException("전송할 파일이 존재하지 않습니다.", -99999999);
- }
- $fileContents = file_get_contents($path);
- $postbody .= 'content-disposition: form-data; name="Filedata"; filename="' . $this->GetBasename($fileName) . '"' . $eol;
- $postbody .= 'content-type: Application/octet-stream;' . $eol . $eol;
- $postbody .= $fileContents . $eol;
- }
- $postbody .= '--' . $mime_boundary . '--' . $eol;
- }
- }
-
- $params = array(
- 'http' => array(
- 'ignore_errors' => TRUE,
- 'protocol_version' => '1.0',
- 'method' => 'GET',
- 'timeout' => 180
- )
- );
-
- if ($isPost) {
- $params['http']['method'] = 'POST';
- $params['http']['content'] = $postbody;
- }
-
-
- if ($header !== null) {
- $head = "";
- foreach ($header as $h) {
- $head = $head . $h . "\r\n";
- }
- $params['http']['header'] = substr($head, 0, -2);
- }
-
- $ctx = stream_context_create($params);
-
- $targetURL = $this->getTargetURL();
-
- $response = file_get_contents($targetURL . $uri, false, $ctx);
-
- $is_gzip = 0 === mb_strpos($response, "\x1f" . "\x8b" . "\x08");
-
- if ($is_gzip) {
- $response = $this->Linkhub->gzdecode($response);
- }
-
- if ($http_response_header[0] != "HTTP/1.1 200 OK") {
- throw new PopbillException($response);
- }
-
- foreach ($http_response_header as $k => $v) {
- $t = explode(':', $v, 2);
- if (preg_match('/^Content-Type:/i', $v, $out)) {
- $contentType = trim($t[1]);
- if (0 === mb_strpos($contentType, 'application/pdf')) {
- return $response;
- }
- }
- }
-
- return json_decode($response);
- }
- }
- // build multipart/formdata , multipart 폼데이터 만들기
- protected function binaryPostbody($mime_boundary, $postdata)
- {
- $postbody = '';
- $eol = "\r\n";
- $postbody .= "--" . $mime_boundary . $eol
- . 'Content-Disposition: form-data; name="form"' . $eol . $eol . $postdata['form'] . $eol;
-
- foreach ($postdata as $key => $value) {
- if (substr($key, 0, 4) == 'name') {
- $fileName = $value;
- }
- if (substr($key, 0, 4) == 'file') {
- $postbody .= "--" . $mime_boundary . $eol
- . 'Content-Disposition: form-data; name="' . 'file' . '"; filename="' . $fileName . '"' . $eol
- . 'Content-Type: Application/octetstream' . $eol . $eol;
- $postbody .= $value . $eol;
- }
- }
- $postbody .= "--" . $mime_boundary . "--" . $eol;
-
- return $postbody;
- }
-
- //파일명 추출
- protected function GetBasename($path)
- {
- $pattern = '/[^\/\\\\]*$/';
- if (preg_match($pattern, $path, $matches)) {
- return $matches[0];
- }
- throw new PopbillException("파일명 추출에 실패 하였습니다.", -99999999);
- }
-
- // 서비스 URL
- private function getTargetURL()
- {
- if ($this->UseGAIP) {
- return ($this->IsTest ? PopbillBase::ServiceURL_GA_TEST : PopbillBase::ServiceURL_GA_REAL);
- } else if ($this->UseStaticIP) {
- return ($this->IsTest ? PopbillBase::ServiceURL_Static_TEST : PopbillBase::ServiceURL_Static_REAL);
- } else {
- return ($this->IsTest ? PopbillBase::ServiceURL_TEST : PopbillBase::ServiceURL_REAL);
- }
- }
-
- public function isNullOrEmpty($value)
- {
- if(is_bool($value)) {
- return is_null($value) || $value === '';
- }
- return is_null($value) || empty($value);
- }
-
- public function isValidDate($date)
- {
- return preg_match('/(\d{4})(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])/', $date);
- }
-
- public function isValidDT($datetime)
- {
- return preg_match('/(\d{4})(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])(0[0-9]|1[0-9]|2[0-3])([0-5][0-9])([0-5][0-9])/', $datetime);
- }
-}
-
-class JoinForm
-{
- public $LinkID;
- public $CorpNum;
- public $CEOName;
- public $CorpName;
- public $Addr;
- public $ZipCode;
- public $BizType;
- public $BizClass;
- public $ContactName;
- public $ContactEmail;
- public $ContactTEL;
- public $contactHP;
- public $contactFAX;
- public $ID;
- public $PWD;
- public $Password;
-}
-
-class UseHistoryResult
-{
- public $code;
- public $total;
- public $perPage;
- public $pageNum;
- public $pageCount;
- public $list;
-
- public function fromJsonInfo($jsonInfo)
- {
- isset($jsonInfo->code) ? $this->code = $jsonInfo->code : null;
- isset($jsonInfo->total) ? $this->total = $jsonInfo->total : null;
- isset($jsonInfo->perPage) ? $this->perPage = $jsonInfo->perPage : null;
- isset($jsonInfo->pageNum) ? $this->pageNum = $jsonInfo->pageNum : null;
- isset($jsonInfo->pageCount) ? $this->pageCount = $jsonInfo->pageCount : null;
-
- $HistoryList = array();
-
- for ($i = 0; $i < Count($jsonInfo->list); $i++) {
- $HistoryObj = new UseHistory();
- $HistoryObj->fromJsonInfo($jsonInfo->list[$i]);
- $HistoryList[$i] = $HistoryObj;
- }
- $this->list = $HistoryList;
- }
-}
-
-class UseHistory
-{
- public $itemCode;
- public $txType;
- public $txPoint;
- public $balance;
- public $txDT;
- public $userID;
- public $userName;
-
- public function fromJsonInfo($jsonInfo)
- {
- isset($jsonInfo->itemCode) ? $this->itemCode = $jsonInfo->itemCode : null;
- isset($jsonInfo->txType) ? $this->txType = $jsonInfo->txType : null;
- isset($jsonInfo->txPoint) ? $this->txPoint = $jsonInfo->txPoint : null;
- isset($jsonInfo->balance) ? $this->balance = $jsonInfo->balance : null;
- isset($jsonInfo->txDT) ? $this->txDT = $jsonInfo->txDT : null;
- isset($jsonInfo->userID) ? $this->userID = $jsonInfo->userID : null;
- isset($jsonInfo->userName) ? $this->userName = $jsonInfo->userName : null;
- }
-}
-
-class PaymentHistoryResult
-{
- public $code;
- public $total;
- public $perPage;
- public $pageNum;
- public $pageCount;
- public $list;
-
- public function fromJsonInfo($jsonInfo)
- {
- isset($jsonInfo->code) ? $this->code = $jsonInfo->code : null;
- isset($jsonInfo->total) ? $this->total = $jsonInfo->total : null;
- isset($jsonInfo->perPage) ? $this->perPage = $jsonInfo->perPage : null;
- isset($jsonInfo->pageNum) ? $this->pageNum = $jsonInfo->pageNum : null;
- isset($jsonInfo->pageCount) ? $this->pageCount = $jsonInfo->pageCount : null;
-
- $HistoryList = array();
-
- for ($i = 0; $i < Count($jsonInfo->list); $i++) {
- $HistoryObj = new PaymentHistory();
- $HistoryObj->fromJsonInfo($jsonInfo->list[$i]);
- $HistoryList[$i] = $HistoryObj;
- }
- $this->list = $HistoryList;
- }
-}
-
-class PaymentHistory
-{
- public $productType;
- public $productName;
- public $settleType;
- public $settlerName;
- public $settlerEmail;
- public $settleCost;
- public $settlePoint;
- public $settleState;
- public $regDT;
- public $stateDT;
-
- public function fromJsonInfo($jsonInfo)
- {
- isset($jsonInfo->productType) ? $this->productType = $jsonInfo->productType : null;
- isset($jsonInfo->productName) ? $this->productName = $jsonInfo->productName : null;
- isset($jsonInfo->settleType) ? $this->settleType = $jsonInfo->settleType : null;
- isset($jsonInfo->settlerName) ? $this->settlerName = $jsonInfo->settlerName : null;
- isset($jsonInfo->settlerEmail) ? $this->settlerEmail = $jsonInfo->settlerEmail : null;
- isset($jsonInfo->settleCost) ? $this->settleCost = $jsonInfo->settleCost : null;
- isset($jsonInfo->settlePoint) ? $this->settlePoint = $jsonInfo->settlePoint : null;
- isset($jsonInfo->settleState) ? $this->settleState = $jsonInfo->settleState : null;
- isset($jsonInfo->regDT) ? $this->regDT = $jsonInfo->regDT : null;
- isset($jsonInfo->stateDT) ? $this->stateDT = $jsonInfo->stateDT : null;
- }
-}
-
-class RefundHistoryResult
-{
- public $code;
- public $total;
- public $perPage;
- public $pageNum;
- public $pageCount;
- public $list;
-
- public function fromJsonInfo($jsonInfo)
- {
- isset($jsonInfo->code) ? $this->code = $jsonInfo->code : null;
- isset($jsonInfo->total) ? $this->total = $jsonInfo->total : null;
- isset($jsonInfo->perPage) ? $this->perPage = $jsonInfo->perPage : null;
- isset($jsonInfo->pageNum) ? $this->pageNum = $jsonInfo->pageNum : null;
- isset($jsonInfo->pageCount) ? $this->pageCount = $jsonInfo->pageCount : null;
-
- $HistoryList = array();
-
- for ($i = 0; $i < Count($jsonInfo->list); $i++) {
- $HistoryObj = new RefundHistory();
- $HistoryObj->fromJsonInfo($jsonInfo->list[$i]);
- $HistoryList[$i] = $HistoryObj;
- }
- $this->list = $HistoryList;
- }
-}
-
-class RefundHistory
-{
- public $reqDT;
- public $requestPoint;
- public $accountBank;
- public $accountNum;
- public $accountName;
- public $state;
- public $reason;
-
- public function fromJsonInfo($jsonInfo)
- {
- isset($jsonInfo->reqDT) ? $this->reqDT = $jsonInfo->reqDT : null;
- isset($jsonInfo->requestPoint) ? $this->requestPoint = $jsonInfo->requestPoint : null;
- isset($jsonInfo->accountBank) ? $this->accountBank = $jsonInfo->accountBank : null;
- isset($jsonInfo->accountNum) ? $this->accountNum = $jsonInfo->accountNum : null;
- isset($jsonInfo->accountName) ? $this->accountName = $jsonInfo->accountName : null;
- isset($jsonInfo->state) ? $this->state = $jsonInfo->state : null;
- isset($jsonInfo->reason) ? $this->reason = $jsonInfo->reason : null;
- }
-}
-
-class PaymentForm
-{
- public $settlerName;
- public $settlerEmail;
- public $notifyHP;
- public $paymentName;
- public $settleCost;
-}
-
-class RefundForm
-{
- public $contactname;
- public $tel;
- public $requestpoint;
- public $accountbank;
- public $accountnum;
- public $accountname;
- public $reason;
-}
-
-class CorpInfo
-{
- public $ceoname;
- public $corpName;
- public $addr;
- public $bizType;
- public $bizClass;
-
- public function fromJsonInfo($jsonInfo)
- {
- isset($jsonInfo->ceoname) ? $this->ceoname = $jsonInfo->ceoname : null;
- isset($jsonInfo->corpName) ? $this->corpName = $jsonInfo->corpName : null;
- isset($jsonInfo->addr) ? $this->addr = $jsonInfo->addr : null;
- isset($jsonInfo->bizType) ? $this->bizType = $jsonInfo->bizType : null;
- isset($jsonInfo->bizClass) ? $this->bizClass = $jsonInfo->bizClass : null;
- }
-}
-
-class ContactInfo
-{
- public $id;
- public $pwd;
- public $Password;
- public $email;
- public $hp;
- public $personName;
- public $searchAllAllowYN;
- public $searchRole;
- public $tel;
- public $fax;
- public $mgrYN;
- public $regDT;
- public $state;
-
- public function fromJsonInfo($jsonInfo)
- {
- isset($jsonInfo->id) ? $this->id = $jsonInfo->id : null;
- isset($jsonInfo->email) ? $this->email = $jsonInfo->email : null;
- isset($jsonInfo->hp) ? $this->hp = $jsonInfo->hp : null;
- isset($jsonInfo->personName) ? $this->personName = $jsonInfo->personName : null;
- isset($jsonInfo->searchAllAllowYN) ? $this->searchAllAllowYN = $jsonInfo->searchAllAllowYN : null;
- isset($jsonInfo->searchRole) ? $this->searchRole = $jsonInfo->searchRole : null;
- isset($jsonInfo->tel) ? $this->tel = $jsonInfo->tel : null;
- isset($jsonInfo->fax) ? $this->fax = $jsonInfo->fax : null;
- isset($jsonInfo->mgrYN) ? $this->mgrYN = $jsonInfo->mgrYN : null;
- isset($jsonInfo->regDT) ? $this->regDT = $jsonInfo->regDT : null;
- isset($jsonInfo->state) ? $this->state = $jsonInfo->state : null;
- }
-}
-
-class ChargeInfo
-{
- public $unitCost;
- public $chargeMethod;
- public $rateSystem;
-
- public function fromJsonInfo($jsonInfo)
- {
- isset($jsonInfo->unitCost) ? $this->unitCost = $jsonInfo->unitCost : null;
- isset($jsonInfo->chargeMethod) ? $this->chargeMethod = $jsonInfo->chargeMethod : null;
- isset($jsonInfo->rateSystem) ? $this->rateSystem = $jsonInfo->rateSystem : null;
- }
-}
-
-class PopbillException extends Exception
-{
- public function __construct($response, $code = -99999999, Exception $previous = null)
- {
- $Err = json_decode($response);
- if (is_null($Err)) {
- parent::__construct($response, $code);
- } else {
- parent::__construct($Err->message, $Err->code);
- }
- }
-
- public function __toString()
- {
- return __CLASS__ . ": [{$this->code}]: {$this->message}\n";
- }
-}
diff --git a/plugin/kakao5/_common.php b/plugin/kakao5/_common.php
deleted file mode 100644
index 469a85969..000000000
--- a/plugin/kakao5/_common.php
+++ /dev/null
@@ -1,7 +0,0 @@
- $check_result['error'])));
-} else {
- $charge_url = get_popbill_point_URL(); // 포인트 충전 팝업 URL
- die(json_encode(array('balance' => $check_result['balance'], 'charge_url' => $charge_url)));
-}
\ No newline at end of file
diff --git a/plugin/kakao5/ajax.get_url.php b/plugin/kakao5/ajax.get_url.php
deleted file mode 100644
index 79a9f9955..000000000
--- a/plugin/kakao5/ajax.get_url.php
+++ /dev/null
@@ -1,38 +0,0 @@
- $url, 'width' => $width, 'height' => $height)));
\ No newline at end of file
diff --git a/plugin/kakao5/kakao5.lib.php b/plugin/kakao5/kakao5.lib.php
deleted file mode 100644
index 0d4d78d53..000000000
--- a/plugin/kakao5/kakao5.lib.php
+++ /dev/null
@@ -1,449 +0,0 @@
- false, 'msg' => '알림톡 사용이 설정되어 있지 않습니다.');
- }
-
- // 프리셋 코드로 프리셋 정보 확인
- $preset_info = get_alimtalk_preset_info($preset_code);
- if (isset($preset_info['error'])) {
- return array('success' => false, 'msg' => $preset_info['error'], 'data' => $preset_info);
- }
- $template_code = $preset_info['template_code']; // 템플릿 코드
-
- // 수신자 정리 (전화번호 숫자만)
- $receiver_hp = preg_replace('/[^0-9]/', '', $recipient['rcv'] ?? '');
- $receiver_nm = $recipient['rcvnm'] ?? '';
-
- // 수신자 정보 배열 구성
- $messages = [['rcv' => $receiver_hp, 'rcvnm' => $receiver_nm]];
-
- // 주문내역에서 mb_id 조회
- if (empty($conditions['mb_id']) && !empty($conditions['od_id'])) {
- $sql = "SELECT mb_id FROM {$g5['g5_shop_order_table']} WHERE od_id = '" . sql_escape_string($conditions['od_id']) . "' LIMIT 1";
- $row = sql_fetch($sql);
- if ($row && !empty($row['mb_id'])) {
- $conditions['mb_id'] = $row['mb_id'];
- } else {
- $conditions['mb_id'] = $member['mb_id'] ?? 'GUEST';
- }
- }
-
- // 전송요청번호 생성
- $request_num = generate_alimtalk_request_id($conditions['mb_id'], $preset_code);
-
- // 전송 내역 초기 저장
- $history_id = save_alimtalk_history($preset_info['preset_id'], $template_code, $preset_info['alt_send'], $request_num, $receiver_nm, $receiver_hp, $conditions['mb_id']);
-
- // 템플릿 정보 조회
- $full_template_info = '';
- if($config['cf_kakaotalk_use'] === 'popbill'){ // 팝빌
- $full_template_info = get_popbill_template_info($template_code);
- }
-
- // 템플릿 정보를 못 불러 올 경우 - 발송 취소
- if (is_array($full_template_info) && isset($full_template_info['error'])) {
- // 탬플릿 정보 조회 실패: 알림톡 전송내역 업데이트
- $messages = "템플릿 정보 조회 실패: ".$full_template_info['error'];
- update_alimtalk_history($history_id, ['ph_log' => $messages]);
- return array('success' => false, 'msg' => $messages, 'data' => $full_template_info);
- }
-
- // 템플릿 내용 변수 치환
- $content = replace_alimtalk_content_vars($full_template_info->template, $conditions);
-
- // 버튼 링크 치환
- $buttons = set_alimtalk_button_links($full_template_info->btns, $conditions);
-
- try {
- // 알림톡 전송 정보
- $data = [
- 'template_code' => $template_code,
- 'sender_hp' => $sender_hp,
- 'content' => $content,
- 'alt_content' => $content,
- 'alt_send' => ($preset_info['alt_send'] == '1') ? 'C' : null,
- 'messages' => $messages,
- 'reserveDT' => null,
- 'request_num' => $request_num,
- 'buttons' => $buttons,
- 'alt_subject' => $preset_info['preset_name']
- ];
-
- $receipt_num = '';
- if ($config['cf_kakaotalk_use'] === 'popbill') { // 팝빌 전송
- $receipt_num = send_popbill_alimtalk($data);
- }
-
- // 전송 결과 처리
- if ((is_array($receipt_num) && isset($receipt_num['error'])) || empty($receipt_num)) {
- // 전송 실패: 알림톡 전송내역 업데이트
- $error_message = is_array($receipt_num) && isset($receipt_num['error']) ? $receipt_num['error'] : '알림톡 전송 결과가 비어 있습니다.';
- $messages = '알림톡 전송 실패하였습니다.\n' . $error_message;
- update_alimtalk_history($history_id, ['ph_log' => $messages, 'ph_state' => 2]);
- return array('success' => false, 'msg' => $messages, 'code' => (is_array($receipt_num) && isset($receipt_num['code']) ? $receipt_num['code'] : null));
- } else {
- // 전송 성공: 알림톡 전송내역 업데이트
- $messages = '알림톡이 정상적으로 전송되었습니다.';
- update_alimtalk_history($history_id, ['ph_receipt_num' => $receipt_num, 'ph_state' => 1, 'ph_log' => $content]);
- return array('success' => true, 'msg' => $messages, 'receipt_num' => $receipt_num);
- }
- } catch (Exception $e) {
- // 전송 오류: 알림톡 전송내역 업데이트
- $messages = '알림톡 전송 중 오류가 발생하였습니다.\n' . $e->getMessage();
- update_alimtalk_history($history_id, ['ph_log' => $messages, 'ph_state' => 2]);
- return array('success' => false, 'msg' => $messages, 'code' => $e->getCode());
- }
-}
-
-/**
- * 프리셋 코드로 프리셋 정보 확인
- */
-function get_alimtalk_preset_info($preset_code)
-{
- global $g5;
-
- if (empty($preset_code)) {
- return array('error' => '프리셋 코드가 입력되지 않았습니다.');
- }
-
- // 프리셋 코드로 프리셋 정보 조회
- $sql = "SELECT * FROM {$g5['kakao5_preset_table']} WHERE kp_preset_code = '" . sql_escape_string($preset_code) . "'";
- $preset = sql_fetch($sql);
-
- if (!$preset) {
- return array('error' => '해당 프리셋 코드(' . $preset_code . ')가 존재하지 않습니다.');
- }
-
- // 활성화 상태 확인
- if ($preset['kp_active'] != '1') {
- return array('error' => '프리셋(' . $preset['kp_preset_name'] . ')이 비활성화되어 있습니다.');
- }
-
- // 템플릿 코드 확인
- if (empty($preset['kp_template_name'])) {
- return array('error' => '프리셋(' . $preset['kp_preset_name'] . ')에 템플릿이 설정되지 않았습니다.');
- }
-
- // 모든 조건을 만족하면 프리셋 정보 반환
- return array(
- 'success' => true,
- 'preset' => $preset,
- 'preset_id' => $preset['kp_id'],
- 'preset_name' => $preset['kp_preset_name'],
- 'preset_code' => $preset['kp_preset_code'],
- 'template_code' => $preset['kp_template_name'],
- 'alt_send' => $preset['kp_alt_send'],
- 'type' => $preset['kp_type']
- );
-}
-
-/**
- * 템플릿 내용 변수 치환
- */
-function replace_alimtalk_content_vars($content, $conditions = [])
-{
- global $g5, $kakao5_preset_variable_list;
-
- $replacements = [];
-
- // 1. 템플릿에서 변수 추출
- if (!preg_match_all('/#\{(.*?)\}/', $content, $matches) || empty($matches[1])) {
- return $content;
- }
- $found_vars = array_unique($matches[1]);
-
- // 2. 변수 정의 맵 캐싱
- static $var_info_map = null;
- if ($var_info_map === null) {
- $var_info_map = [];
- foreach ($kakao5_preset_variable_list as $category) {
- foreach ($category['variables'] as $var) {
- if (preg_match('/#\{(.*?)\}/', $var['name'], $match) && isset($match[1])) {
- $var_info_map[$match[1]] = $var;
- }
- }
- }
- }
-
- // 3. 쿼리 맵 구성 및 치환값 우선 결정
- $query_map = [];
- $var_to_query = [];
- foreach ($found_vars as $var_name) {
- $replacement_key = "#{{$var_name}}";
-
- // 1순위: 변수 정의가 있고, $conditions에 column값이 있으면 바로 치환
- if (isset($var_info_map[$var_name])) {
- $var = $var_info_map[$var_name];
- $column = $var['column'];
- $table = $g5[$var['table'] ?? ''];
- $condition_key = $var['condition_key'] ?? '';
-
- if (isset($conditions[$column])) {
- $replacements[$replacement_key] = $conditions[$column];
- continue;
- }
-
- // 테이블명에 게시판과 같이 뒤에 붙는 변수가 있을 경우 사용
- $table_placeholder = isset($var['table_placeholder']) ? trim($var['table_placeholder'], '{}') : '';
- if ($table_placeholder && !empty($conditions[$table_placeholder])) {
- $table .= $conditions[$table_placeholder];
- }
-
- // 2순위: 변수정의에 따라 DB 조회 필요
- $where = '';
- if(!empty($condition_key)) {
- if (!isset($conditions[$condition_key])) {
- $replacements[$replacement_key] = '';
- continue;
- }
- $cond_val = sql_escape_string($conditions[$condition_key]);
- $where = "{$condition_key} = '{$cond_val}'";
- }
- $query_key = "{$table}|{$where}";
-
- if (!isset($query_map[$query_key])) {
- $query_map[$query_key] = [
- 'table' => $table,
- 'where' => $where,
- 'columns' => [],
- 'is_price' => $var['is_price'] ?? false,
- ];
- }
- $query_map[$query_key]['columns'][$var_name] = $column;
- $var_to_query[$var_name] = $query_key;
- continue;
- }
-
- // 4. 조건값이 없으면 조회 불가 → 빈값
- $replacements[$replacement_key] = '';
- }
-
- // 4. DB 조회 (필요한 경우만)
- $query_results = [];
- foreach ($query_map as $query_key => $info) {
- $table = $info['table'];
- $where = $info['where'];
- $columns = array_unique(array_values($info['columns']));
- $column_sql = implode(',', $columns);
-
- $sql = "SELECT {$column_sql} FROM {$table}";
- if (!empty($where)) {
- $sql .= " WHERE {$where}";
- }
- $sql .= " LIMIT 1";
- $query_results[$query_key] = sql_fetch($sql) ?: [];
- }
-
- // 5. DB 결과로 치환값 보완
- foreach ($found_vars as $var_name) {
- $replacement_key = "#{{$var_name}}";
-
- if (isset($replacements[$replacement_key])) continue; // 이미 치환된 값 있음
-
- if (isset($var_to_query[$var_name])) {
- $query_key = $var_to_query[$var_name];
- $column = $query_map[$query_key]['columns'][$var_name];
- $value = $query_results[$query_key][$column] ?? '';
- // is_price일경우 숫자(정수 또는 실수)라면 number_format 적용
- if (isset($var_info_map[$var_name]['is_price']) && $var_info_map[$var_name]['is_price'] && is_numeric($value) && $value !== '') {
- $value = number_format($value);
- }
- $replacements[$replacement_key] = $value;
- } else {
- $replacements[$replacement_key] = '';
- }
- }
-
- return strtr($content, $replacements);
-}
-
-/**
- * 버튼 링크 치환
- */
-function set_alimtalk_button_links($btns, $conditions = [])
-{
- // [정의] $kakao5_preset_button_links - extend/kakao5.extend.php
- global $kakao5_preset_button_links;
-
- $buttons = [];
- if (!empty($btns)) {
- foreach ($btns as $idx => $btn) {
- // 버튼의 u1, u2에 대해 #{...} 플레이스홀더를 찾아 알맞은 URL로 치환
- foreach (['u1', 'u2'] as $field) {
- if (isset($btn->$field)) {
- if (preg_match('/#\{(.*?)\}/', $btn->$field, $match)) {
- $placeholder = $match[0];
- if (isset($kakao5_preset_button_links[$placeholder])) {
- $url = $kakao5_preset_button_links[$placeholder]['url'];
- // URL 내 {변수} 치환
- if (preg_match_all('/\{(.*?)\}/', $url, $url_vars)) {
- foreach ($url_vars[1] as $var_name) {
- // 치환할 값이 없으면 빈 문자열 처리
- $replace_val = $conditions[$var_name] ?? '';
-
- // URL로 쓰일 수 있으므로 안전하게 인코딩
- $url = str_replace('{' . $var_name . '}', urlencode($replace_val), $url);
- }
- }
- $btn->$field = $url;
- }
- }
- }
- }
- $buttons[] = (array)$btn;
- }
- }
-
- return $buttons;
-}
-
-/**
- * 전송요청번호 생성 (고유성 보장)
- */
-function generate_alimtalk_request_id($mb_id, $preset_code)
-{
- $prefix = substr($preset_code, 0, 1); // 사용자 구분
- $mb_hash = substr(md5($mb_id), 0, 4); // mb_id 해시 4자리
- $dateTimeStr = date('ymdHis') . sprintf('%03d', (microtime(true) * 1000) % 1000); // 날짜(초) + 마이크로초(밀리초 3자리)
- $requestNum = "{$prefix}{$mb_hash}{$dateTimeStr}";
-
- return substr($requestNum, 0, 20);
-}
-
-/**
- * 알림톡 프리셋 전송 이력 저장
- */
-function save_alimtalk_history($preset_id, $template_code, $alt_send, $request_num, $rcvnm, $rcv, $mb_id = '')
-{
- global $g5;
-
- $sql = "INSERT INTO {$g5['kakao5_preset_history_table']}
- (mb_id, kp_id, ph_rcvnm, ph_rcv, ph_template_code, ph_alt_send, ph_request_num, ph_send_datetime, ph_state)
- VALUES
- ('" . sql_escape_string($mb_id) . "',
- '" . (int)$preset_id . "',
- '" . sql_escape_string($rcvnm) . "',
- '" . sql_escape_string($rcv) . "',
- '" . sql_escape_string($template_code) . "',
- '" . sql_escape_string($alt_send) . "',
- '" . sql_escape_string($request_num) . "',
- NOW(),
- 0)";
-
- $result = sql_query($sql);
-
- if ($result) {
- return sql_insert_id();
- }
-
- return false;
-}
-
-/**
- * 전송내역 업데이트
- */
-function update_alimtalk_history($history_id, $update_data = [])
-{
- global $g5;
-
- if (!$history_id) {
- return false;
- }
-
- $set_arr = [];
-
- // update_data가 들어오면 해당 값들로 업데이트
- if (!empty($update_data) && is_array($update_data)) {
- foreach ($update_data as $key => $val) {
- $set_arr[] = sql_escape_string($key) . " = '" . sql_escape_string($val) . "'";
- }
- }
-
- // 업데이트할 내용이 없음
- if (empty($set_arr)) {
- return false;
- }
-
- $sql = "UPDATE {$g5['kakao5_preset_history_table']}
- SET " . implode(', ', $set_arr) . "
- WHERE ph_id = '" . (int)$history_id . "'";
-
- return sql_query($sql);
-}
-
-/**
- * 알림톡용 상품명 생성 (2개 이상일 경우 '외 N건' 추가)
- */
-function get_alimtalk_cart_item_name($od_id)
-{
- global $g5;
-
- $sql = "SELECT it_name FROM {$g5['g5_shop_cart_table']} WHERE od_id = '" . sql_escape_string($od_id) . "'";
- $res = sql_query($sql);
-
- $names = array();
- while ($row = sql_fetch_array($res)) $names[] = $row['it_name'];
- if (!$names) return '';
-
- return $names[0] . ($names[1] ? ' 외 ' . (count($names)-1) . '건' : '');
-}
-
-/**
- * 관리자 정보로 알림톡 발송
- *
- * @param string $tpl 템플릿 코드 (예: AD-OR01)
- * @param string $type 관리자 유형 (super|group|board)
- * @param array $conditions 치환 변수 배열
- * @param array $otherTypes 발송 중복 확인용 관리자 유형 ['super', 'group', 'board']
- * @return array|false send_alimtalk_preset 반환값 또는 false
- */
-function send_admin_alimtalk($tpl, $type = 'super', $conditions = [], $otherTypes = [])
-{
- $admin = get_admin($type);
-
- // 연락처가 없으면 발송하지 않음
- if (empty($admin['mb_hp'])) return false;
-
- // 다른 관리자 정보가 겹치는 게 있으면 발송 안함
- if(!empty($otherTypes)){
- foreach($otherTypes as $otherType){
- // 자기 자신은 비교하지 않음
- if ($otherType == $type) continue;
-
- $other = get_admin($otherType, 'mb_id, mb_hp');
- if (empty($other)) continue;
-
- // 다른 역할과 동일 인물(또는 동일 번호)이라면 발송하지 않음
- $sameId = !empty($admin['mb_id']) && !empty($other['mb_id']) && $admin['mb_id'] == $other['mb_id'];
- $sameHp = !empty($other['mb_hp']) && $admin['mb_hp'] == $other['mb_hp'];
-
- if ($sameId || $sameHp) return false;
- }
- }
-
- return send_alimtalk_preset(
- $tpl,
- [
- 'rcv' => $admin['mb_hp'],
- 'rcvnm' => $admin['mb_name'] ?? ''
- ],
- $conditions
- );
-}
\ No newline at end of file
diff --git a/plugin/kakao5/kakao5_popbill.lib.php b/plugin/kakao5/kakao5_popbill.lib.php
deleted file mode 100644
index 6c33c5c18..000000000
--- a/plugin/kakao5/kakao5_popbill.lib.php
+++ /dev/null
@@ -1,238 +0,0 @@
-IsTest(G5_KAKAO5_IS_TEST);
-
- return $KakaoService;
-}
-
-/**
- * 팝빌 정보 확인
- */
-function get_popbill_service_info(){
- global $userID, $corpnum;
-
- if (empty($userID) || strlen($userID) < 4) {
- return array('error' => '연결 실패: 회원아이디가 없거나 올바르지 않습니다. 회원아이디를 확인해주세요.');
- }
-
- try {
- $KakaoService = get_kakao_service_instance();
- $corpInfo = $KakaoService->GetCorpInfo($corpnum, $userID);
- $balance = $KakaoService->GetBalance($corpnum);
-
- if ($balance === false || $balance < 0) {
- return array('error' => '팝빌 API 연결에 실패했습니다. 설정값을 확인해주세요.');
- }
-
- return array('success' => true, 'balance' => $balance, 'corpInfo' => $corpInfo);
- } catch (Exception $e) {
- return array('error' => '팝빌 서비스 처리 중 오류가 발생했습니다: ' . $e->getMessage(), 'code' => $e->getCode());
- }
-}
-
-/**
- * 팝빌 템플릿 목록 조회
- */
-function get_popbill_template_list(){
- global $corpnum;
-
- try {
- $KakaoService = get_kakao_service_instance();
- $templates = $KakaoService->ListATSTemplate($corpnum);
-
- if (empty($templates)) {
- return array('error' => '템플릿 목록을 가져올 수 없습니다.');
- }
-
- return $templates;
- } catch (Exception $e) {
- return array('error' => '팝빌 서비스 처리 중 오류가 발생했습니다: ' . $e->getMessage(), 'code' => $e->getCode());
- }
-}
-
-/**
- * 포인트 충전 팝업 URL
- */
-function get_popbill_point_URL(){
- global $corpnum, $userID;
-
- try {
- $KakaoService = get_kakao_service_instance();
- $url = $KakaoService->GetChargeURL($corpnum, $userID);
-
- if (empty($url)) {
- return array('error' => '포인트 충전 URL을 가져올 수 없습니다.');
- }
-
- return $url;
- } catch (Exception $e) {
- return array('error' => '팝빌 서비스 처리 중 오류가 발생했습니다: ' . $e->getMessage(), 'code' => $e->getCode());
- }
-}
-
-/**
- * 템플릿 정보 확인
- */
-function get_popbill_template_info($template_code, $type = ''){
- global $corpnum;
-
- try {
- $KakaoService = get_kakao_service_instance();
- $info = $KakaoService->GetATSTemplate($corpnum, $template_code);
-
- if (empty($info)) {
- return array('error' => '해당 템플릿 정보를 가져올 수 없습니다.');
- }
-
- if ($type) {
- if (is_object($info) && isset($info->$type)) {
- return $info->$type;
- } else if (is_array($info) && isset($info[$type])) {
- return $info[$type];
- } else {
- return array('error' => '요청하신 타입의 정보가 없습니다.');
- }
- }
-
- return $info;
- } catch (Exception $e) {
- return array('error' => '팝빌 서비스 처리 중 오류가 발생했습니다: ' . $e->getMessage(), 'code' => $e->getCode());
- }
-}
-
-/**
- * 템플릿 관리 팝업 URL
- */
-function get_popbill_template_manage_URL(){
- global $corpnum, $userID;
-
- try {
- $KakaoService = get_kakao_service_instance();
- $url = $KakaoService->GetATSTemplateMgtURL($corpnum, $userID);
-
- if (empty($url)) {
- return array('error' => '템플릿관리 URL을 가져올 수 없습니다.');
- }
-
- return $url;
- } catch (Exception $e) {
- return array('error' => '팝빌 서비스 처리 중 오류가 발생했습니다: ' . $e->getMessage(), 'code' => $e->getCode());
- }
-}
-
-/**
- * 플러스친구 관리 팝업 URL
- */
-function get_popbill_plusfriend_manage_URL(){
- global $corpnum, $userID;
- try {
- $KakaoService = get_kakao_service_instance();
- $url = $KakaoService->GetPlusFriendMgtURL($corpnum, $userID);
- if (empty($url)) {
- return array('error' => '플러스친구 관리 URL을 가져올 수 없습니다.');
- }
- return $url;
- } catch (Exception $e) {
- return array('error' => '팝빌 서비스 처리 중 오류가 발생했습니다: ' . $e->getMessage(), 'code' => $e->getCode());
- }
-}
-
-/**
- * 전송내역 관리 팝업 URL
- */
-function get_popbill_send_manage_URL(){
- global $corpnum, $userID;
- try {
- $KakaoService = get_kakao_service_instance();
- $url = $KakaoService->GetSentListURL($corpnum, $userID);
- if (empty($url)) {
- return array('error' => '전송내역 URL을 가져올 수 없습니다.');
- }
- return $url;
- } catch (Exception $e) {
- return array('error' => '팝빌 서비스 처리 중 오류가 발생했습니다: ' . $e->getMessage(), 'code' => $e->getCode());
- }
-}
-
-/**
- * 발신번호 등록 팝업 URL
- */
-function get_popbill_sender_number_URL(){
- global $corpnum, $userID;
- try {
- $KakaoService = get_kakao_service_instance();
- $url = $KakaoService->GetSenderNumberMgtURL($corpnum, $userID);
- if (empty($url)) {
- return array('error' => '발신번호 등록 URL을 가져올 수 없습니다.');
- }
- return $url;
- } catch (Exception $e) {
- return array('error' => '팝빌 서비스 처리 중 오류가 발생했습니다: ' . $e->getMessage(), 'code' => $e->getCode());
- }
-}
-
-/*************************************************************************
-**
-** 알림톡 : 팝빌 카카오톡 발송
-**
-*************************************************************************/
-/**
- * 팝빌 알림톡 전송 함수 (SendATS 파라미터를 배열에서 바로 전달, 예외처리 포함)
- */
-function send_popbill_alimtalk($params = []){
- global $corpnum, $userID;
-
- try {
- $KakaoService = get_kakao_service_instance();
-
- $receipt_num = $KakaoService->SendATS(
- $corpnum,
- $params['template_code'],
- $params['sender_hp'],
- $params['content'],
- isset($params['alt_content']) ? $params['alt_content'] : '',
- isset($params['alt_send']) ? $params['alt_send'] : null,
- $params['messages'],
- isset($params['reserveDT']) ? $params['reserveDT'] : null,
- $userID,
- isset($params['request_num']) ? $params['request_num'] : null,
- isset($params['buttons']) ? $params['buttons'] : null,
- isset($params['alt_subject']) ? $params['alt_subject'] : ''
- );
-
- if ($receipt_num) {
- return $receipt_num;
- } else {
- return [ 'error' => '알림톡 전송에 실패했습니다.' ];
- }
- } catch (Exception $e) {
- return [
- 'error' => '팝빌 서비스 처리 중 오류가 발생했습니다: ' . $e->getMessage(),
- 'code' => $e->getCode()
- ];
- }
-}
\ No newline at end of file
diff --git a/plugin/social/register_member_update.php b/plugin/social/register_member_update.php
index 801060f76..9f0826089 100644
--- a/plugin/social/register_member_update.php
+++ b/plugin/social/register_member_update.php
@@ -331,18 +331,6 @@ if($result) {
}
}
- // 알림톡 발송 BEGIN: 회원가입 (CU-MB01/AD-MB01) -------------------------------------
- include_once(G5_KAKAO5_PATH.'/kakao5.lib.php');
- $conditions = ['mb_id' => $mb_id]; // 변수 치환 정보
-
- $ad_atk = send_admin_alimtalk('AD-MB01', 'super', $conditions); // 관리자
-
- // 회원 - 휴대폰 번호가 있을 경우만
- if (!empty($mb_hp)) {
- $cu_atk = send_alimtalk_preset('CU-MB01', ['rcv' => $mb_hp, 'rcvnm' => $mb_name], $conditions); // 회원
- }
- // 알림톡 발송 END --------------------------------------------------------
-
// 사용자 코드 실행
@include_once ($member_skin_path.'/register_form_update.tail.skin.php');
diff --git a/shop/itemstocksms.php b/shop/itemstocksms.php
index 961fcbda2..f62191706 100644
--- a/shop/itemstocksms.php
+++ b/shop/itemstocksms.php
@@ -3,7 +3,7 @@ include_once('./_common.php');
$it_id = isset($_REQUEST['it_id']) ? safe_replace_regex($_REQUEST['it_id'], 'it_id') : '';
-$g5['title'] = '상품 재입고 알림';
+$g5['title'] = '상품 재입고 알림 (SMS)';
include_once(G5_PATH.'/head.sub.php');
// 상품정보
@@ -13,7 +13,7 @@ if(! (isset($it['it_id']) && $it['it_id']))
alert_close('상품정보가 존재하지 않습니다.');
if(!$it['it_soldout'] || !$it['it_stock_sms'])
- alert_close('재입고 알림을 신청할 수 없는 상품입니다.');
+ alert_close('재입고SMS 알림을 신청할 수 없는 상품입니다.');
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet(' ', 0);
@@ -35,9 +35,6 @@ if (G5_IS_MOBILE) {
-
- * 재입고 알림은 SMS 문자 또는 카카오 알림톡으로 발송됩니다.
-
휴대폰번호 필수
@@ -69,7 +66,7 @@ function fstocksms_submit(f)
return false;
}
- if(confirm("재입고 알림 요청을 등록하시겠습니까?")) {
+ if(confirm("재입고SMS 알림 요청을 등록하시겠습니까?")) {
return true;
} else {
window.close();
diff --git a/shop/itemstocksmsupdate.php b/shop/itemstocksmsupdate.php
index 53481bf38..0735d7792 100644
--- a/shop/itemstocksmsupdate.php
+++ b/shop/itemstocksmsupdate.php
@@ -11,7 +11,7 @@ if(! (isset($it['it_id']) && $it['it_id']))
alert_close('상품정보가 존재하지 않습니다.');
if(!$it['it_soldout'] || !$it['it_stock_sms'])
- alert_close('재입고 알림을 신청할 수 없는 상품입니다.');
+ alert_close('재입고SMS 알림을 신청할 수 없는 상품입니다.');
$ss_hp = hyphen_hp_number($ss_hp);
if(!$ss_hp)
@@ -39,4 +39,4 @@ $sql = " insert into {$g5['g5_shop_item_stocksms_table']}
ss_datetime = '".G5_TIME_YMDHIS."' ";
sql_query($sql);
-alert_close('재입고 알림 요청 등록이 완료됐습니다.');
\ No newline at end of file
+alert_close('재입고SMS 알림 요청 등록이 완료됐습니다.');
\ No newline at end of file
diff --git a/shop/orderformupdate.php b/shop/orderformupdate.php
index 4e84ba4a8..60681fcbf 100644
--- a/shop/orderformupdate.php
+++ b/shop/orderformupdate.php
@@ -1,7 +1,6 @@
0) {
- // 무통장 입금일 경우 알림톡 발송 : 주문금액 - 미결제액
- $conditions = ['od_id' => $od_id, 'od_name' => $od_name, 'it_name' => $it_name_str, 'od_receipt_price' => number_format($od_misu)]; // 변수 치환 정보
- $cu_atk = send_alimtalk_preset('CU-OR02', ['rcv' => $od_hp ?: $od_tel, 'rcvnm' => $od_name], $conditions); // 회원
- $ad_atk = send_admin_alimtalk('AD-OR02', 'super', $conditions); // 관리자
-}else{
- // 주문 완료
- $conditions = ['od_id' => $od_id, 'od_name' => $od_name, 'it_name' => $it_name_str, 'od_receipt_price' => number_format($i_price)]; // 변수 치환 정보
- $cu_atk = send_alimtalk_preset('CU-OR01', ['rcv' => $od_hp ?: $od_tel, 'rcvnm' => $od_name], $conditions); // 회원
- $ad_atk = send_admin_alimtalk('AD-OR01', 'super', $conditions); // 관리자
-}
-// 알림톡 발송 END ---------------------------------------------------------------------------------------------
-
// orderview 에서 사용하기 위해 session에 넣고
$uid = md5($od_id.G5_TIME_YMDHIS.$REMOTE_ADDR);
set_session('ss_orderview_uid', $uid);
diff --git a/shop/orderinquirycancel.php b/shop/orderinquirycancel.php
index dda82c10b..aefa943a1 100644
--- a/shop/orderinquirycancel.php
+++ b/shop/orderinquirycancel.php
@@ -1,6 +1,5 @@
0)
insert_point($member['mb_id'], $od['od_receipt_point'], "주문번호 $od_id 본인 취소");
-// 알림톡 발송 BEGIN: 고객주문취소완료(CU-OR04/AD-OR04) -------------------------------------
-$it_name_str = get_alimtalk_cart_item_name($od_id); // 상품명
-
-// 총구매액
-$tot_price = $od['od_cart_price'] + $od['od_send_cost'] + $od['od_send_cost2'] - $od['od_cart_coupon'] - $od['od_coupon'] - $od['od_send_coupon'] - $od['od_cancel_price'];
-
-$conditions = ['od_id' => $od_id, 'cancel_memo' => $cancel_memo, 'it_name' => $it_name_str, 'od_receipt_price' => number_format($tot_price)]; // 변수 치환 정보
-
-$cu_atk = send_alimtalk_preset('CU-OR04', ['rcv' => $od['od_hp'] ?: $od['od_tel'], 'rcvnm' => $od['od_name']], $conditions); // 회원
-$ad_atk = send_admin_alimtalk('AD-OR04', 'super', $conditions); // 관리자
-// 알림톡 발송 END -------------------------------------------------------------
-
goto_url(G5_SHOP_URL."/orderinquiryview.php?od_id=$od_id&uid=$uid");
\ No newline at end of file
diff --git a/shop/settle_inicis_common.php b/shop/settle_inicis_common.php
index e072de4a1..e6069e049 100644
--- a/shop/settle_inicis_common.php
+++ b/shop/settle_inicis_common.php
@@ -1,6 +1,5 @@
$od_id, 'od_name' => $od_result['od_name'], 'it_name' => $it_name_str]; // 변수 치환 정보
- $cu_atk = send_alimtalk_preset('CU-OR03', ['rcv' => $od_result['od_hp'] ?: $od_result['od_tel'], 'rcvnm' => $od_result['od_name']], $conditions); // 회원
- $ad_atk = send_admin_alimtalk('AD-OR03', 'super', $conditions); // 관리자
- }
- // 알림톡 발송 END -------------------------------------------------------
}
if($INIpayLog) {
diff --git a/shop/settle_kcp_common.php b/shop/settle_kcp_common.php
index d3b727d7a..523a716dd 100644
--- a/shop/settle_kcp_common.php
+++ b/shop/settle_kcp_common.php
@@ -2,7 +2,6 @@
include_once('./_common.php');
include_once(G5_LIB_PATH.'/etc.lib.php');
include_once(G5_LIB_PATH.'/mailer.lib.php');
-include_once(G5_KAKAO5_PATH.'/kakao5.lib.php');
/*------------------------------------------------------------------------------
※ KCP 에서 가맹점의 결과처리 페이지로 데이터를 전송할 때에, 아래와 같은
@@ -212,19 +211,6 @@ if(!$default['de_card_test']) {
sql_query($sql, FALSE);
}
}
-
- // 알림톡 발송 BEGIN: 입금완료(CU-OR03/AD-OR03) ------------------------------
- // 주문정보 체크
- $sql = "select od_name, od_hp, od_tel from {$g5['g5_shop_order_table']} where od_id = '$od_id' limit 1";
- $od_result = sql_fetch($sql);
- $it_name_str = get_alimtalk_cart_item_name($od_id); // 상품명
-
- if (isset($od_result)) {
- $conditions = ['od_id' => $od_id, 'od_name' => $od_result['od_name'], 'it_name' => $it_name_str]; // 변수 치환 정보
- $cu_atk = send_alimtalk_preset('CU-OR03', ['rcv' => $od_result['od_hp'] ?: $od_result['od_tel'], 'rcvnm' => $od_result['od_name']], $conditions); // 회원
- $ad_atk = send_admin_alimtalk('AD-OR03', 'super', $conditions); // 관리자
- }
- // 알림톡 발송 END --------------------------------------------------------
}
/* = -------------------------------------------------------------------------- = */
diff --git a/shop/settle_lg_common.php b/shop/settle_lg_common.php
index 6230285f2..9213a6ff6 100644
--- a/shop/settle_lg_common.php
+++ b/shop/settle_lg_common.php
@@ -1,6 +1,6 @@
$od_id, 'od_name' => $od_result['od_name'], 'it_name' => $it_name_str]; // 변수 치환 정보
- $cu_atk = send_alimtalk_preset('CU-OR03', ['rcv' => $od_result['od_hp'] ?: $od_result['od_tel'], 'rcvnm' => $od_result['od_name']], $conditions); // 회원
- $ad_atk = send_admin_alimtalk('AD-OR03', 'super', $conditions); // 관리자
- }
- // 알림톡 발송 END --------------------------------------------------------
}
//if( 무통장 입금 성공 상점처리결과 성공 )
diff --git a/shop/settle_nicepay_common.php b/shop/settle_nicepay_common.php
index e44648573..60a80d762 100644
--- a/shop/settle_nicepay_common.php
+++ b/shop/settle_nicepay_common.php
@@ -1,6 +1,5 @@
$od_id, 'od_name' => $od_result['od_name'], 'it_name' => $it_name_str]; // 변수 치환 정보
- $cu_atk = send_alimtalk_preset('CU-OR03', ['rcv' => $od_result['od_hp'] ?: $od_result['od_tel'], 'rcvnm' => $od_result['od_name']], $conditions); // 회원
- $ad_atk = send_admin_alimtalk('AD-OR03', 'super', $conditions); // 관리자
- }
- // 알림톡 발송 END --------------------------------------------------------
}
if($NICEPAY_payLog) {
diff --git a/skin/member/basic/register_form.skin.php b/skin/member/basic/register_form.skin.php
index 7f85dadfb..c4bf8363b 100644
--- a/skin/member/basic/register_form.skin.php
+++ b/skin/member/basic/register_form.skin.php
@@ -271,53 +271,6 @@ gif, jpg, png파일만 가능하며 용량
-
-
-
-
@@ -384,10 +337,10 @@ gif, jpg, png파일만 가능하며 용량
-
+
'아이코드', 'popbill' => '팝빌'];
+ $configKeys = ['cf_sms_use'];
+ $companies = ['icode' => '아이코드'];
$usedCompanies = [];
foreach ($configKeys as $key) {
diff --git a/skin/shop/basic/item.form.skin.php b/skin/shop/basic/item.form.skin.php
index 797b59805..4f1095fb6 100644
--- a/skin/shop/basic/item.form.skin.php
+++ b/skin/shop/basic/item.form.skin.php
@@ -340,11 +340,11 @@ add_stylesheet(' ', 0
}
}
- // 재입고 알림
+ // 재입고SMS 알림
function popup_stocksms(it_id)
{
url = "/itemstocksms.php?it_id=" + it_id;
- opt = "scrollbars=yes,width=616,height=500,top=10,left=10";
+ opt = "scrollbars=yes,width=616,height=420,top=10,left=10";
popup_window(url, "itemstocksms", opt);
}
diff --git a/skin/social/social_register_member.skin.php b/skin/social/social_register_member.skin.php
index 5579cf341..7ef74692f 100644
--- a/skin/social/social_register_member.skin.php
+++ b/skin/social/social_register_member.skin.php
@@ -208,10 +208,10 @@ $email_msg = $is_exists_email ? '등록할 이메일이 중복되었습니다.
-
+
'아이코드', 'popbill' => '팝빌'];
+ $configKeys = ['cf_sms_use'];
+ $companies = ['icode' => '아이코드'];
$usedCompanies = [];
foreach ($configKeys as $key) {
diff --git a/theme/basic/mobile/skin/member/basic/register_form.skin.php b/theme/basic/mobile/skin/member/basic/register_form.skin.php
index 1830eeff4..7ad50a1aa 100644
--- a/theme/basic/mobile/skin/member/basic/register_form.skin.php
+++ b/theme/basic/mobile/skin/member/basic/register_form.skin.php
@@ -259,51 +259,6 @@ if ($config['cf_cert_use'] && ($config['cf_cert_simple'] || $config['cf_cert_ipi
-
-
-
-
@@ -370,10 +325,10 @@ if ($config['cf_cert_use'] && ($config['cf_cert_simple'] || $config['cf_cert_ipi
-
+
'아이코드', 'popbill' => '팝빌'];
+ $configKeys = ['cf_sms_use'];
+ $companies = ['icode' => '아이코드'];
$usedCompanies = [];
foreach ($configKeys as $key) {
diff --git a/theme/basic/mobile/skin/shop/basic/item.form.skin.php b/theme/basic/mobile/skin/shop/basic/item.form.skin.php
index aaf8c17bb..79aa47569 100644
--- a/theme/basic/mobile/skin/shop/basic/item.form.skin.php
+++ b/theme/basic/mobile/skin/shop/basic/item.form.skin.php
@@ -545,11 +545,11 @@ function popup_item_recommend(it_id)
}
}
-// 재입고 알림
+// 재입고SMS 알림
function popup_stocksms(it_id)
{
url = "/itemstocksms.php?it_id=" + it_id;
- opt = "scrollbars=yes,width=616,height=500,top=10,left=10";
+ opt = "scrollbars=yes,width=616,height=420,top=10,left=10";
popup_window(url, "itemstocksms", opt);
}
diff --git a/theme/basic/skin/member/basic/register_form.skin.php b/theme/basic/skin/member/basic/register_form.skin.php
index 63a2073f8..3b16a35f5 100644
--- a/theme/basic/skin/member/basic/register_form.skin.php
+++ b/theme/basic/skin/member/basic/register_form.skin.php
@@ -271,53 +271,6 @@ gif, jpg, png파일만 가능하며 용량
-
-
-
-
@@ -384,10 +337,10 @@ gif, jpg, png파일만 가능하며 용량
-
+
'아이코드', 'popbill' => '팝빌'];
+ $configKeys = ['cf_sms_use'];
+ $companies = ['icode' => '아이코드'];
$usedCompanies = [];
foreach ($configKeys as $key) {
diff --git a/theme/basic/skin/shop/basic/item.form.skin.php b/theme/basic/skin/shop/basic/item.form.skin.php
index 797b59805..4f1095fb6 100644
--- a/theme/basic/skin/shop/basic/item.form.skin.php
+++ b/theme/basic/skin/shop/basic/item.form.skin.php
@@ -340,11 +340,11 @@ add_stylesheet(' ', 0
}
}
- // 재입고 알림
+ // 재입고SMS 알림
function popup_stocksms(it_id)
{
url = "/itemstocksms.php?it_id=" + it_id;
- opt = "scrollbars=yes,width=616,height=500,top=10,left=10";
+ opt = "scrollbars=yes,width=616,height=420,top=10,left=10";
popup_window(url, "itemstocksms", opt);
}