This is a small module designed for node.js servers to help calculate JSON web tokens (JWTs) for one-off charges in Quaderno JS.
var quadernoServer = require('quaderno-server')(quadernoSecretKey);
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
- description String, optional. The statement you want to show on your receipt. https://quaderno.io/docs/guides/charge-form/
- date Date, optional (default current time)
Run it with:
var jsonWebToken = quadernoServer.getJSONWebToken(amount, currency, description, date)
This will return JSONWebToken:String, which you can use in createCharge() in
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
- unit String, required. Defaults to M. Specify the units of the subscription frequency (D, W, M, Y)
- duration Number, required. Defaults to 1. Specify the subscription frequency, eg: 1, 2, 3, 6, 12, 18, 24 etc
- description String, optional. The statement you want to show on your receipt. https://quaderno.io/docs/guides/charge-form/
- date Date, optional (default current time)
Run it with:
var jsonWebToken = quadernoServer.getJSONPayPalSubWebToken(amount, currency, unit, duration, description, date)
This will return JSONWebToken:String, which you can use in createSubscription() in
Run mocha