Download the PHP package farzai/promptpay without Composer

On this page you can find all versions of the php package farzai/promptpay. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package promptpay

PromptPay QR Code Generator - PHP

Latest Version on Packagist Tests codecov Total Downloads

A modern, type-safe PHP library for generating PromptPay QR codes.

Features

Requirements

Installation

For PHP Applications

For CLI Usage (Global)

Make sure Composer's global bin directory is in your $PATH:

Quick Start

Simple Example

Modern Builder API (Recommended)

Usage Guide

Creating QR Codes

Static QR Code (No Amount)

Dynamic QR Code (With Amount)

Recipient Types

The library automatically detects recipient type based on length:

Output Formats

1. Data URI (for <img> tags)

2. Save to File

3. PSR-7 HTTP Response

First, install any PSR-17/PSR-7 implementation:

Then create the response:

With Guzzle PSR-7:

Why PSR-17? No hard dependencies! Works with ANY PSR-7 library - choose the one your project already uses.

4. Console Output (CLI)

5. Raw Payload String

Advanced Configuration

Immutable Builder Pattern

The builder is fully immutable - each method returns a new instance:

Validation & Error Handling

The library provides comprehensive validation with helpful error messages:

Recipient Validation

Amount Validation

Error Codes Reference

Recipient Errors (1xxx)

Amount Errors (2xxx)

Configuration Errors (3xxx)

CLI Usage

Testing

Examples

Check the examples/ directory for real-world usage scenarios:

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for details.

Security

If you discover any security vulnerabilities, please review our security policy on how to report them.

Changelog

Please see CHANGELOG.md for recent changes.

License

The MIT License (MIT). Please see LICENSE.md for more information.

Credits

Acknowledgments


Made with ❤️ for the Thai developer community


All versions of promptpay with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
endroid/qr-code Version ^5.0.0 <5.1
symfony/console Version ^6.0|^7.0|^8.0
psr/http-factory Version ^1.0
psr/http-message Version ^1.0|^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package farzai/promptpay contains the following files

Loading the files please wait ...