diff --git a/stripe-angular.js b/stripe-angular.js index 3ae33e5..1018d46 100644 --- a/stripe-angular.js +++ b/stripe-angular.js @@ -5,6 +5,9 @@ function($window) { directive.link = function(scope, element, attributes) { var form = angular.element(element); form.bind('submit', function() { + if (attributes.stripeInit) { + scope[attributes.stripeInit].apply(); + } var button = form.find('button'); button.prop('disabled', true); $window.Stripe.createToken(form[0], function() {