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 (Mono Framework)
Testing on ASP.Net MVC Core (.Net Core 2.0)
PM> Install-Package PromptPayQrCode
- libgdiplus (.Net Core running in linux/osx)
- 0801234567
- 080-123-4567
- +66-89-123-4567
- 1111111111111
- 1-1111-11111-11-1
- 0123456789012
- 012345678901234
- 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);