Turning the argument on its head here - if you were buying something online and as you went to enter your payment details the system crashed.
The retailer would not have been paid so wouldn't provide whatever it was that you were attempting to buy.
What makes this any different in a physical shop? - no payment = no goods.
Just because you wish to pay for your goods in cash does not oblige the retailer to accept it.
I believe that goods in shops fall (in contract law) under the definition of
an invitation to treat, and that following a judgement made in the case of
Pharmaceutical Society of GB v Boots Cash Chemists (Southern) Ltd such an offer is not fulfilled until the retailer has accepted payment. Thus if the retailer refused to accept payment (because its terms were a cashless form of payment and due to a failure of the cashless payment system you were unable to pay) then the contract is frustrated and so nullified.
In practice I suspect (at the present time) that the prospect of adverse publicity might well cause any retailer to opt to (temporarily) accept a cash payment in those circumstances.