@fortune-inc/tw-voucher

1.0.11 • Public • Published

Truewallet Voucher

เติมเงิน Truewallet ด้วยซองอั่งเปา

ทำไมต้อง tw-voucher

  • ✔️ ฟีเจอร์ครบรองรับทั้งโค๊ดอังเปาและ URL
  • 🔒 มีระบบป้องกันการ inject ในตัว
  • 📦 zero dependencies

Installation

npm i @fortune-inc/tw-voucher

Examples

ตัวอย่างการเติมด้วยโค๊ด

const twvoucher = require('@fortune-inc/tw-voucher');

twvoucher('เบอร์โทรศัพท์', 'xxxxhFog10Ijbmg1c').then(redeemed => {
    console.log(`redeem ซอง ${redeemed.code} ของ ${redeemed.owner_full_name} จำนวน ${redeemed.amount} บาทแล้ว`) 
}).catch(err => {
    console.error('invaild voucher code')
})

ตัวอย่างการเติมด้วย URL

const twvoucher = require('@fortune-inc/tw-voucher');

twvoucher('เบอร์โทรศัพท์', 'https://gift.truemoney.com/campaign/?v=xxxxfhFog10Ijbmg1c').then(redeemed => {
    console.log(`redeem ซอง ${redeemed.code} ของ ${redeemed.owner_full_name} จำนวน ${redeemed.amount} บาทแล้ว`) 
}).catch(err => {
    console.error('invaild voucher code')
})

Readme

Keywords

none

Package Sidebar

Install

npm i @fortune-inc/tw-voucher

Weekly Downloads

24

Version

1.0.11

License

ISC

Unpacked Size

38.4 kB

Total Files

4

Last publish

Collaborators

  • chanios