v154 · spc locale

A checkout that survives the refusal

A NotSupportedError from show() arrives with a customer watching. Everything that can be decided before that point should be, and the parts that cannot need somewhere to go — which is a checkout design question rather than an error-handling one.

The order

Example Shop

Two things£24.00

Delivery£0.00

Total£24.00

What can be checked before the dialog

Press the button.

Every step here is a real call — the tag canonicalisation, the locale data lookup, the request construction, and canMakePayment(). The one step that cannot be taken is the last, and the page says which one it is rather than stopping quietly.

Where the checkout goes next

The point of a pre-flight is not to avoid errors — it is to choose a path before the customer is looking at a dialog. A checkout that discovers its problem at show() has already committed to a flow it now has to back out of.

see also