Skip to content
This repository has been archived by the owner on Feb 20, 2024. It is now read-only.

Commit

Permalink
Add support to retriveSource() method from stripe.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Mauricio Klein committed Oct 20, 2017
1 parent 712b664 commit f246897
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ module.exports = {
baseStyle,
get instance() { return Stripe.instance },
get createToken() { return Stripe.createToken },
get createSource() { return Stripe.createSource }
get createSource() { return Stripe.createSource },
get retrieveSource() { return Stripe.retrieveSource }
}
3 changes: 3 additions & 0 deletions src/stripeElements.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export const Stripe = {
instance: null,
createToken: null,
createSource: null,
retrieveSource: null,
elements: null
}

Expand Down Expand Up @@ -48,6 +49,7 @@ export function create(elementType, key_or_stripe, options = {}) {

Stripe.createToken = (options) => Stripe.instance.createToken(element, options)
Stripe.createSource = (options) => Stripe.instance.createSource(element, options)
Stripe.retrieveSource = (options) => Stripe.instance.retrieveSource(options)

return element
}
Expand All @@ -57,4 +59,5 @@ export function destroy() {
Stripe.elements = null
Stripe.createToken = null
Stripe.createSource = null
Stripe.retrieveSource = null
}

0 comments on commit f246897

Please sign in to comment.