Pure UI
Now, it would be interesting to see how <i>function pay()</i> should be written with the new approach and how it evolves when the new states ("network went away error", "must be logged in", "certain role", "pre-existing data") are discovered.