the foreground user chooses the time to top up, calculates the total amount after receiving it at the background, and then generates a QR code through phpqrcode to display it at the front end. But this time is too long, and it takes about three or four seconds to display each time. Obviously, this will not work.
at first I output the image directly to the page, but it takes a long time to wait, and then I want to use it to convert the image to base64, but it doesn"t work either. I use ajax to send the data to the background, generate the base64, of the QR code, and then send it back to the front end.
how can I shorten this interval?
time interval for generating QR codes:
ajax:
above is the background method of the execution, and below is the base64 bit encoding of the returned image