Fix: notice for reopen, start paid service

This commit is contained in:
2022-06-29 20:45:42 +09:00
parent 7bcbf7495c
commit 9eec33cc49
9 changed files with 256 additions and 77 deletions
+4 -7
View File
@@ -42,9 +42,6 @@ $bodyMap['registrationDone'] = "안녕하세요.<br/>".
"* 상위 요금제로 업그레이드 하시면, 유효기간은 업그레이드가 적용된 날짜로부터 1년으로 다시 채워집니다.<br/>".
"* 유효기간이 끝나서 비활성화된 계정과 그 안에 있는 모든 정보는, 6개월 후에 자동 삭제됩니다.<br/>".
"<br/>".
"* 아래 URL을 사용하면, 마에스트로 이름이 입력된 로그인 화면이 실행됩니다.<br/>".
"http://chocomae.jinaju.com/login/{{maestro_name}}<br/>".
"<br/>".
"등록하신 마에스트로 계정 정보는 마에스트로 로그인 후, [계정 정보 수정] 화면에서 변경이 가능합니다.<br/>".
"(변경 가능 정보 : 마에스트로 아이디, 이메일, 암호)<br/>".
"<br/>".
@@ -109,10 +106,10 @@ $bodyMap['extensionBankInfo'] = "안녕하세요.<br/>".
"<br/>".
"{{maestro_name}} - 마에스트로 계정의 현재 요금제와 유효기간은 아래와 같습니다.<br/>".
"1) 현재 사용중인 요금제 : {{student_count}}명 ({{price}}원)<br/>".
"2) 유효기간 : {{date}}<br/>".
"2) 유효기간 : {{prev_date}}<br/>".
"<br/>".
"연장을 신청하실 경우, 새로운 유효기간은 아래와 같습니다.<br/>".
"3) 새로운 유효기간 : 2020-11-04<br/>".
"3) 새로운 유효기간 : {{new_available_date}}<br/>".
"<br/>".
"계정 유효기간 연장을 위한 은행 계좌 입금 정보는 아래와 같습니다.<br/>".
"------------------------------------------------------------<br/>".
@@ -137,7 +134,7 @@ $bodyMap['extensionDone'] = "안녕하세요.<br/>".
"[초코마에] 마에스트로 계정의 유효기간 연장을 신청해 주셔서 감사합니다.<br/>".
"<br/>".
"{{maestro_name}} - 마에스트로 계정의 유효기간이 +1년 연장되었습니다.<br/>".
"* 새로운 유효기간 : {{date}}<br/>".
"* 새로운 유효기간 : {{new_available_date}}<br/>".
"<br/>".
"* 상위 요금제로 업그레이드 하시면, 유효기간이 업그레이드한 날짜로부터 1년으로 갱신됩니다.<br/>".
"* 유효기간이 끝나면, 비활성화된 계정과 그 안에 있는 모든 정보가 6개월 후에 자동 삭제됩니다.<br/>".
@@ -180,7 +177,7 @@ $subjectMap['upgradeDone'] = "[초코마에] {{maestro_name}} - 마에스트로
$bodyMap['upgradeDone'] = "안녕하세요.<br/>".
"[초코마에] 마에스트로 계정 요금제 업그레이드를 신청해주셔서 감사합니다.<br/>".
"<br/>".
"{{maestro_name}} - 마에스트로 계정의 요금제가 [ 50명 ({{prev_price}}원) ] 에서 [ 500명 ({{price}}원) ] 으로 업그레이드 되었습니다.<br/>".
"{{maestro_name}} - 마에스트로 계정의 요금제가 [ {{prev_student_count}}명 ({{prev_price}}원) ] 에서 [ {{upgrade_student_count}}명 ({{upgrade_price}}원) ] 으로 업그레이드 되었습니다.<br/>".
"<br/>".
"* 마에스트로 계정 유효기간이 오늘부터 1년으로 다시 채워졌습니다.<br/>".
"<br/>".
+59 -21
View File
@@ -11,19 +11,20 @@ require './../PHPMailer/src/Exception.php';
require './../PHPMailer/src/PHPMailer.php';
require './../PHPMailer/src/SMTP.php';
// include_once "./../lib/send_reply_json.php";
include_once "mail_setting.php";
// Register
function sendMailRegisterBankInfo($maestro_name, $maestro_email, $account_type) {
global $subjectMap, $bodyMap;
global $subjectMap, $bodyMap, $bank_account_no;
// closed beta
$subject = str_replace("{{maestro_name}}", $maestro_name, $subjectMap['closedBetaRegistrationBankInfo']);
$subject = str_replace("{{maestro_name}}", $maestro_name, $subjectMap['registrationBankInfo']);
$body = str_replace("{{maestro_name}}", $maestro_name, $bodyMap['closedBetaRegistrationBankInfo']);
$body = str_replace("{{maestro_name}}", $maestro_name, $bodyMap['registrationBankInfo']);
$body = str_replace("{{student_count}}", get_max_player_count($account_type), $body);
$price = number_format(get_price($account_type));
$body = str_replace("{{price}}", $price, $body);
$body = str_replace("{{bank_account_no}}", $bank_account_no, $body);
return send_naver_mail($maestro_email, $maestro_name, $subject, $body);
}
@@ -31,42 +32,75 @@ function sendMailRegisterBankInfo($maestro_name, $maestro_email, $account_type)
function sendMailRegisterDone($maestro_name, $maestro_email) {
global $subjectMap, $bodyMap;
// closed beta
$subject = str_replace("{{maestro_name}}", $maestro_name, $subjectMap['closedBetaRegistrationDone']);
$subject = str_replace("{{maestro_name}}", $maestro_name, $subjectMap['registrationDone']);
$body = str_replace("{{maestro_name}}", $maestro_name, $bodyMap['closedBetaRegistrationDone']);
$body = str_replace("{{maestro_name}}", $maestro_name, $bodyMap['registrationDone']);
return send_naver_mail($maestro_email, $maestro_name, $subject, $body);
}
// Extend
function sendMailExtensionBankInfo($maestro_name, $available_date, $new_available_date, $maestro_email, $registered_account_type) {
$subject = "Naver 메일 발신 테스트";
$body = "sendMailExtensionBankInfo";
function sendMailExtensionBankInfo($maestro_name, $prev_date, $new_available_date, $maestro_email, $account_type) {
global $subjectMap, $bodyMap, $bank_account_no;
$subject = str_replace("{{maestro_name}}", $maestro_name, $subjectMap['extensionBankInfo']);
$body = str_replace("{{maestro_name}}", $maestro_name, $bodyMap['extensionBankInfo']);
$body = str_replace("{{student_count}}", get_max_player_count($account_type), $body);
$price = number_format(get_price($account_type));
$body = str_replace("{{price}}", $price, $body);
$body = str_replace("{{prev_date}}", $prev_date, $body);
$body = str_replace("{{new_available_date}}", $new_available_date, $body);
$body = str_replace("{{bank_account_no}}", $bank_account_no, $body);
return send_naver_mail($maestro_email, $maestro_name, $subject, $body);
}
function sendMailExtensionDone($maestro_name, $new_available_date, $maestro_email) {
$subject = "Naver 메일 발신 테스트";
$body = "sendMailExtensionDone";
global $subjectMap, $bodyMap;
$subject = str_replace("{{maestro_name}}", $maestro_name, $subjectMap['extensionDone']);
$body = str_replace("{{maestro_name}}", $maestro_name, $bodyMap['extensionDone']);
$body = str_replace("{{new_available_date}}", $new_available_date, $body);
return send_naver_mail($maestro_email, $maestro_name, $subject, $body);
}
// Upgrade
function sendMailUpgradeBankInfo($maestro_name, $maestro_email, $account_type, $upgrade_account_type) {
$subject = "Naver 메일 발신 테스트";
$body = "sendMailUpgradeBankInfo";
function sendMailUpgradeBankInfo($maestro_name, $maestro_email, $prev_account_type, $upgrade_account_type) {
global $subjectMap, $bodyMap, $bank_account_no;
$subject = str_replace("{{maestro_name}}", $maestro_name, $subjectMap['upgradeBankInfo']);
$body = str_replace("{{maestro_name}}", $maestro_name, $bodyMap['upgradeBankInfo']);
$body = str_replace("{{prev_student_count}}", get_max_player_count($prev_account_type), $body);
$prev_price = number_format(get_price($prev_account_type));
$body = str_replace("{{prev_price}}", $prev_price, $body);
$body = str_replace("{{upgrade_student_count}}", get_max_player_count($upgrade_account_type), $body);
$upgrade_price = number_format(get_price($upgrade_account_type));
$body = str_replace("{{upgrade_price}}", $upgrade_price, $body);
$body = str_replace("{{bank_account_no}}", $bank_account_no, $body);
$charge_price = (int)$upgrade_price - (int)$prev_price;
$body = str_replace("{{price}}", $charge_price, $body);
return send_naver_mail($maestro_email, $maestro_name, $subject, $body);
}
function sendMailUpgradeDone($maestro_name, $maestro_email, $account_type, $upgrade_account_type) {
$subject = "Naver 메일 발신 테스트";
$body = "sendMailUpgradeDone";
function sendMailUpgradeDone($maestro_name, $maestro_email, $prev_account_type, $upgrade_account_type) {
global $subjectMap, $bodyMap;
$subject = str_replace("{{maestro_name}}", $maestro_name, $subjectMap['upgradeDone']);
$body = str_replace("{{maestro_name}}", $maestro_name, $bodyMap['upgradeDone']);
$body = str_replace("{{prev_student_count}}", get_max_player_count($prev_account_type), $body);
$prev_price = number_format(get_price($prev_account_type));
$body = str_replace("{{prev_price}}", $prev_price, $body);
$body = str_replace("{{upgrade_student_count}}", get_max_player_count($upgrade_account_type), $body);
$upgrade_price = number_format(get_price($upgrade_account_type));
$body = str_replace("{{upgrade_price}}", $upgrade_price, $body);
return send_naver_mail($maestro_email, $maestro_name, $subject, $body);
}
@@ -97,8 +131,12 @@ function sendMailUpdateMaestroEmail($maestro_name, $maestro_email, $maestro_emai
// experation
function sendMailExperation30days($maestro_name, $maestro_email, $maestro_email_prev) {
$subject = "Naver 메일 발신 테스트";
$body = "sendMailExperation30days";
global $subjectMap, $bodyMap;
$subject = $subjectMap['experation30days'];
$body = str_replace("{{prev_email}}", $maestro_email_prev, $bodyMap['experation30days']);
$body = str_replace("{{update_email}}", $maestro_email, $body);
return send_naver_mail($maestro_email, $maestro_name, $subject, $body);
}