Getting tired of these shitty one-liner 'ask HN' posts that never include sufficient context to be worth analyzing.
How would you respond to the situation in that case?
This is exactly the same.
If it was me, then I would just refuse to do business with them and let them keep the milk and I keep my money; would most likely find another grocery store where I can buy milk for the price given.
I am sure a "popular website" can help you recuperate any costs you had so far if you mark the project as undelivered, so you can look for another contractor.
Without any further details, it's hard to take sides here.
Immediately, I’d just cut them loose and hire a new dev to recreate the work. Screen the new one better and have lots of checkpoints.
By screening, maybe adjust your interview process to cover previous work and culture fit. Check references.
For checkpoints, set up daily check-ins for code with an automated build and test that checks that it at least compiles and does something. And check-in with communication to talk with them as much as you can to include them in design and requirements decisions to share context and get their input.
Dispute resolution on said popular site.