Instructional pop-up after credit card authorization fail notice on order form

When a customer puts an incorrect billing address in an e-commerce order form, the form gives an authorization error message and allows the client to update the credit card number but not their billing information. After that, any time they click from the landing page to the order form it pulls up the locked form instead of a fresh one. The help center suggested I code a pop up that guides the customer to clear their cash and cookies and try again. Does anyone have code already created for this, or could point me in the right direction?

I wrote this simple script that will load an error message if the page gets locked down. Just put it in the footer HTML area of the form.

<script>if(window.location.href.indexOf("showLockDownOrderForm") > -1) {
document.getElementById("orderFormBillingEntry").innerHTML+= "<div style=\"background-color:yellow\"><h1>There was a problem with your billing information. Please clear your browser's cache and cookies and try again. <a href='' target='_blank' style=\"color:#FF0000;\">Click here to open a new tab and learn how</a></div>"}</script>