|
|
@@ -231,7 +231,7 @@ class QianBaoWithdrawService
|
|
|
if ($item->remark) {
|
|
|
$text .= lang("说明") . ":{$item->remark}\n";
|
|
|
}
|
|
|
- $text .= lang('日期').":{$item->created_at}\n";
|
|
|
+ $text .= lang('日期') . ":{$item->created_at}\n";
|
|
|
}
|
|
|
|
|
|
if ($page > 1) {
|
|
|
@@ -272,8 +272,8 @@ class QianBaoWithdrawService
|
|
|
|
|
|
$wallet = Wallet::where('member_id', $chatId)->first();
|
|
|
$temp = floatval($wallet->available_balance);
|
|
|
- $text = "请发送提现金额\n";
|
|
|
- $text .= "💰 当前余额{$temp} RMB\n";
|
|
|
+ $text = lang("请发送提现金额") . "\n";
|
|
|
+ $text .= "💰 " . lang("当前余额") . "{$temp} RMB\n";
|
|
|
|
|
|
|
|
|
// Cache::put(get_step_key($chatId), StepStatus::INPUT_WITHDRAW_QB_MONEY);
|
|
|
@@ -291,7 +291,7 @@ class QianBaoWithdrawService
|
|
|
Cache::put("{$chatId}_QB_BANK_ID", $id);
|
|
|
return [
|
|
|
'chat_id' => $chatId,
|
|
|
- 'text' => "请输入提现的金额",
|
|
|
+ 'text' => lang("请输入提现的金额"),
|
|
|
];
|
|
|
}
|
|
|
|
|
|
@@ -301,7 +301,7 @@ class QianBaoWithdrawService
|
|
|
if (!preg_match('/^\d+(\.\d{1,2})?$/', $amount)) {
|
|
|
return [
|
|
|
'chat_id' => $chatId,
|
|
|
- 'text' => "金额输入不正确,请发送提现数字",
|
|
|
+ 'text' => lang('金额输入不正确,请发送提现数字'),
|
|
|
'reply_to_message_id' => $messageId
|
|
|
];
|
|
|
}
|
|
|
@@ -339,28 +339,28 @@ class QianBaoWithdrawService
|
|
|
$text = "";
|
|
|
switch ($bank->getChannel()) {
|
|
|
case "DF001":
|
|
|
- $text = "银行卡提现确认\n";
|
|
|
- $text .= "开户行:{$bank->getBankName()}\n";
|
|
|
- $text .= "姓名:{$bank->getAccount()}\n";
|
|
|
- $text .= "提现账号:{$bank->getCardNo()}\n";
|
|
|
- $text .= "提现金额:{$amount}\n";
|
|
|
+ $text = lang('银行卡提现确认') . "\n";
|
|
|
+ $text .= lang('开户行') . ":{$bank->getBankName()}\n";
|
|
|
+ $text .= lang('姓名') . ":{$bank->getAccount()}\n";
|
|
|
+ $text .= lang('提现账号') . ":{$bank->getCardNo()}\n";
|
|
|
+ $text .= lang('提现金额') . ":{$amount}\n";
|
|
|
break;
|
|
|
case "DF002":
|
|
|
- $text = "支付宝提现确认\n";
|
|
|
- $text .= "姓名:{$bank->getAccount()}\n";
|
|
|
- $text .= "提现账号:{$bank->getCardNo()}\n";
|
|
|
- $text .= "提现金额:{$amount}\n";
|
|
|
+ $text = lang("支付宝提现确认") . "\n";
|
|
|
+ $text .= lang('姓名') . ":{$bank->getAccount()}\n";
|
|
|
+ $text .= lang('提现账号') . ":{$bank->getCardNo()}\n";
|
|
|
+ $text .= lang('提现金额') . ":{$amount}\n";
|
|
|
break;
|
|
|
case "DF005":
|
|
|
- $text = "数字人民币提现确认\n";
|
|
|
- $text .= "姓名:{$bank->getAccount()}\n";
|
|
|
- $text .= "提现账号:{$bank->getCardNo()}\n";
|
|
|
- $text .= "提现金额:{$amount}\n";
|
|
|
+ $text = lang('数字人民币提现确认') . "\n";
|
|
|
+ $text .= lang('姓名') . ":{$bank->getAccount()}\n";
|
|
|
+ $text .= lang('提现账号') . ":{$bank->getCardNo()}\n";
|
|
|
+ $text .= lang('提现金额') . ":{$amount}\n";
|
|
|
break;
|
|
|
}
|
|
|
$keyboard = [
|
|
|
[
|
|
|
- ['text' => "确认", 'callback_data' => 'withdraw@@qb_confirm']
|
|
|
+ ['text' => lang("确认"), 'callback_data' => 'withdraw@@qb_confirm']
|
|
|
],
|
|
|
[
|
|
|
['text' => '❌取消', 'callback_data' => "message@@close"]
|
|
|
@@ -387,15 +387,16 @@ class QianBaoWithdrawService
|
|
|
//银行卡管理
|
|
|
private static function banks($chatId, $messageId, $channel = ""): array
|
|
|
{
|
|
|
+ $text = '';
|
|
|
switch ($channel) {
|
|
|
case "DF001":
|
|
|
- $text = "银行卡列表\n";
|
|
|
+ $text = lang("银行卡列表") . "\n";
|
|
|
break;
|
|
|
case "DF002":
|
|
|
- $text = "支付宝账户列表\n";
|
|
|
+ $text = lang('支付宝账户列表') . "\n";
|
|
|
break;
|
|
|
case "DF005":
|
|
|
- $text = "数字人民币账户列表\n";
|
|
|
+ $text = lang('数字人民币账户列表') . "\n";
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
@@ -409,9 +410,12 @@ class QianBaoWithdrawService
|
|
|
$keyboard[] = [['text' => $item->getAlias(), 'callback_data' => "withdrawAddress@@bank_detail{$item->getId()}"]];
|
|
|
}
|
|
|
if (count($list) < 5) {
|
|
|
- $keyboard[] = [['text' => "➕ 添加", 'callback_data' => "withdrawAddress@@bank_choose_channel_{$channel}"], ['text' => "↩️返回", 'callback_data' => "topUp@@home"]];
|
|
|
+ $keyboard[] = [
|
|
|
+ ['text' => lang("➕ 添加"), 'callback_data' => "withdrawAddress@@bank_choose_channel_{$channel}"],
|
|
|
+ ['text' => lang("↩️返回"), 'callback_data' => "topUp@@home"]
|
|
|
+ ];
|
|
|
} else {
|
|
|
- $keyboard[] = [['text' => "↩️返回", 'callback_data' => "topUp@@home"]];
|
|
|
+ $keyboard[] = [['text' => lang("↩️返回"), 'callback_data' => "topUp@@home"]];
|
|
|
}
|
|
|
|
|
|
return [
|
|
|
@@ -429,28 +433,31 @@ class QianBaoWithdrawService
|
|
|
->where('member_id', $chatId)->first();
|
|
|
switch ($bank->getChannel()) {
|
|
|
case "DF001":
|
|
|
- $text = "*银行卡管理*\n\n";
|
|
|
- $text .= "姓名:{$bank->getAccount()}\n";
|
|
|
- $text .= "银行:{$bank->getAccount()}\n";
|
|
|
- $text .= "卡号:{$bank->getCardNo()}\n";
|
|
|
+ $text = "*" . lang('银行卡管理') . "*\n\n";
|
|
|
+ $text .= lang('姓名') . ":{$bank->getAccount()}\n";
|
|
|
+ $text .= lang('银行') . ":{$bank->getAccount()}\n";
|
|
|
+ $text .= lang('卡号') . ":{$bank->getCardNo()}\n";
|
|
|
break;
|
|
|
case "DF002":
|
|
|
- $text = "*支付宝管理*\n\n";
|
|
|
- $text .= "姓名:{$bank->getAccount()}\n";
|
|
|
- $text .= "银行:{$bank->getBankName()}\n";
|
|
|
- $text .= "账号:{$bank->getCardNo()}\n";
|
|
|
+ $text = "*" . lang('支付宝管理') . "*\n\n";
|
|
|
+ $text .= lang('姓名') . ":{$bank->getAccount()}\n";
|
|
|
+ $text .= lang('银行') . ":{$bank->getBankName()}\n";
|
|
|
+ $text .= lang('账号') . ":{$bank->getCardNo()}\n";
|
|
|
break;
|
|
|
default:
|
|
|
- $text = "*银行卡管理*\n\n";
|
|
|
- $text .= "姓名:{$bank->getAccount()}\n";
|
|
|
- $text .= "银行:{$bank->getBankName()}\n";
|
|
|
- $text .= "卡号:{$bank->getCardNo()}\n";
|
|
|
+ $text = "*" . lang('银行卡管理') . "*\n\n";
|
|
|
+ $text .= lang('姓名') . ":{$bank->getAccount()}\n";
|
|
|
+ $text .= lang('银行') . ":{$bank->getBankName()}\n";
|
|
|
+ $text .= lang('卡号') . ":{$bank->getCardNo()}\n";
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
|
|
|
$keyboard = [
|
|
|
- [['text' => '❌删除', 'callback_data' => "withdraw@@bank_del_{$id}"], ['text' => '↩️返回列表', 'callback_data' => "withdraw@@management_{$bank->getChannel()}"]],
|
|
|
+ [
|
|
|
+ ['text' => lang('❌删除'), 'callback_data' => "withdraw@@bank_del_{$id}"],
|
|
|
+ ['text' => lang('↩️返回列表'), 'callback_data' => "withdraw@@management_{$bank->getChannel()}"]
|
|
|
+ ],
|
|
|
];
|
|
|
return [
|
|
|
'chat_id' => $chatId,
|
|
|
@@ -480,7 +487,7 @@ class QianBaoWithdrawService
|
|
|
Cache::put(get_step_key($chatId), StepStatus::QB_INPUT_BANK_NAME);
|
|
|
return [
|
|
|
'chat_id' => $chatId,
|
|
|
- 'text' => "请输入开户银行卡开户名称",
|
|
|
+ 'text' => lang("请输入开户银行卡开户名称"),
|
|
|
'message_id' => $messageId,
|
|
|
];
|
|
|
case "DF002"://支付宝
|
|
|
@@ -488,7 +495,7 @@ class QianBaoWithdrawService
|
|
|
Cache::put(get_step_key($chatId), StepStatus::QB_INPUT_CARD_NO);
|
|
|
return [
|
|
|
'chat_id' => $chatId,
|
|
|
- 'text' => "请输入支付宝账号",
|
|
|
+ 'text' => lang("请输入支付宝账号"),
|
|
|
'message_id' => $messageId,
|
|
|
];
|
|
|
case "DF005"://数字人民币
|
|
|
@@ -496,14 +503,14 @@ class QianBaoWithdrawService
|
|
|
Cache::put(get_step_key($chatId), StepStatus::QB_INPUT_CARD_NO);
|
|
|
return [
|
|
|
'chat_id' => $chatId,
|
|
|
- 'text' => "请输入数字人民币账号",
|
|
|
+ 'text' => lang("请输入数字人民币账号"),
|
|
|
'message_id' => $messageId,
|
|
|
];
|
|
|
|
|
|
default:
|
|
|
return [
|
|
|
'chat_id' => $chatId,
|
|
|
- 'text' => "选择通道错误",
|
|
|
+ 'text' => lang("选择通道错误"),
|
|
|
'message_id' => $messageId,
|
|
|
];
|
|
|
}
|
|
|
@@ -516,7 +523,7 @@ class QianBaoWithdrawService
|
|
|
Cache::put(get_step_key($chatId), StepStatus::QB_INPUT_CARD_NO);
|
|
|
return [
|
|
|
'chat_id' => $chatId,
|
|
|
- 'text' => "请输入银行卡号",
|
|
|
+ 'text' => lang("请输入银行卡号"),
|
|
|
'message_id' => $messageId,
|
|
|
];
|
|
|
}
|
|
|
@@ -528,7 +535,7 @@ class QianBaoWithdrawService
|
|
|
if ($channel === 'DF001' && !preg_match('/^\d+$/', $cardNo)) {
|
|
|
return [
|
|
|
'chat_id' => $chatId,
|
|
|
- 'text' => "输入的银行卡号有误,请重新输入",
|
|
|
+ 'text' => lang("输入的银行卡号有误,请重新输入"),
|
|
|
'reply_to_message_id' => $messageId,
|
|
|
];
|
|
|
}
|
|
|
@@ -539,7 +546,7 @@ class QianBaoWithdrawService
|
|
|
|
|
|
return [
|
|
|
'chat_id' => $chatId,
|
|
|
- 'text' => "请输入姓名",
|
|
|
+ 'text' =>lang("请输入姓名"),
|
|
|
'message_id' => $messageId,
|
|
|
];
|
|
|
}
|
|
|
@@ -550,11 +557,11 @@ class QianBaoWithdrawService
|
|
|
Cache::put("{$chatId}_QB_ACCOUNT", $account);
|
|
|
Cache::put(get_step_key($chatId), StepStatus::QB_INPUT_ALIAS);
|
|
|
$channel = Cache::get("{$chatId}_QB_WITHDRAW_CHANNEL");
|
|
|
- $text = "请输入别名";
|
|
|
+ $text = lang("请输入别名");
|
|
|
switch ($channel) {
|
|
|
case "DF005":
|
|
|
case "DF001":
|
|
|
- $text = "请输入账号别名";
|
|
|
+ $text = lang('请输入账号别名');
|
|
|
break;
|
|
|
}
|
|
|
return [
|