diff --git a/js/civicrm_stripe.js b/js/civicrm_stripe.js index 832672915127e428c8ebe69261e204fd140313c7..01ad1d618474626b69465e88d2eb5441575c000d 100644 --- a/js/civicrm_stripe.js +++ b/js/civicrm_stripe.js @@ -275,7 +275,8 @@ .fail(function(object) { // Triggered when http code !== 200 (eg. 400 Bad request) var error = 'Unknown error'; - if (object.hasOwnProperty('statusText')) { + if (object.hasOwnProperty('statusText') && (object.statusText !== 'OK')) { + // A PHP exit can return 200 "OK" but we don't want to display "OK" as the error! error = object.statusText; } displayError(error, true);