fix(email): complete mail settings and templates
This commit is contained in:
1 parent
4f8ab94fac
commit
4833053a5c
29 files changed
+716
-426
No files matched your search
@@ -208,8 +208,12 @@ class Withdrawal {
|
||||
$usage['remaining_count'] = max(0, $usage['remaining_count'] - 1);
|
||||
$usage['remaining_minor'] = max(0, $usage['remaining_minor'] - $gross_minor);
|
||||
}
|
||||
return [
|
||||
'withdrawal_id' => $withdrawal_id,
|
||||
if ($withdrawal_id > 0 && !$result->replayed) {
|
||||
do_action('aksrt_withdrawal_submitted', $user_id, $this->get($withdrawal_id) ?: []);
|
||||
}
|
||||
return [
|
||||
'withdrawal_id' => $withdrawal_id,
|
||||
|
||||
'withdrawal_number' => $withdrawal_number,
|
||||
'net_amount' => \AKSRT\Ledger\AssetAmount::from_minor(\AKSRT\Ledger\AssetType::BALANCE, $net_minor)->decimal(),
|
||||
'wallet_balance' => \AKSRT\Ledger\AssetAmount::from_minor(\AKSRT\Ledger\AssetType::BALANCE, $result->balance($user_id, \AKSRT\Ledger\AssetType::BALANCE))->decimal(),
|
||||
@@ -452,11 +456,15 @@ class Withdrawal {
|
||||
$title = __('提现已完成', 'aksrt');
|
||||
$body = sprintf(__('您申请提现 %s 元已处理完成。', 'aksrt'), $amount_txt);
|
||||
}
|
||||
\AKSRT\Messages\Message::get_instance()->send($user_id, 'withdraw', $body, [
|
||||
'title' => $title,
|
||||
'target_url' => function_exists('aksrt_get_user_center_url') ? aksrt_get_user_center_url('credits') : '',
|
||||
]);
|
||||
}
|
||||
\AKSRT\Messages\Message::get_instance()->send($user_id, 'withdraw', $body, [
|
||||
'title' => $title,
|
||||
'target_url' => function_exists('aksrt_get_user_center_url') ? aksrt_get_user_center_url('credits') : '',
|
||||
]);
|
||||
}
|
||||
if (!$replayed && in_array($new_status, [self::STATUS_COMPLETED, self::STATUS_REJECTED], true)) {
|
||||
do_action('aksrt_withdrawal_status_changed', $user_id, $row, $new_status, $note);
|
||||
}
|
||||
|
||||
|
||||
return [
|
||||
'transaction_id' => $ledger_result instanceof \AKSRT\Ledger\LedgerResult ? $ledger_result->transaction_id : 0,
|
||||
|
||||
Reference in new issue
Block a user