summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README3
-rw-r--r--epirts.js4
2 files changed, 5 insertions, 2 deletions
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);
}