1.0.12 • Published 2 years ago

ezpay-invoice-js v1.0.12

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

ezPay Invoice SDK js CI codecov

ezPay 發票 SDK

Installation

yarn add ezpay-invoice-js

Usage

Create SDK Instance (ES5)

const EzpayInvoiceClient = require("ezpay-invoice-js");
const client = new EzpayInvoiceClient({
  merchantId: "ezPay Invoice Merchant ID",
  hashKey: "ezPay Invoice Hash Key",
  hashIV: "ezPay Invoice Hash IV",
  env: "production", // 'sandbox' | 'production'
});

Create SDK Instance (ES6)

import EzpayInvoiceClient from "ezpay-invoice-js";
const client = new EzpayInvoiceClient({
  merchantId: "ezPay Invoice Merchant ID",
  hashKey: "ezPay Invoice Hash Key",
  hashIV: "ezPay Invoice Hash IV",
  env: "production", // 'sandbox' | 'production'
});

開立發票 Issue invoice

詳情請見官方文件:文件網址

await client.issueInvoice({
  
})

作廢發票 Revoke invoice

詳情請見官方文件:文件網址

await client.revokeInvoice(
  'invoice number',   // 發票號碼 
  'invoke reason'     // 作廢原因
)

開立折讓 Issue allowance

詳情請見官方文件:文件網址

await client.issueAllowance({
  
})

作廢折讓 Revoke allowance

詳情請見官方文件:文件網址

await client.revokeAllowance(
  'allowance number',   // 折讓號碼
  'invoke reason'     // 作廢原因
)
1.0.12

2 years ago

1.0.11

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.10

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago