Skip to content

Commit 22e96fa

Browse files
authored
Update back.php
1 parent 8a49b3e commit 22e96fa

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

pay/back.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -391,25 +391,27 @@ function doAction($payRowId, $gateType){
391391
if($serverType == "marzban"){
392392
$uniqid = $token = str_replace("/sub/", "", $response->sub_link);
393393
$subLink = $botState['subLinkState'] == "on"?$panelUrl . $response->sub_link:"";
394-
$vraylink = $response->vray_links;
394+
$vraylink = [$subLink];
395+
$vray_link = json_encode($response->vray_links);
395396
}
396397
else{
397398
$vraylink = getConnectionLink($server_id, $uniqid, $protocol, $remark, $port, $netType, $inbound_id, $rahgozar, $customPath, $customPort, $customSni);
398399
$token = RandomString(30);
399400
$subLink = $botState['subLinkState']=="on"?$botUrl . "settings/subLink.php?token=" . $token:"";
401+
$vray_link = json_encode($vraylink);
400402
}
401403

402-
foreach($vraylink as $vray_link){
404+
foreach($vraylink as $link){
403405
$acc_text = "
404406
😍 سفارش جدید شما
405407
📡 پروتکل: $protocol
406408
🔮 نام سرویس: $remark
407409
🔋حجم سرویس: $volume گیگ
408410
⏰ مدت سرویس: $days روز
409411
".
410-
($botState['configLinkState'] != "off"?
412+
($botState['configLinkState'] != "off" && $serverType != "marzban"?
411413
"
412-
💝 config : <code>$vray_link</code>":"").
414+
💝 config : <code>$link</code>":"").
413415
($botState['subLinkState']=="on"?
414416
"
415417
@@ -425,7 +427,7 @@ function doAction($payRowId, $gateType){
425427
$pixel_Size = 11;
426428
$frame_Size = 0;
427429

428-
QRcode::png($vray_link, $file, $ecc, $pixel_Size, $frame_Size);
430+
QRcode::png($link, $file, $ecc, $pixel_Size, $frame_Size);
429431
addBorderImage($file);
430432

431433
$backgroundImage = imagecreatefromjpeg("../settings/QRCode.jpg");
@@ -440,7 +442,6 @@ function doAction($payRowId, $gateType){
440442
sendPhoto($botUrl . "pay/" . $file, $acc_text,json_encode(['inline_keyboard'=>[[['text'=>"صفحه اصلی 🏘",'callback_data'=>"mainMenu"]]]]),"HTML", $user_id);
441443
unlink($file);
442444
}
443-
$vray_link = json_encode($vraylink);
444445
$date = time();
445446

446447
$stmt = $connection->prepare("INSERT INTO `orders_list`

0 commit comments

Comments
 (0)