Last active
August 20, 2017 18:04
Star
You must be signed in to star a gist
Stripe.js patch for Lotusbreath OSC 4.1.1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/skin/frontend/base/default/lotusbreath/onestepcheckout/js/osc.js b/skin/frontend/base/default/lotusbreath/onestepcheckout/js/osc.js | |
index 303bff9..ecc940a 100644 | |
--- a/skin/frontend/base/default/lotusbreath/onestepcheckout/js/osc.js | |
+++ b/skin/frontend/base/default/lotusbreath/onestepcheckout/js/osc.js | |
@@ -276,6 +276,23 @@ | |
); | |
}, | |
+ cryozonicPlaceOrder: function() | |
+ { | |
+ if (payment.currentMethod != 'cryozonic_stripe') | |
+ return this.placeOrder(); | |
+ | |
+ var me = this; | |
+ createStripeToken(function(err) | |
+ { | |
+ if (err) | |
+ alert(err); | |
+ else | |
+ me.placeOrder(); | |
+ }); | |
+ }, | |
+ | |
placeOrder: function () { | |
window.oscObserver.beforeSubmitOrder(); | |
@@ -441,13 +458,13 @@ | |
_this._openConfirmExistEmail(); | |
checkEmailOk = false; | |
} else { | |
- _this.placeOrder(); | |
+ _this.cryozonicPlaceOrder(); | |
checkEmailOk = true; | |
} | |
} | |
}); | |
} else { | |
- _this.placeOrder(); | |
+ _this.cryozonicPlaceOrder(); | |
} | |
if (checkEmailOk == false) | |
return; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment