Ken 1 месяц назад
Родитель
Сommit
a7cb9f794b
1 измененных файлов с 12 добавлено и 2 удалено
  1. 12 2
      app/Services/SanJinRechargeService.php

+ 12 - 2
app/Services/SanJinRechargeService.php

@@ -69,12 +69,20 @@ class SanJinRechargeService
             $min = 0;
             $rate = 0;
 
+            $keyboard = [];
             $rechargeText = '';
             foreach ($product as $k => $v) {
                 if ($v['type'] == $paymentType) {
 
                     if($v['type'] == 'zfbge'){
-                        $rechargeText = "充值金额:".implode(',',$v['fixed'])." \n";
+                        $rechargeText = "充值金额:(".implode(',',$v['fixed']).") \n";
+
+                        foreach($v['fixed'] as $num){
+                            $keyboard[] = [
+                                ['text' => "{$num}", 'callback_data' => "topup@@sj_amount_".$num ]
+                            ];
+                        }
+                        
                     }else{
                         if ($min == 0) {
                             $min = $v['min'];
@@ -98,11 +106,13 @@ class SanJinRechargeService
             // $text .= "充值方式:".$channel[$k];
             if($rechargeText){
                 $text .= $rechargeText;
+                $text .= "🔔 提示:请选择下方充值的金额";
             }else{
                 $text .= "充值金额:{$min} - {$max} \n";
+                $text .= "🔔 提示:请务必核对(充值最大金额和最小金额,账号信息一致),若不一致无法到账。";
+    
             }
 
-            $text .= "🔔 提示:请务必核对(充值最大金额和最小金额,账号信息一致),若不一致无法到账。";
             $res = [
                 'chat_id' => $chatId,
                 'text' => $text,