PRACTICAL SIMULATION

Retry and idempotency: a duplicate after a timeout

Riya taps Pay and the reply never comes back. In this case the first charge went through. You can find that out only by asking, and the wrong moves charge her twice.

Decide what the café app does when a charge request times out, so that Riya pays once and the screen tells her the truth.