1.1.2 • Published 4 years ago

quickbooks-accounting v1.1.2

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

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 uri

Initial 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

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.32

4 years ago

1.0.31

4 years ago

1.0.30

4 years ago

1.0.26

4 years ago

1.0.29

4 years ago

1.0.27

4 years ago

1.0.25

4 years ago

1.0.24

4 years ago

1.0.23

4 years ago

1.0.19

4 years ago

1.0.18

4 years ago

1.0.22

4 years ago

1.0.21

4 years ago

1.0.20

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.0

4 years ago