Custom payment method after payment user is logged out on thank you page

You can use cookies, if payment is successful generate unique key and set it in user browser (as cookie) and store same key in db. Then on thank you page you can show results based on that key.

This tutorial might help you if you didn’t use cookies before.