I am creating a checkout payment page. I am concerned about the user pressing the submit button twice while waiting and getting charged twice.
I have a two page system. First page is the form page and the second page creates session variables and populates the form variables from the first page with any error messages. If no errors are found then it proceeds to the payment gateway at the bottom of the second page.
If i create a session variable at the bottom of the second page (after the payment has been processed):
and then i place this at the top of the second page:
Will this prevent double orders?
I have a two page system. First page is the form page and the second page creates session variables and populates the form variables from the first page with any error messages. If no errors are found then it proceeds to the payment gateway at the bottom of the second page.
If i create a session variable at the bottom of the second page (after the payment has been processed):
Code:
<cfparam name="session.checkout_nfo.completed" default="processed">
and then i place this at the top of the second page:
Code:
<cfif isdefined ("session.checkout_nfo.completed") AND session.checkout_nfo.completed EQ "processed">
<cflocation url="[URL unfurl="true"]http://www.#widgetURL#/">[/URL]
<cfabort>
</cfif>
Will this prevent double orders?