Thank you very much!!!!!
I put the line at the top of the checkout page and now the ‘modify information’ button works fine.
I also added it to the confirm page because if I was on the failure page and I hit the back button, it gave me the same error. It also fixed that.
Are there any other pages this should be applied to, in case the user hits the back button?