팝빌 알림톡 기능 추가

This commit is contained in:
chym1217
2025-09-04 12:32:31 +09:00
parent 37d0dcb48f
commit 66f6a75a10
99 changed files with 8876 additions and 260 deletions

View File

@ -1,6 +1,7 @@
<?php
include_once('./_common.php');
include_once(G5_LIB_PATH.'/mailer.lib.php');
include_once(G5_KAKAO5_PATH.'/kakao5.lib.php');
$post_p_hash = isset($_POST['P_HASH']) ? $_POST['P_HASH'] : '';
$post_enc_data = isset($_POST['enc_data']) ? $_POST['enc_data'] : '';
@ -580,6 +581,9 @@ if( !$od_id ){
if(function_exists('add_order_post_log')) add_order_post_log('주문번호가 없습니다.');
die("주문번호가 없습니다.");
}
// 주문 상품명 및 개수 조회
$it_name_str = get_alimtalk_cart_item_name($od_id); // 상품명
$od_escrow = 0;
if(isset($escw_yn) && $escw_yn == 'Y')
@ -944,6 +948,19 @@ if($config['cf_sms_use'] && ($default['de_sms_use2'] || $default['de_sms_use3'])
}
// SMS END --------------------------------------------------------
// 알림톡 발송 BEGIN: 주문완료[CU-OR01/AD-OR01] / 무통장입금 요청[CU-OR02/AD-OR02] -------------------------
if($od_settle_case == '무통장' && $od_misu > 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);