From e11cb0820f20d0c847961b47282fc98110b5fd86 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Mon, 16 Mar 2015 15:08:16 -0400 Subject: Epirts.card.createToken(): Fix callback signatures --- diff --git a/README b/README index fb18cf9..ea118ee 100644 --- a/README +++ b/README @@ -30,6 +30,9 @@ Methods cvc: '123' }, stripeResponseHandler); + The callback function will be given two arguments, a `status` code and a + `response` object. + * `Epirts.card.validateCardNumber(number)` Checks that the card number appears valid and passes the Luhn check. diff --git a/epirts.js b/epirts.js index 4c5216e..0e5b22a 100644 --- a/epirts.js +++ b/epirts.js @@ -78,8 +78,8 @@ var Stripe = Epirts = (function() { script.async = true; func = 'sjsonp' + ++_cb_time; - window[func] = function(result) { - callback(result); + window[func] = function(response, status) { + callback(status, response); script.parentNode.removeChild(script); } -- cgit v0.9.1