Skip to main content

Thai QR Payment Generator with Gaming Features and Anti-Fraud Security

Project description

thai-qr-payment

Generate QR Code image in the format of Thai QR Payment

Installation

available on pip https://pypi.org/project/thaiqrpayment/

pip install thaiqrpayment

Usage

import thaiqrpayment

# Your code from Bank
code = "01" * 100

# Save to image file
thaiqrpayment.save(code, "/tmp/qr.png")

# Save QR with custom text (text overlays ON QR code for security)
thaiqrpayment.save(code, "/tmp/qr_with_text.png", insert_text="Online Gaming Only")

# Save QR specifically for gaming (with "Online Gaming Only" text)
thaiqrpayment.save_gaming_qr(code, "/tmp/gaming_qr.png")

# SECURE ANTI-FRAUD QR CODES (text cannot be easily removed)

# Level 2 Security: Text overlay on QR code area
thaiqrpayment.save_secure_gaming_qr(code, "/tmp/secure_gaming.png")

# Level 3 Security: Text embedded in QR pattern (maximum security)
thaiqrpayment.save_embedded_gaming_qr(code, "/tmp/embedded_gaming.png")

# Custom secure QR with warning text
secure_img = thaiqrpayment.generate_secure_qr(code, "NOT FOR REAL PAYMENT")
secure_img.save("/tmp/warning_qr.png")

# Custom embedded QR (text integrated into QR pattern)
embedded_img = thaiqrpayment.generate_embedded_watermark_qr(code, "DEMO ONLY")
embedded_img.save("/tmp/demo_qr.png")

# base64 format
base64_str = thaiqrpayment.to_base64(code)

# base64 format with security
base64_secure = thaiqrpayment.secure_gaming_qr_to_base64(code)
base64_embedded = thaiqrpayment.embedded_gaming_qr_to_base64(code)

# PIL image
pil_image = thaiqrpayment.generate(code)

# PIL image with custom text overlay
pil_image = thaiqrpayment.generate(code, insert_text="Online Gaming Only")

# PIL image for gaming
pil_image = thaiqrpayment.generate_gaming_qr(code)

Security Features

Anti-Fraud Protection Levels

  1. Level 1 - Standard Text: Text appears below QR code (can be cropped)
  2. Level 2 - Secure Overlay: Text overlays on QR code area (harder to remove)
  3. Level 3 - Embedded Watermark: Text integrated into QR pattern (cannot be removed)

Use Cases

  • Gaming Payments: Use save_embedded_gaming_qr() for maximum security
  • Demo/Test QRs: Use generate_secure_qr() to prevent misuse
  • Invalid QRs: Use embedded warnings that cannot be removed
  • Custom Warnings: Add specific text to prevent unauthorized use

Example Image

Thai QR Payment example

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

thaiqr_gaming-0.3.0.tar.gz (43.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

thaiqr_gaming-0.3.0-py3-none-any.whl (41.5 kB view details)

Uploaded Python 3

File details

Details for the file thaiqr_gaming-0.3.0.tar.gz.

File metadata

  • Download URL: thaiqr_gaming-0.3.0.tar.gz
  • Upload date:
  • Size: 43.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.4

File hashes

Hashes for thaiqr_gaming-0.3.0.tar.gz
Algorithm Hash digest
SHA256 319065f76ea4fecc21c083b9e8f098b6358775ed46a87cb7a22f11234744503e
MD5 a56c272496ed56c0b8b82ab000e62a79
BLAKE2b-256 9f490da4cffb4071a7afdc69cffb54340451ff4c6c2177ebd894a5a0a408604a

See more details on using hashes here.

File details

Details for the file thaiqr_gaming-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: thaiqr_gaming-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 41.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.4

File hashes

Hashes for thaiqr_gaming-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f396f89ffcc4663d9f5d735acf9e4532f0916e454dec2a2e23cfd8039227fbc6
MD5 123429b69be2d495e5f040f0bc083a79
BLAKE2b-256 023946405a858f6172a24bc985cbff2a4901a4577ef5743a9c6799f25128e38d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page