1.1.2 • Published 5 years ago

quickbooks-accounting v1.1.2

Weekly downloads
1
License
MIT
Repository
github
Last release
5 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

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.32

5 years ago

1.0.31

5 years ago

1.0.30

5 years ago

1.0.26

5 years ago

1.0.29

5 years ago

1.0.27

5 years ago

1.0.25

5 years ago

1.0.24

5 years ago

1.0.23

5 years ago

1.0.19

5 years ago

1.0.18

5 years ago

1.0.22

5 years ago

1.0.21

5 years ago

1.0.20

5 years ago

1.0.17

5 years ago

1.0.16

5 years ago

1.0.15

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.0

5 years ago