quaderno-server
v0.0.6
Published
Helps calculate JSON web tokens (JWTs) for one-off charges in Quaderno.
Downloads
4
Readme
Quaderno Server
Installation
This is a small module designed for node.js servers to help calculate JSON web tokens (JWTs) for one-off charges in Quaderno JS.
Usage
var quadernoServer = require('quaderno-server')(quadernoSecretKey);
Getting a web token
There are two options:
- amount Number, required. Whole number, in cents / pence / eurocents etc.
- currency String, defaults to 'USD'. ISO_4217 currency code. See http://en.wikipedia.org/wiki/ISO_4217
Run it with:
var jsonWebToken = quadernoServer.getJSONWebToken(amount, currency)
This will return JSONWebToken:String, which you can use in createCharge() in
Tests
Run mocha