ezPay 發票 SDK
yarn add ezpay-invoice-js
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'
});
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'
});
詳情請見官方文件:文件網址
await client.issueInvoice({
})
詳情請見官方文件:文件網址
await client.revokeInvoice(
'invoice number', // 發票號碼
'invoke reason' // 作廢原因
)
詳情請見官方文件:文件網址
await client.issueAllowance({
})
詳情請見官方文件:文件網址
await client.revokeAllowance(
'allowance number', // 折讓號碼
'invoke reason' // 作廢原因
)