fredrickked / QR-Payment-Request

This repository helps you generating a QR code with a payment request.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python Payment Request QR Generator

Buy me a coffee

This project will help you generate a QR code for a payment request making use of http://scan2pay.info

Scan one of the following QR Codes to see the result.

Alt text

Alt text

It will open your banking app and request you to pay.

  1. Create a payment request.
  2. Check if all the information is correct
  3. Generate the QR code.

Code Example:

pr = payment.PaymentRequest()
pr.amount = 0.1
pr.billerName = "Oele Geirnaert"
pr.iban = "BE24651151080738"
pr.remittanceInfo = "Python Payment - Thank you for your contribution"

if pr.is_valid():
    generated_qr_image_with_branding = pr.generate_qr_code(custom_filename = "qr_with_branding", crop = False)
    img = Image.open(generated_qr_image_with_branding)
    img.show()

    generated_qr_image_without_branding = pr.generate_qr_code(custom_filename = "qr_without_branding", crop = True)
    img = Image.open(generated_qr_image_without_branding)
    img.show()

Prerequisites

You need to install the following modules: Pillow & Schwifty:

pip install Pillow
pip install schwifty

Authors

See also the list of contributors who participated in this project.

License

This project is free to use!

About

This repository helps you generating a QR code with a payment request.


Languages

Language:Python 100.0%