stripe-errback
Wrap Stripe.js async methods to use node-style callbacks
Install
$ npm install --save stripe-errback
Usage
var stripeErrback = var stripe = stripecard
API
stripeErrback(Stripe)
-> object
Wraps window.Stripe
to call a Node-style callback (function (err, data)
) with results instead of using Stripe's function (status, response)
functions.
Stripe
Required
Type: function
The Stripe.js browser library (window.Stripe
).
The returned object wraps the following methods in addition to exposing utility methods:
card.createToken
bankAccount.createToken
piiData.createToken
bitcoinReceiver.createReceiver
bitcoinReceiver.pollReceiver
bitcoinReceiver.getReceiver
(undocumented)
This configuration is exposed as stripeErrback.methods
with {async, sync}
containing arrays of dot property paths.
License
MIT © Ben Drucker