Fix: trial maestro account
This commit is contained in:
@@ -47,7 +47,7 @@ function extension_maestro($maestro_id, $new_available_date) {
|
||||
// ";
|
||||
$query = "
|
||||
UPDATE maestro
|
||||
SET ActivateStatus = 1, AvailableActivateDateTime = DATE_FORMAT(?, '%Y-%m-%d')
|
||||
SET ActivateStatus = 2, AvailableActivateDateTime = DATE_FORMAT(?, '%Y-%m-%d')
|
||||
WHERE MaestroID = ?;
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
|
||||
@@ -29,7 +29,7 @@ function get_maestro_upgrade_list() {
|
||||
global $db_conn;
|
||||
|
||||
$query = "
|
||||
SELECT U.MaestroUpgradeID, U.MaestroID, M.Name, U.RegisteredAccountType, U.RequestedAccountType, U.RequestedDateTime, M.AvailableActivateDateTime, U.Status
|
||||
SELECT U.MaestroUpgradeID, U.MaestroID, M.Name, U.RegisteredActivateStatus, U.RegisteredAccountType, U.RequestedAccountType, U.RequestedDateTime, M.AvailableActivateDateTime, U.Status
|
||||
FROM maestro_upgrade U, maestro M
|
||||
WHERE U.Status < 2 AND U.MaestroID = M.MaestroID
|
||||
ORDER BY U.MaestroUpgradeID DESC
|
||||
@@ -38,13 +38,14 @@ function get_maestro_upgrade_list() {
|
||||
// $stmt->bind_param("iii", $maestroID, $startNo, $endNo);
|
||||
// $stmt->bind_param("ii", $maestroName, $startNo);
|
||||
$stmt->execute();
|
||||
$stmt->bind_result($maestroUpgradeID, $maestroID, $maestroName, $registeredAccountType, $requestedAccountType, $requestedDateTime, $availableActivateDateTime, $status);
|
||||
$stmt->bind_result($maestroUpgradeID, $maestroID, $maestroName, $registeredActivateStatus, $registeredAccountType, $requestedAccountType, $requestedDateTime, $availableActivateDateTime, $status);
|
||||
|
||||
$maestroUpgradeList = array();
|
||||
while($stmt->fetch()) {
|
||||
$maestro["maestroUpgradeID"] = $maestroUpgradeID;
|
||||
$maestro["maestroID"] = $maestroID;
|
||||
$maestro["maestroName"] = $maestroName;
|
||||
$maestro["registeredActivateStatus"] = $registeredActivateStatus;
|
||||
$maestro["registeredAccountType"] = $registeredAccountType;
|
||||
$maestro["requestedAccountType"] = $requestedAccountType;
|
||||
$maestro["requestedDateTime"] = $requestedDateTime;
|
||||
@@ -60,7 +61,7 @@ function get_maestro_update_list_by_name($searchMaestroName) {
|
||||
global $db_conn;
|
||||
|
||||
$query = "
|
||||
SELECT U.MaestroUpgradeID, U.MaestroID, M.Name, U.RegisteredAccountType, U.RequestedAccountType, U.RequestedDateTime, M.AvailableActivateDateTime, U.Status
|
||||
SELECT U.MaestroUpgradeID, U.MaestroID, M.Name, U.RegisteredActivateStatus, U.RegisteredAccountType, U.RequestedAccountType, U.RequestedDateTime, M.AvailableActivateDateTime, U.Status
|
||||
FROM maestro_upgrade U, maestro M
|
||||
WHERE M.Name LIKE CONCAT('%', ?, '%') AND U.MaestroID = M.MaestroID
|
||||
ORDER BY U.MaestroUpgradeID DESC
|
||||
@@ -68,13 +69,14 @@ function get_maestro_update_list_by_name($searchMaestroName) {
|
||||
$stmt = $db_conn->prepare($query);
|
||||
$stmt->bind_param("s", $searchMaestroName);
|
||||
$stmt->execute();
|
||||
$stmt->bind_result($maestroUpgradeID, $maestroID, $maestroName, $registeredAccountType, $requestedAccountType, $requestedDateTime, $availableActivateDateTime, $status);
|
||||
$stmt->bind_result($maestroUpgradeID, $maestroID, $maestroName, $registeredActivateStatus, $registeredAccountType, $requestedAccountType, $requestedDateTime, $availableActivateDateTime, $status);
|
||||
|
||||
$maestroUpgradeList = array();
|
||||
while($stmt->fetch()) {
|
||||
$maestro["maestroUpgradeID"] = $maestroUpgradeID;
|
||||
$maestro["maestroID"] = $maestroID;
|
||||
$maestro["maestroName"] = $maestroName;
|
||||
$maestro["registeredActivateStatus"] = $registeredActivateStatus;
|
||||
$maestro["registeredAccountType"] = $registeredAccountType;
|
||||
$maestro["requestedAccountType"] = $requestedAccountType;
|
||||
$maestro["requestedDateTime"] = $requestedDateTime;
|
||||
|
||||
@@ -61,12 +61,20 @@ function register_maestro($maestroID) {
|
||||
// SET ActivateStatus = 1, AvailableActivateDateTime = DATE_ADD(NOW(), INTERVAL 1 YEAR)
|
||||
// WHERE MaestroID = ?
|
||||
// ";
|
||||
|
||||
// closed beta
|
||||
$query = "
|
||||
UPDATE maestro
|
||||
SET ActivateStatus = 1, AvailableActivateDateTime = '2022-07-31 23:59:59'
|
||||
WHERE MaestroID = ?
|
||||
";
|
||||
|
||||
// (07/17) before 2 weeks from closing beta service
|
||||
// $query = "
|
||||
// UPDATE maestro
|
||||
// SET ActivateStatus = 1, AvailableActivateDateTime = DATE_ADD(NOW(), INTERVAL 14 DAY)
|
||||
// WHERE MaestroID = ?
|
||||
// ";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
$stmt->bind_param("i", $maestroID);
|
||||
$stmt->execute();
|
||||
|
||||
@@ -14,6 +14,7 @@ include "./../mail/send_naver_mail.php";
|
||||
|
||||
$maestro_upgrade_id = $_POST["maestro_upgrade_id"];
|
||||
$maestro_id = $_POST["maestro_id"];
|
||||
$registered_activate_status = $_POST["registered_activate_status"];
|
||||
$registered_account_type = $_POST["registered_account_type"];
|
||||
$upgrade_account_type = $_POST["upgrade_account_type"];
|
||||
|
||||
@@ -23,7 +24,11 @@ change_upgrade_request_status_to_close($maestro_id);
|
||||
change_upgrade_request_status_to_applied($maestro_upgrade_id);
|
||||
|
||||
$maestro_data = get_maestro_data($maestro_id);
|
||||
sendMailUpgradeDone($maestro_data["name"], $maestro_data["email"], $registered_account_type, $upgrade_account_type);
|
||||
if($registered_activate_status == 1) { // 체험
|
||||
sendMailTrialMaestroUpgradeDone($maestro_data["name"], $maestro_data["email"], $registered_account_type, $upgrade_account_type);
|
||||
} else { // 0: 미승인, 2: 활성화, 3: 환불
|
||||
sendMailUpgradeDone($maestro_data["name"], $maestro_data["email"], $registered_account_type, $upgrade_account_type);
|
||||
}
|
||||
insertMaestroLog("upgrade_maestro", $maestro_id, $registered_account_type." -> ".$upgrade_account_type);
|
||||
|
||||
// set_data("maestro_upgrade_id", $maestro_upgrade_id);
|
||||
@@ -39,7 +44,7 @@ function upgrade_maestro($maestro_id, $upgrade_account_type) {
|
||||
|
||||
$query = "
|
||||
UPDATE maestro
|
||||
SET AccountType = ?, ActivateStatus = 1, AvailableActivateDateTime = DATE_ADD(NOW(), INTERVAL 1 YEAR)
|
||||
SET AccountType = ?, ActivateStatus = 2, AvailableActivateDateTime = DATE_ADD(NOW(), INTERVAL 1 YEAR)
|
||||
WHERE MaestroID = ?;
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
|
||||
@@ -37,7 +37,29 @@ if($maestroID === null) {
|
||||
exit;
|
||||
}
|
||||
|
||||
sendMailRegisterBankInfo($maestro_name, $email, $account_type);
|
||||
add_maestro_test_player($maestroID);
|
||||
|
||||
$playerID = get_maestro_test_player($maestroID);
|
||||
if($playerID === null) {
|
||||
set_error_message("마에스트로 테스트 플레이어 생성 실패");
|
||||
send_result_fail();
|
||||
exit;
|
||||
}
|
||||
|
||||
$result = set_maestro_test_player($maestroID, $playerID);
|
||||
if($result === null || $result === 0) {
|
||||
set_error_message("마에스트로 테스트 플레이어 등록 실패");
|
||||
send_result_fail();
|
||||
exit;
|
||||
}
|
||||
|
||||
add_default_activated_apps($maestroID);
|
||||
|
||||
add_maestro_sample_player_data($maestroID);
|
||||
$count = count_registered_player($maestroID);
|
||||
update_count_registered_player($maestroID, $count);
|
||||
|
||||
sendMailTrialRegisterDone($maestro_name, $email, $account_type);
|
||||
insertMaestroLog("add_maestro", $maestroID, $maestro_name." / ".$email." / ".$account_type);
|
||||
|
||||
send_result_success();
|
||||
@@ -69,10 +91,172 @@ function add_maestro($maestro_name, $password, $email, $account_type) {
|
||||
|
||||
$query = "
|
||||
INSERT INTO maestro (Name, Password, Email, AccountType, ActivateStatus, AvailableActivateDateTime, PlayerCount, AcceptClausesDateTime, AllowEditEnterCode, MaestroTestID)
|
||||
VALUES (?, PASSWORD(?), ?, ?, 0, NOW(), 0, NOW(), 0, 0)";
|
||||
VALUES (?, PASSWORD(?), ?, ?, 1, '2022-07-31 23:59:59', 0, NOW(), 0, 0)";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
$stmt->bind_param("sssi", $maestro_name, $password, $email, $account_type);
|
||||
$stmt->execute();
|
||||
}
|
||||
|
||||
function add_maestro_test_player($maestroID) {
|
||||
global $db_conn;
|
||||
|
||||
$query = "
|
||||
INSERT INTO player (MaestroID, Name, EnterCode, AccountType)
|
||||
VALUES (?, '마에스트로', '', 1)
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
$stmt->bind_param("i", $maestroID);
|
||||
$stmt->execute();
|
||||
}
|
||||
|
||||
function get_maestro_test_player($maestroID) {
|
||||
global $db_conn;
|
||||
|
||||
$query = "
|
||||
SELECT PlayerID
|
||||
FROM player
|
||||
WHERE MaestroID = ? AND AccountType = 1
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
$stmt->bind_param("i", $maestroID);
|
||||
$stmt->execute();
|
||||
$stmt->bind_result($playerID);
|
||||
$stmt->fetch();
|
||||
$stmt->close();
|
||||
|
||||
return $playerID;
|
||||
}
|
||||
|
||||
function set_maestro_test_player($maestroID, $playerID) {
|
||||
global $db_conn;
|
||||
|
||||
$query = "
|
||||
UPDATE maestro
|
||||
SET MaestroTestID = ?
|
||||
WHERE MaestroID = ?
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
$stmt->bind_param("ii", $playerID, $maestroID);
|
||||
$stmt->execute();
|
||||
|
||||
return $stmt->affected_rows;
|
||||
}
|
||||
|
||||
function add_default_activated_apps($maestroID) {
|
||||
global $db_conn;
|
||||
|
||||
$query = "
|
||||
SELECT AppID
|
||||
FROM app
|
||||
WHERE Status = 1;
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
$stmt->execute();
|
||||
$stmt->bind_result($appID);
|
||||
|
||||
$activeAppList = array();
|
||||
while($stmt->fetch()) {
|
||||
array_push($activeAppList, $appID);
|
||||
}
|
||||
$stmt->close();
|
||||
|
||||
$count = count($activeAppList);
|
||||
for($i = 0; $i < $count; $i++) {
|
||||
$activeAppID = $activeAppList[$i];
|
||||
|
||||
$query = "
|
||||
INSERT INTO active_app (MaestroID, AppID)
|
||||
VALUES (?, ?);
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
$stmt->bind_param("ii", $maestroID, $activeAppID);
|
||||
$stmt->execute();
|
||||
$stmt->close();
|
||||
}
|
||||
}
|
||||
|
||||
function add_maestro_sample_player_data($maestro_id) {
|
||||
$samplePlayerList = make_sample_player_list($maestro_id);
|
||||
for($i = 0; $i < count($samplePlayerList); $i++) {
|
||||
insert_maestro_sample_player_data($maestro_id, $samplePlayerList[$i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function insert_maestro_sample_player_data($maestro_id, $player) {
|
||||
global $db_conn;
|
||||
|
||||
$query = "
|
||||
INSERT INTO player (MaestroID, Name, EnterCode, AccountType)
|
||||
VALUES (?, ?, ?, ?)
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
$stmt->bind_param("issi",
|
||||
$maestro_id,
|
||||
$player["Name"],
|
||||
$player["EnterCode"],
|
||||
$player["AccountType"]
|
||||
);
|
||||
$stmt->execute();
|
||||
$stmt->close();
|
||||
}
|
||||
|
||||
function make_sample_player_list() {
|
||||
$samplePlayerList = array();
|
||||
|
||||
$player["Name"] = "050215";
|
||||
$player["EnterCode"] = "050215";
|
||||
$player["AccountType"] = 0;
|
||||
array_push($samplePlayerList, $player);
|
||||
|
||||
$player["Name"] = "6-3_이철수";
|
||||
$player["EnterCode"] = "1111";
|
||||
$player["AccountType"] = 0;
|
||||
array_push($samplePlayerList, $player);
|
||||
|
||||
$player["Name"] = "3-1김영희";
|
||||
$player["EnterCode"] = "0301";
|
||||
$player["AccountType"] = 0;
|
||||
array_push($samplePlayerList, $player);
|
||||
|
||||
$player["Name"] = "홍길동";
|
||||
$player["EnterCode"] = "181231";
|
||||
$player["AccountType"] = 0;
|
||||
array_push($samplePlayerList, $player);
|
||||
|
||||
return $samplePlayerList;
|
||||
}
|
||||
|
||||
function count_registered_player($maestroID) {
|
||||
global $db_conn;
|
||||
|
||||
$query = "
|
||||
SELECT COUNT(PlayerID)
|
||||
FROM player
|
||||
WHERE MaestroID = ? AND AccountType = 0
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
$stmt->bind_param("i", $maestroID);
|
||||
$stmt->execute();
|
||||
$stmt->bind_result($countPlayer);
|
||||
// while($stmt->fetch())
|
||||
$stmt->fetch();
|
||||
$stmt->close();
|
||||
|
||||
return $countPlayer;
|
||||
}
|
||||
|
||||
function update_count_registered_player($maestroID, $countPlayer) {
|
||||
global $db_conn;
|
||||
|
||||
$query = "
|
||||
UPDATE maestro
|
||||
SET PlayerCount = ?
|
||||
WHERE MaestroID = ?
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
$stmt->bind_param("ii", $countPlayer, $maestroID);
|
||||
$stmt->execute();
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -26,14 +26,20 @@ if($loginData === null) {
|
||||
send_result_fail();
|
||||
exit;
|
||||
} else if($loginData[activateStatus] === 0) {
|
||||
set_error_code("over_date");
|
||||
set_error_message("마에스트로 계정이 아직 활성화되지 않았습니다.");
|
||||
set_error_code("not_paid_maestro");
|
||||
set_error_message("아직 유료 가입하지 않은 마에스트로 계정입니다.");
|
||||
send_result_fail();
|
||||
exit;
|
||||
/*
|
||||
} else if($loginData[activateStatus] === 1 && $date < $now) {
|
||||
} else if($loginData[activateStatus] === 100) {
|
||||
set_error_code("canceled_maestro");
|
||||
set_error_message("등록이 취소된 마에스트로 계정입니다.");
|
||||
send_result_fail();
|
||||
exit;
|
||||
/*
|
||||
// 체험, 활성화 계정은 유효기간이 지나도 접속할 수 있음
|
||||
// 그래야 연장, 업그레이드를 통해 유료 결제하고 계정을 다시 살릴 수 있음
|
||||
} else if($loginData[activateStatus] !== 0 && $date < $now) {
|
||||
set_error_code("over_date");
|
||||
$date = new DateTime($loginData[availableActivateDateTime]);
|
||||
set_error_message("마에스트로 계정의 유효기간이 지났습니다. : ".$date->format("Y-m-d H:i:s"));
|
||||
send_result_fail();
|
||||
exit;
|
||||
@@ -60,7 +66,7 @@ function get_maestro_id($maestroName) {
|
||||
$query = "
|
||||
SELECT MaestroID
|
||||
FROM maestro
|
||||
WHERE Name = ? AND ActivateStatus = 1
|
||||
WHERE Name = ? AND ActivateStatus != 0
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
$stmt->bind_param("s", $maestroName);
|
||||
|
||||
@@ -18,6 +18,7 @@ $playerCount = getPlayerCount($maestroID);
|
||||
set_data("name", $info["name"]);
|
||||
set_data("email", $info["email"]);
|
||||
set_data("accountType", $info["accountType"]);
|
||||
set_data("activateStatus", $info["activateStatus"]);
|
||||
set_data("availableActivateDateTime", $info["availableActivateDateTime"]);
|
||||
set_data("playerCount", $playerCount);
|
||||
send_result_success();
|
||||
@@ -28,14 +29,14 @@ function get_maestro_info($maestroID) {
|
||||
global $db_conn;
|
||||
|
||||
$query = "
|
||||
SELECT Name, Email, AccountType, AvailableActivateDateTime, PlayerCount
|
||||
SELECT Name, Email, AccountType, ActivateStatus, AvailableActivateDateTime, PlayerCount
|
||||
FROM maestro
|
||||
WHERE MaestroID = ?
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
$stmt->bind_param("s", $maestroID);
|
||||
$stmt->execute();
|
||||
$stmt->bind_result($name, $email, $accountType, $availableActivateDateTime, $playerCount);
|
||||
$stmt->bind_result($name, $email, $accountType, $activateStatus, $availableActivateDateTime, $playerCount);
|
||||
// while($stmt->fetch())
|
||||
$stmt->fetch();
|
||||
$stmt->close();
|
||||
@@ -43,6 +44,7 @@ function get_maestro_info($maestroID) {
|
||||
$info["name"] = $name;
|
||||
$info["email"] = $email;
|
||||
$info["accountType"] = $accountType;
|
||||
$info["activateStatus"] = $activateStatus;
|
||||
$info["availableActivateDateTime"] = $availableActivateDateTime;
|
||||
$info["playerCount"] = $playerCount;
|
||||
|
||||
|
||||
@@ -11,7 +11,8 @@ include './../lib/maestro_account_info.php';
|
||||
include "./../mail/send_naver_mail.php";
|
||||
|
||||
$maestro_id = $_POST["maestro_id"];
|
||||
$registered_acount_type = $_POST["registered_account_type"];
|
||||
$registered_activate_status = $_POST["registered_activate_status"];
|
||||
$registered_account_type = $_POST["registered_account_type"];
|
||||
$upgrade_account_type = $_POST["upgrade_account_type"];
|
||||
|
||||
|
||||
@@ -22,7 +23,7 @@ $upgrade_account_type = $_POST["upgrade_account_type"];
|
||||
// exit;
|
||||
// }
|
||||
|
||||
add_maestro_update($maestro_id, $registered_acount_type, $upgrade_account_type);
|
||||
add_maestro_update($maestro_id, $registered_activate_status, $registered_account_type, $upgrade_account_type);
|
||||
|
||||
// simplely check if maestro upgrade db added or not
|
||||
$countUpgrade = count_maestro_upgrade($maestro_id);
|
||||
@@ -35,7 +36,12 @@ if($countUpgrade === null || $countUpgrade < 1) {
|
||||
}
|
||||
|
||||
$maestro_data = get_maestro_data($maestro_id);
|
||||
sendMailUpgradeBankInfo($maestro_data["name"], $maestro_data["email"], $registered_acount_type, $upgrade_account_type);
|
||||
if($maestro_data["activateStatus"] == 1) { // 체험
|
||||
sendMailTrialMaestroUpgradeBankInfo($maestro_data["name"], $maestro_data["email"], $registered_account_type, $upgrade_account_type);
|
||||
} else { // activateStatus == 2 : 활성화
|
||||
sendMailUpgradeBankInfo($maestro_data["name"], $maestro_data["email"], $registered_account_type, $upgrade_account_type);
|
||||
}
|
||||
|
||||
|
||||
send_result_success();
|
||||
exit;
|
||||
@@ -61,15 +67,15 @@ function count_maestro_upgrade($maestro_id) {
|
||||
return $countUpgrade;
|
||||
}
|
||||
|
||||
function add_maestro_update($maestro_id, $registered_acount_type, $upgrade_account_type) {
|
||||
function add_maestro_update($maestro_id, $registered_activate_status, $registered_account_type, $upgrade_account_type) {
|
||||
global $db_conn;
|
||||
|
||||
$query = "
|
||||
INSERT INTO maestro_upgrade (RegisteredAccountType, RequestedAccountType, RequestedDateTime, Status, MaestroID)
|
||||
VALUES (?, ?, NOW(), 1, ?);
|
||||
INSERT INTO maestro_upgrade (RegisteredActivateStatus, RegisteredAccountType, RequestedAccountType, RequestedDateTime, Status, MaestroID)
|
||||
VALUES (?, ?, ?, NOW(), 1, ?);
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
$stmt->bind_param("iii", $registered_acount_type, $upgrade_account_type, $maestro_id);
|
||||
$stmt->bind_param("iiii", $registered_activate_status, $registered_account_type, $upgrade_account_type, $maestro_id);
|
||||
$stmt->execute();
|
||||
}
|
||||
|
||||
|
||||
@@ -86,11 +86,19 @@ $subjectMap['closedBetaRegistrationDone'] = "[초코마에] {{maestro_name}} -
|
||||
$bodyMap['closedBetaRegistrationDone'] = "안녕하세요.<br/>".
|
||||
"[초코마에] 마에스트로 계정을 신청해 주셔서 감사합니다.<br/>".
|
||||
"<br/>".
|
||||
"신청하신 마에스트로 계정 내용은 아래와 같습니다.<br/>".
|
||||
"1) 아이디 : {{maestro_name}}<br/>".
|
||||
"2) 요금제 : {{student_count}}명 ({{price}}원)<br/>".
|
||||
"<br/>".
|
||||
"--------------------".
|
||||
"<br/>".
|
||||
"<br/>".
|
||||
"{{maestro_name}} - 마에스트로 계정이 활성화 되었습니다.<br/>".
|
||||
"<br/>".
|
||||
"* 베타 기간인 7월 말까지 무료로 사용하실 수 있습니다. 마음에 들면 유료 정식 서비스때 결제 부탁드릴게요.<br/>".
|
||||
"* 베타 기간동안 서버 부하와 안정성을 확인합니다. 문제가 없으면 이후 유료로 정식 서비스를 재개할 예정입니다.<br/>".
|
||||
"* 계정 업그레이드는 베타 기간 이후에 가능합니다.<br/>".
|
||||
"<br/>".
|
||||
"* 베타 기간인 7월 말까지 무료로 사용하실 수 있습니다. 마음에 들면 유료 결제(유효기간 연장 / 업그레이드)를 부탁드릴게요.<br/>".
|
||||
"* 어뷰징 및 서버 성능 향상을 위해 사용하지 않는 계정은 삭제됩니다.<br/>".
|
||||
"* 위와 같은 이유로, 2주간의 체험 기간이 끝나고 결제가 이루어지지 않은 계정은 이후 자동으로 삭제됩니다.<br/>".
|
||||
"<br/>".
|
||||
"등록하신 마에스트로 계정 정보는 마에스트로 로그인 후, [계정 정보 수정] 화면에서 변경이 가능합니다.<br/>".
|
||||
"(변경 가능 정보 : 마에스트로 아이디, 이메일, 암호)<br/>".
|
||||
@@ -98,7 +106,6 @@ $bodyMap['closedBetaRegistrationDone'] = "안녕하세요.<br/>".
|
||||
"감사합니다.";
|
||||
|
||||
|
||||
|
||||
// extension
|
||||
$subjectMap['extensionBankInfo'] = "[초코마에] {{maestro_name}} - 마에스트로 계정 유효기간 연장을 위한 입금 안내";
|
||||
$bodyMap['extensionBankInfo'] = "안녕하세요.<br/>".
|
||||
@@ -143,6 +150,52 @@ $bodyMap['extensionDone'] = "안녕하세요.<br/>".
|
||||
|
||||
|
||||
|
||||
// upgrade - trial maestro
|
||||
$subjectMap['trialMaestroUpgradeBankInfo'] = "[초코마에] {{maestro_name}} - 마에스트로 계정 업그레이드를 위한 입금 안내";
|
||||
$bodyMap['trialMaestroUpgradeBankInfo'] = "안녕하세요.<br/>".
|
||||
"[초코마에] 마에스트로 계정 요금제 업그레이드를 신청해주셔서 감사합니다.<br/>".
|
||||
"<br/>".
|
||||
"{{maestro_name}} - 마에스트로 계정의 현재 요금제와 업그레이드 요금제는 아래와 같습니다.<br/>".
|
||||
"1) 현재 사용중인 요금제 : {{prev_student_count}}명 (0원 : 무료 체험 기간)<br/>".
|
||||
"2) 신청하신 업그레이드 요금제 : {{upgrade_student_count}}명 ({{upgrade_price}}원)<br/>".
|
||||
"<br/>".
|
||||
"<br/>".
|
||||
"계정 요금제 업그레이드를 위한 은행 계좌 입금 정보는 아래와 같습니다.<br/>".
|
||||
"------------------------------------------------------------<br/>".
|
||||
"* 은행 계좌 : {{bank_account_no}} ( 카카오뱅크, 예금주 : 박지상 )<br/>".
|
||||
"* 금액 : {{upgrade_price}}원<br/>".
|
||||
"* 송금자명 : {{maestro_name}} (신청하신 마에스트로 아이디)<br/>".
|
||||
" ☞ 빠른 입금 확인을 위해, 송금자명을 본인 이름 대신 위와 같이 아이디로 부탁드립니다 ☜<br/>".
|
||||
"------------------------------------------------------------<br/>".
|
||||
"<br/>".
|
||||
"* 혹시 신청하신 아이디가 아니라 본인 이름등으로 송금되었다면, 송금자명을 본 메일로 답신 부탁드립니다.<br/>".
|
||||
"<br/>".
|
||||
"* 상위 요금제로 업그레이드 하시면, 유효기간은 업그레이드가 적용된 날짜로부터 1년으로 설정됩니다.<br/>".
|
||||
"* 유효기간이 끝나서 비활성화된 계정과 그 안에 있는 모든 정보는, 6개월 후에 자동 삭제됩니다.<br/>".
|
||||
"<br/>".
|
||||
"<br/>".
|
||||
"계정 신청 내역과 입금 내역이 확인되는대로 마에스트로 아이디를 업그레이드 해드리겠습니다.<br/>".
|
||||
"현재 수작업으로 확인하고 활성화하고 있어서 시간이 조금 걸리는 점 양해 부탁드립니다.<br/>".
|
||||
"마에스트로 계정이 업그레이드 되는대로, 즉시 알림 메일을 드리겠습니다.<br/>".
|
||||
"<br/>".
|
||||
"감사합니다.";
|
||||
|
||||
$subjectMap['trialMaestroUpgradeDone'] = "[초코마에] {{maestro_name}} - 마에스트로 계정의 요금제 업그레이드 완료 알림";
|
||||
$bodyMap['trialMaestroUpgradeDone'] = "안녕하세요.<br/>".
|
||||
"[초코마에] 마에스트로 계정 요금제 업그레이드를 신청해주셔서 감사합니다.<br/>".
|
||||
"<br/>".
|
||||
"{{maestro_name}} - 마에스트로 계정의 요금제가 [ {{prev_student_count}}명 (0원 : 무료 체험 기간) ] 에서 [ {{upgrade_student_count}}명 ({{upgrade_price}}원) ] 으로 업그레이드 되었습니다.<br/>".
|
||||
"<br/>".
|
||||
"* 마에스트로 계정 유효기간이 오늘부터 1년으로 설정되었습니다.<br/>".
|
||||
"<br/>".
|
||||
"<br/>".
|
||||
"등록하신 마에스트로 계정 정보는 마에스트로 로그인 후, [계정 정보 수정] 화면에서 변경이 가능합니다.<br/>".
|
||||
"(변경 가능 정보 : 마에스트로 아이디, 이메일, 암호)<br/>".
|
||||
"<br/>".
|
||||
"감사합니다.";
|
||||
|
||||
|
||||
|
||||
// upgrade
|
||||
$subjectMap['upgradeBankInfo'] = "[초코마에] {{maestro_name}} - 마에스트로 계정 업그레이드를 위한 입금 안내";
|
||||
$bodyMap['upgradeBankInfo'] = "안녕하세요.<br/>".
|
||||
@@ -163,7 +216,7 @@ $bodyMap['upgradeBankInfo'] = "안녕하세요.<br/>".
|
||||
"<br/>".
|
||||
"* 혹시 신청하신 아이디가 아니라 본인 이름등으로 송금되었다면, 송금자명을 본 메일로 답신 부탁드립니다.<br/>".
|
||||
"<br/>".
|
||||
"* 상위 요금제로 업그레이드 하시면, 유효기간은 업그레이드가 적용된 날짜로부터 1년으로 다시 채워집니다.<br/>".
|
||||
"* 상위 요금제로 업그레이드 하시면, 유효기간은 업그레이드가 적용된 날짜로부터 1년으로 설정됩니다.<br/>".
|
||||
"* 유효기간이 끝나서 비활성화된 계정과 그 안에 있는 모든 정보는, 6개월 후에 자동 삭제됩니다.<br/>".
|
||||
"<br/>".
|
||||
"<br/>".
|
||||
@@ -179,7 +232,7 @@ $bodyMap['upgradeDone'] = "안녕하세요.<br/>".
|
||||
"<br/>".
|
||||
"{{maestro_name}} - 마에스트로 계정의 요금제가 [ {{prev_student_count}}명 ({{prev_price}}원) ] 에서 [ {{upgrade_student_count}}명 ({{upgrade_price}}원) ] 으로 업그레이드 되었습니다.<br/>".
|
||||
"<br/>".
|
||||
"* 마에스트로 계정 유효기간이 오늘부터 1년으로 다시 채워졌습니다.<br/>".
|
||||
"* 마에스트로 계정 유효기간이 오늘부터 1년으로 설정되었습니다.<br/>".
|
||||
"<br/>".
|
||||
"<br/>".
|
||||
"등록하신 마에스트로 계정 정보는 마에스트로 로그인 후, [계정 정보 수정] 화면에서 변경이 가능합니다.<br/>".
|
||||
|
||||
@@ -40,6 +40,21 @@ function sendMailRegisterDone($maestro_name, $maestro_email) {
|
||||
}
|
||||
|
||||
|
||||
// Register - closed beta, trial maestro
|
||||
function sendMailTrialRegisterDone($maestro_name, $maestro_email, $account_type) {
|
||||
global $subjectMap, $bodyMap;
|
||||
|
||||
$subject = str_replace("{{maestro_name}}", $maestro_name, $subjectMap['closedBetaRegistrationDone']);
|
||||
|
||||
$body = str_replace("{{maestro_name}}", $maestro_name, $bodyMap['closedBetaRegistrationDone']);
|
||||
$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);
|
||||
|
||||
return send_naver_mail($maestro_email, $maestro_name, $subject, $body);
|
||||
}
|
||||
|
||||
|
||||
// Extend
|
||||
function sendMailExtensionBankInfo($maestro_name, $prev_date, $new_available_date, $maestro_email, $account_type) {
|
||||
global $subjectMap, $bodyMap, $bank_account_no;
|
||||
@@ -69,6 +84,39 @@ function sendMailExtensionDone($maestro_name, $new_available_date, $maestro_emai
|
||||
}
|
||||
|
||||
|
||||
// Upgrade - trial maestro
|
||||
function sendMailTrialMaestroUpgradeBankInfo($maestro_name, $maestro_email, $prev_account_type, $upgrade_account_type) {
|
||||
global $subjectMap, $bodyMap, $bank_account_no;
|
||||
|
||||
$subject = str_replace("{{maestro_name}}", $maestro_name, $subjectMap['trialMaestroUpgradeBankInfo']);
|
||||
|
||||
$body = str_replace("{{maestro_name}}", $maestro_name, $bodyMap['trialMaestroUpgradeBankInfo']);
|
||||
$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("{{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);
|
||||
$body = str_replace("{{price}}", $upgrade_price, $body);
|
||||
|
||||
return send_naver_mail($maestro_email, $maestro_name, $subject, $body);
|
||||
}
|
||||
|
||||
function sendMailTrialMaestroUpgradeDone($maestro_name, $maestro_email, $prev_account_type, $upgrade_account_type) {
|
||||
global $subjectMap, $bodyMap;
|
||||
|
||||
$subject = str_replace("{{maestro_name}}", $maestro_name, $subjectMap['trialMaestroUpgradeDone']);
|
||||
|
||||
$body = str_replace("{{maestro_name}}", $maestro_name, $bodyMap['trialMaestroUpgradeDone']);
|
||||
$body = str_replace("{{prev_student_count}}", get_max_player_count($prev_account_type), $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);
|
||||
}
|
||||
|
||||
|
||||
// Upgrade
|
||||
function sendMailUpgradeBankInfo($maestro_name, $maestro_email, $prev_account_type, $upgrade_account_type) {
|
||||
global $subjectMap, $bodyMap, $bank_account_no;
|
||||
@@ -83,8 +131,9 @@ function sendMailUpgradeBankInfo($maestro_name, $maestro_email, $prev_account_ty
|
||||
$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);
|
||||
$charge_price = get_price($upgrade_account_type) - get_price($prev_account_type);
|
||||
// $charge_price = (int)$upgrade_price - (int)$prev_price;
|
||||
$body = str_replace("{{price}}", number_format($charge_price), $body);
|
||||
|
||||
return send_naver_mail($maestro_email, $maestro_name, $subject, $body);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ if($activateStatus == 0) {
|
||||
send_result_fail();
|
||||
exit;
|
||||
} else if($activateStatus == 100) {
|
||||
set_error_message("죄송합니다. 등록이 취소된 마에스트로 계정입니다.");
|
||||
set_error_message("등록이 취소된 마에스트로 계정입니다.");
|
||||
send_result_fail();
|
||||
exit;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user