Nothing displayed on page when CheckoutError raised during checkout

31 views
Skip to first unread message

Wesley

unread,
Apr 1, 2015, 4:52:56 AM4/1/15
to mezzani...@googlegroups.com
Hi guys,
    I hit a situation today when I have a try to customize shop_handler_payment.

My customized payment handler do nothing but just raise cartridge.shop.checkout.CheckoutError exception.

But, one confirmation page, when I click next button, nothing displayed on page indicating that this is error during checkout process, page just refresh and stay in confirmation page again.

Is this just as designed? Or any special configurations for this behavior?

Thanks.
Wesley

Mathias Ettinger

unread,
Apr 2, 2015, 3:29:26 AM4/2/15
to mezzani...@googlegroups.com
Just to be sure and not miss something obvious: does your settings.SHOP_HANDLER_PAYMENT points to your custom function?

Wesley

unread,
Apr 2, 2015, 9:03:41 PM4/2/15
to mezzani...@googlegroups.com
Hi Mathias,
    Sure, I set this guy to my own handler which does nothing but raises CheckoutError directly.
And I find that If I raise Exception('whatever'), exception raised when click next on page.
I see in checkout_steps, it catches CheckoutError and I haven't changed the code.

Strange...

Thanks.
Wesley

Mathias Ettinger

unread,
Apr 3, 2015, 3:51:38 AM4/3/15
to mezzani...@googlegroups.com
Ok, and do you raise CheckoutError or CheckoutError('whatever') ?

Because the intended behaviour is to change the exception (which would cause 500 error page) into a form error which just invalidate it and force it to redisplay with the error message. If no error message is defined, then you might not see anything.

Mathias

unread,
Apr 3, 2015, 8:58:57 AM4/3/15
to mezzani...@googlegroups.com
Ok, and do you raise CheckoutError or CheckoutError('whatever') ?

Because the intended behaviour is to change the exception (which would cause 500 error page) into a form error which just invalidate it and force it to redisplay with the error message. If no error message is defined, then you might not see anything.



--
You received this message because you are subscribed to a topic in the Google Groups "Mezzanine Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mezzanine-users/k6UTxTjA_vo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mezzanine-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages