1.1.2 • Published 6 years ago
quickbooks-accounting v1.1.2
quickbooks-accounting
Simplified NodeJS Quickbooks Accounting Integration
Install via NPM
js npm i quickbooks-accounting
Usage
Create a .env file in the root directory of your project. Add environment-specific variables on new lines in the form of NAME=VALUE. For example:
/**
* set sandbox to test sandbox environment
* set production to test production environment
*/
#environment sample content
QUICKBOOKS_CLIENT_ID= // account client id
QUICKBOOKS_CLIENT_SECRET= // account secret key
QB_ENVIRONMENT=production
QUICKBOOKS_REDIRECT_URI = // callback uriInitial Set up
const Quickbooks = require('quickbooks-accounting');
const qb = new Quickbooks();
let token,
authUri = qb.createConnection({
clientId: process.env.QUICKBOOKS_CLIENT_ID,
clientSecret: process.env.QUICKBOOKS_CLIENT_SECRET,
environment: process.env.QUICKBOOKS_ENVIRONMENT,
redirectUri: process.env.QUICKBOOKS_REDIRECT_URI //serves to be the callback uri
})To connect to Quickbooks
app.get('/app', function(req, res) {
res.redirect(authUri);
});
app.get('/callback', function(req, res) {
token = await qb.getToken(req.url); // getting token
/**
* you can either choose to send token to front end server res.status(200).json(token)
* or redirect somewhere if using template engine res.render('some_route', {token})
* */
})Contribute
We are at the very early stage of this repository. Any help and contribution is welcome.
- Please Feel free to submit pull request.
Authors
- 🐰 Alex
License The MIT License (MIT)
1.1.2
6 years ago
1.1.1
6 years ago
1.1.0
6 years ago
1.0.32
6 years ago
1.0.31
6 years ago
1.0.30
6 years ago
1.0.26
6 years ago
1.0.29
6 years ago
1.0.27
6 years ago
1.0.25
6 years ago
1.0.24
6 years ago
1.0.23
6 years ago
1.0.19
6 years ago
1.0.18
6 years ago
1.0.22
6 years ago
1.0.21
6 years ago
1.0.20
6 years ago
1.0.17
6 years ago
1.0.16
6 years ago
1.0.15
6 years ago
1.0.14
6 years ago
1.0.13
6 years ago
1.0.12
6 years ago
1.0.11
6 years ago
1.0.10
6 years ago
1.0.9
6 years ago
1.0.8
6 years ago
1.0.7
6 years ago
1.0.2
6 years ago
1.0.1
6 years ago
1.0.6
6 years ago
1.0.5
6 years ago
1.0.4
6 years ago
1.0.3
6 years ago
1.0.0
6 years ago