qr-prompt-pay
v1.1.7
Published
thai qr promptpay generate
Downloads
4
Readme
Quickstart
To generate thai QR promptpay
1. Install
npm install qr-prompt-pay
2. Import QRPromptpayModule to AppModule (ES6 module syntax)
import { Module } from "@nestjs/common";
import { QRPromptpayModule } from "qr-prompt-pay";
@Module({
imports: [
QRPromptpayModule.forRoot({
applicationKey: "[Your Key]",
applicationSecret: "[Your secret]",
environment: "[Your environment('dev','uat','prd')]",
}),
],
controllers: [],
providers: [],
})
export class AppModule {}
3. Generate (ES6 module syntax)
import { SCBService } from 'qr-prompt-pay';
.
.
.
constructor(private _SCBService: SCBService) {}
.
.
const auth = await _SCBService.auth();
const qrBase64 = await _SCBService.generate(
{
qrType: 'PP',
ppType: 'BILLERID',
ppId: '987351499109978',
amount: '100',
ref1: '256879854826537',
ref2: '256879854826547',
ref3: 'EII',
numberOfTimes: 1,
expiryDate: '2023/12/15 15:15:000',
},
auth.data.accessToken
);