McDonald's was just an example, the point is most apps don't need to do that at all.
I do happen to know how payment systems like that work, and thankfully those are all cloud-based, the only thing the app does is start transactions and check with the server if they're paid. If they implemented it well, as I suspect a big corpo like McDonald's probably would, their own order screen also checks server-side if orders are paid. Not much you can do from the app side to mess with that.
Yeah that doesn't sound incredibly cheap, and also you have to factor in all the employees time used in your pizza