All Projects → ShenTengTu → node-tw-e-invoice

ShenTengTu / node-tw-e-invoice

Licence: MIT license
An unofficial Node.js interface of Taiwan MOF E-Invoice API . 台灣財政部電子發票 API 的 非官方 Node.js 介面。

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to node-tw-e-invoice

server-sent-events-demo
Server Sent Events Demo for San Diego JS Meetup using Node, HTML, JavaScript, CSS.
Stars: ✭ 39 (+77.27%)
Mutual labels:  node-js
musicritic
Your personal music-specific Metacritic.
Stars: ✭ 45 (+104.55%)
Mutual labels:  node-js
phaChat
a web chat by node.js 一个基于 node.js 的多人 web 聊天室
Stars: ✭ 18 (-18.18%)
Mutual labels:  node-js
PruneBot
PruneBot is an easy to use multi-purpose bot and it has a free open source code to setup your own prune bot to your own server.
Stars: ✭ 13 (-40.91%)
Mutual labels:  node-js
eaf-linter
🤪 A linter, prettier, and test suite that does everything as-simple-as-possible.
Stars: ✭ 17 (-22.73%)
Mutual labels:  node-js
captcha.js
Captcha in Node.js
Stars: ✭ 23 (+4.55%)
Mutual labels:  node-js
Reactirator
A desktop application to create and manage React.js applications easily.
Stars: ✭ 111 (+404.55%)
Mutual labels:  node-js
zulipbot
GitHub workflow-optimizing bot by @zulip
Stars: ✭ 70 (+218.18%)
Mutual labels:  node-js
syncify
🤝 Shopify theme upload, download and watch development tool.
Stars: ✭ 50 (+127.27%)
Mutual labels:  node-js
Chapter-2
Code examples for Chapter 2 of Data Wrangling with JavaScript
Stars: ✭ 16 (-27.27%)
Mutual labels:  node-js
nodekit
[Moved to Codeberg] A Small Web server.
Stars: ✭ 68 (+209.09%)
Mutual labels:  node-js
karaoke-forever
Open karaoke party system
Stars: ✭ 180 (+718.18%)
Mutual labels:  node-js
windows-network-drive
Do network drive stuff on Microsoft Window in node
Stars: ✭ 18 (-18.18%)
Mutual labels:  node-js
node-github-publish
Publishes a file to a repository through the GitHub Contents API
Stars: ✭ 20 (-9.09%)
Mutual labels:  node-js
Node-js-functionalities
This repository contains very useful restful API's and functionalities in node-js containing many important tutorial code for mastering node-js, all tutorials have been published on medium.com, tutorials link is given below
Stars: ✭ 69 (+213.64%)
Mutual labels:  node-js
titaniumifier
Get a Titanium™ SDK CommonJS module out of a Node package!
Stars: ✭ 95 (+331.82%)
Mutual labels:  node-js
motor-hat
Node Module to control Adafruits MotorHAT for the RaspberryPi
Stars: ✭ 28 (+27.27%)
Mutual labels:  node-js
Discord-EmojiToRole
A discord.js bot that assigns roles based on reactions to a message.
Stars: ✭ 55 (+150%)
Mutual labels:  node-js
gcc-output-parser
gcc error parsing library
Stars: ✭ 17 (-22.73%)
Mutual labels:  node-js
Generate-Live-Transcription
This extension helps to get a real-time transcription of audio playing in the browser using Deep Speech.
Stars: ✭ 16 (-27.27%)
Mutual labels:  node-js

This project is no longer being actively developed. If you are interested in this project, welcome to fork.

npm version

node-tw-e-invoice

An unofficial Node.js interface of Taiwan MOF E-Invoice API . 台灣財政部電子發票 API 的 非官方 Node.js 介面。

npm i node-tw-e-invoice --save

Feature

  • Request by action
  • Request parameters schema validation
  • Provide serial number generator
  • Auto convert to Unix timestap
  • Auto generate signature

Not implement :

  • Real HTTP Request

    Retrun Promise contain path,method & param values .

  • Request Individual statistics information

Example

require('dotenv').config();
const {TaiwanEInvoice, InquirerIdentity, CarrierCardType}= require('node-tw-e-invoice');
const {Serial}= require('node-tw-e-invoice').APIUtil;

//Create TaiwanEInvoice instance
const EInvoice = new TaiwanEInvoice(process.env.APP_ID,process.env.API_KEY);

// Create serial number generator
const serial = new Serial();


EInvoice.inquirer(process.env.UUID,InquirerIdentity.Common)//Declare identity
.action('qryCarrierAgg',{//Request by action
  serial:serial.next(),
  cardType: CarrierCardType.Mobile,
  cardNo:'/AB56P5Q',
  timeStamp:new Date(),
  cardEncrypt:'password'
}).then((values)=>{//Return Promise
  let {path,method,param}  = values;
  param.timeStamp += 10;
  console.log(param)
  //start sending a request ...
}).catch((err)=>{
  let {name, details} = err;//Get error if schema validate fail
  console.log(name);
  console.log(details[0].message);
});

Documentation

Official specifications

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].