@@ -288,6 +288,8 @@ function doAction($payRowId, $gateType){
288288 $ portType = $ stmt ->get_result ()->fetch_assoc ()['port_type ' ];
289289 $ stmt ->close ();
290290 include '../phpqrcode/qrlib.php ' ;
291+ define ('IMAGE_WIDTH ' ,540 );
292+ define ('IMAGE_HEIGHT ' ,540 );
291293
292294 for ($ i =1 ; $ i <= $ accountCount ; $ i ++){
293295 $ uniqid = generateRandomString (42 ,$ protocol );
@@ -307,7 +309,11 @@ function doAction($payRowId, $gateType){
307309 if ($ botState ['remark ' ] == "digits " ){
308310 $ rnd = rand (10000 ,99999 );
309311 $ remark = "{$ srv_remark }- {$ rnd }" ;
310- }else {
312+ }
313+ elseif ($ botState ['remark ' ] == "manual " ){
314+ $ remark = $ description ;
315+ }
316+ else {
311317 $ rnd = rand (1111 ,99999 );
312318 $ remark = "{$ srv_remark }- {$ user_id }- {$ rnd }" ;
313319 }
@@ -388,11 +394,21 @@ function doAction($payRowId, $gateType){
388394
389395 $ file = RandomString () .".png " ;
390396 $ ecc = 'L ' ;
391- $ pixel_Size = 10 ;
392- $ frame_Size = 10 ;
397+ $ pixel_Size = 11 ;
398+ $ frame_Size = 0 ;
393399
394400 QRcode::png ($ vray_link , $ file , $ ecc , $ pixel_Size , $ frame_Size );
395401 addBorderImage ($ file );
402+
403+ $ backgroundImage = imagecreatefromjpeg ("../settings/QRCode.jpg " );
404+ $ qrImage = imagecreatefrompng ($ file );
405+
406+ $ qrSize = array ('width ' => imagesx ($ qrImage ), 'height ' => imagesy ($ qrImage ));
407+ imagecopy ($ backgroundImage , $ qrImage , 300 , 300 , 0 , 0 , $ qrSize ['width ' ], $ qrSize ['height ' ]);
408+ imagepng ($ backgroundImage , $ file );
409+ imagedestroy ($ backgroundImage );
410+ imagedestroy ($ qrImage );
411+
396412 sendPhoto ($ botUrl . "pay/ " . $ file , $ acc_text ,json_encode (['inline_keyboard ' =>[[['text ' =>"صفحه اصلی 🏘 " ,'callback_data ' =>"mainMenu " ]]]]),"HTML " , $ user_id );
397413 unlink ($ file );
398414 }
0 commit comments