Skip to content

Kusumoto/PromptPayQrCode

Repository files navigation

PromptPayQrCode

Build Status NuGet version

C# library for generate PromptPay QR Code payload implemented by .NET Standard 2.0


Testing on ASP.Net MVC (.Net Framework 4.6.1)

Testing on ASP.Net MVC (.Net Framework 4.6.1)

Testing on ASP.Net MVC (Mono Framework)

Testing on ASP.Net MVC (Mono Framework)

Testing on ASP.Net MVC Core (.Net Core 2.0)

Testing on ASP.Net MVC Core (.Net Core 2.0)


Install via Nuget Package Manager

PM> Install-Package PromptPayQrCode

Dependencies

  • libgdiplus (.Net Core running in linux/osx)

PromptPay ID Format Support

Phone Number

  • 0801234567
  • 080-123-4567
  • +66-89-123-4567

National Identify ID

  • 1111111111111
  • 1-1111-11111-11-1

Tax ID

  • 0123456789012

e-Wallet ID

  • 012345678901234

How to use

  • Get a PromptPay Payload
var identifyNumber = "0123456789012" // Identify ID or Phone Number;
var amount = 4.22; // not require

var payload = new PromptPayQrCode.PromptPayQrCode(identifyNumber, amount);
var payloadResult = payload.PromptPayPayload; // Return PromptPay Payload for using in other QRCode Library
  • Generate QRCode from build-in library (We're choose ZXing.Net) If you using .Net Standard 2.0, you need to install CoreCompat.System.Drawing package.
var identifyNumber = "0123456789012" // Identify ID or Phone Number;
var amount = 4.22; // not require
var path = "C:/Test/";
var filename = "Test";
var width = 200; // not require default 200
var height = 200; // not require default 200
var margin = 5; // not require default 5

var payload = new PromptPayQrCode.PromptPayQrCode(identifyNumber, amount);
payload.GeneratePromptPayQrCode(path,filename,width,height,margin);

References

About

C# library for generate PromptPay QR Code payload

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages