since you are using a remote checkout out, your checkout form posts to the gateway server:
<form name="checkout_AN_Cmp_Hid" action="https://secure.authorize.net/gateway/transact.dll" method="post">
in this case, you must store the order information when the checkout posts to the confirm page. you cannot store the order information when the confirm page posts.