Why can't an order be marked paid when the buyer reaches the Thank you page?
The buyer may close the tab before the redirect or open that page manually, so the redirect itself proves nothing. A reliable sign of payment is a notification from the payment provider to the server with a verified signature. Only after it does the order get the paid status.
More in the guide to online payment integration.