qr-prompt-pay
TypeScript icon, indicating that this package has built-in type declarations

1.1.7 • Public • Published

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
);

Readme

Keywords

none

Package Sidebar

Install

npm i qr-prompt-pay

Weekly Downloads

1

Version

1.1.7

License

ISC

Unpacked Size

16.9 kB

Total Files

23

Last publish

Collaborators

  • theerasak