There is a requirement to accept cash as payment for debt. This does not apply to the typical retail case, where the seller can simply not proceed with the transaction.
Physical transfer doesn't really matter. Either you've incurred a debt (in which case they're legally required to take cash) or you haven't (in which case you're free to walk out of the store, leaving the ice cream to melt).
The store would need to require that you pay before the scooping began to avoid this, IMO.