#20 stopped a gift card leaving a balance under the gateway's minimum: money.giftCardSpend either pays the whole total or holds back so at least gateway.minimumCents(currency) is left. That closes the card-shaped version of the hole, but not the hole.
Nothing stops an order whose total is under the minimum. A cart at $0.30 with no gift card in sight would be placed, would reach /pay, and Stripe would refuse the session — the shopper is left with an order they cannot pay and no way forward. The cart and checkout pages already say "it cannot be paid yet" when a card is held out of such a total, but the sentence describes a state the code permits rather than prevents.
It is unreachable in this catalog today: the cheapest total is $15.77 and postage alone is $6.00. It becomes reachable the moment a steep discount code, a free-shipping threshold, or a cheap item ships.
What would close it:
POST /checkout refuses a total that is neither zero nor at least gateway.minimumCents, in the words a form error gets, tied to the cart — not a 500 from the gateway later.
The cart and checkout pages say it before the shopper types an address, the way they already say what a card held back.
A total of exactly zero is a different thing and must keep working: a gift card that covers everything leaves nothing to charge, and that order is already settled without a gateway.
A test that would fail without it: a cart priced under the minimum is refused at /checkout and writes no order row, no stock taken, no code redeemed.
#20 stopped a gift card leaving a balance under the gateway's minimum:
money.giftCardSpendeither pays the whole total or holds back so at leastgateway.minimumCents(currency)is left. That closes the card-shaped version of the hole, but not the hole.Nothing stops an order whose total is under the minimum. A cart at $0.30 with no gift card in sight would be placed, would reach
/pay, and Stripe would refuse the session — the shopper is left with an order they cannot pay and no way forward. The cart and checkout pages already say "it cannot be paid yet" when a card is held out of such a total, but the sentence describes a state the code permits rather than prevents.It is unreachable in this catalog today: the cheapest total is $15.77 and postage alone is $6.00. It becomes reachable the moment a steep discount code, a free-shipping threshold, or a cheap item ships.
What would close it:
POST /checkoutrefuses a total that is neither zero nor at leastgateway.minimumCents, in the words a form error gets, tied to the cart — not a 500 from the gateway later./checkoutand writes no order row, no stock taken, no code redeemed.Raised by @sentinel reviewing #59.