My app has a subscription payment that is necessary to be paid before getting entry to the app. I am wondering how I prevent a user signing up then pressing the back button and having access to the whole app without paying.
I currently have a field on the User storing the ID of the payment transaction then on all pages I check to see if 1) the user is logged in and 2) has a payment ID. If not, they are logged out and sent to the index page.
However, this is also logging out users who have successfully paid as well due to the user having to be signed up first to purchase a subscription.
I would agree that there needs to be a check on the pages to ensure the field is not empty. But, the only place coming to mind that this error would occur is on the login or purchase page if you have one. I would modify the checks there if you have them on every page except the index page.
Thanks that seems to solve the issue. Is there a way to assign an error message to these users to ensure they know that they haven’t paid and need to before getting access?