GithubHelp home page GithubHelp logo

pinkdiamond1 / php-promptpay-qr Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kittinan/php-promptpay-qr

0.0 1.0 0.0 23 KB

PHP Library to generate QR Code payload for PromptPay

License: MIT License

PHP 100.00%

php-promptpay-qr's Introduction

php-promptpay-qr

Build Status Code Coverage Scrutinizer Code Quality License: MIT

PHP Library to generate QR Code payload for PromptPay inspired from dtinth/promptpay-qr

Requirement

Composer

This package available on Packagist, Install the latest version with composer

composer require kittinan/php-promptpay-qr

Usage

$pp = new \KS\PromptPay();

//Generate PromptPay Payload
$target = '0899999999';
echo $pp->generatePayload($target); 
//00020101021129370016A000000677010111011300668999999995802TH53037646304FE29

//Generate PromptPay Payload With Amount
$target = '089-999-9999';
$amount = 420;
echo $pp->generatePayload($target, $amount);
//00020101021229370016A000000677010111011300668999999995802TH53037645406420.006304CF9E

//Generate QR Code PNG file
$target = '1-2345-67890-12-3';
$savePath = '/tmp/qrcode.png';
$pp->generateQrCode($savePath, $target);

//Generate QR Code With Amount
$amount = 420;
$pp->generateQrCode($savePath, $target, $amount);

//Set QR Code Size Pixel
$width = 1000;
$pp->generateQrCode($savePath, $target, $amount, $width);

Sample Generated PromptPay QR Code

Contributing

Feel free to contribute on this project, I will be happy to work with you.

License

The MIT License (MIT)

php-promptpay-qr's People

Contributors

hackhq avatar k1337 avatar kittinan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.