# frozen_string_literal: true require 'qrcode_pix_ruby' def generate_html_with(env) qrcode_data = Rack::Request.new(env).params payload = '' data_uri = '' pix = QrcodePixRuby::Payload.new unless qrcode_data.empty? qrcode_data.keys.each do |key| v = qrcode_data[key] pix.public_send("#{key}=", key == 'repeatable' ? v == 't' : v) unless v.empty? || v.nil? end payload = <<-HTML
For more details check the official repo: https://github.com/pedrofurtado/qrcode_pix_ruby