Skip to content

Commit

Permalink
More Stripe fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cheesegrits committed Jan 13, 2017
1 parent 1704b97 commit 2c3d9d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugins/fabrik_form/stripe/stripe-min.js

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

5 changes: 3 additions & 2 deletions plugins/fabrik_form/stripe/stripe.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ define(['jquery', 'fab/fabrik'], function (jQuery, Fabrik) {
var self = this;
this.options = jQuery.extend(this.options, options);
Fabrik.FabrikStripeForm = null;
Fabrik.FabrikStripeFormSubmitting = false;

if (this.options.useCheckout) {
this.handler = StripeCheckout.configure({
Expand All @@ -54,12 +55,12 @@ define(['jquery', 'fab/fabrik'], function (jQuery, Fabrik) {
Fabrik.FabrikStripeForm.mockSubmit();
},
closed : function () {
Fabrik.FabrikStripeForm = null;
Fabrik.FabrikStripeFormSubmitting = true;
}
});

Fabrik.addEvent('fabrik.form.submit.start', function (form, event, btn) {
if (typeof Fabrik.FabrikStripeForm === 'undefined' || Fabrik.FabrikStripeForm === null) {
if (typeof Fabrik.FabrikStripeForm === 'undefined' || Fabrik.FabrikStripeFormSubmitting !== true) {
Fabrik.FabrikStripeForm = form;
this.handler.open({
name : this.options.name,
Expand Down

0 comments on commit 2c3d9d6

Please sign in to comment.