Commerce Stripe Card Declined shows white screen with no error I've got an issue when cards are declined and only a white screen is shown to the user without any feedback. The url has not changed at all either.

This is happening on the live Stripe account so I set up a dev site and used the test account and saw the same when using the
4000000000000002 card number, devMode is enabled but no errors were returned.

Here are the relevant bits of my JS code which handle the creating of the card token and showing any errors encountered:

function stripeResponseHandler(status, response) {
    // Grab the form:
    var $form = $('#payment-information');
    if (response.error) { // Problem!
        if ($('#stripeToken').length) {
            $('#stripeToken').remove();
        }
        // Show the errors on the form
        $('#payment-information').find('.payment-errors').show().find("p").text(response.error.message);
        return false;
    } else { // Token was created!
        // Get the token ID:
        var token = response.id;
        // Insert the token into the form so it gets submitted to the server:
        if ($('#stripeToken').length) {
            $('#stripeToken').val(token);
        } else {
            $('#payment-information').append($('&lt;input type="hidden" id="stripeToken" /&gt;').val(token));
        }
        $('#payment-information').find('.payment-errors').hide();
        $("#payment-information").submit();
        return true;
    }
}

Stripe.card.createToken({
    name: $('input[name="firstName"]').val()+" "+$('input[name="lastName"]').val(),
    number: $('#payment-card-number').val(),
    cvc: $('#payment-cvt-code').val(),
    exp_month: $('select[name="month"]').val(),
    exp_year: $('select[name="year"]').val(),
    address_zip: $('#shippingAddress-zipCode').val() 
}, stripeResponseHandler);


Payments are going through fine on the live site and errors such as invalid card numbers are being shown correctly. However, 4000000000000002 is a valid card number and therefore the token is being created successfully without any errors. This is what is happening on the live site when payments are being declined for customers.

When this is then submitted through the commerce/cartPayment/pay form, no errors are shown, just a white page. Has anyone else encountered this and found a way around it? Thanks.
Couldn't get past the white page issue so I made a simple plugin which does the following:

craft()-&gt;on('commerce_transactions.onSaveTransaction', function($event) {
    $transaction = $event-&gt;params["transaction"];
    if ($transaction-&gt;status == "failed") {
        $message = $transaction-&gt;response["error"]["message"];
        craft()-&gt;userSession-&gt;setNotice($message);
        craft()-&gt;request-&gt;redirect('/order');
    }
});


Thank you for your help Luke Holder. Strange that I couldn't get rid of the white page but at least we found a solution in the end to stop the issue on the live site whilst customers are making payments.