4

I've setup authorize.net direct post in our Magento website. At then end of checkout when I hit "place order" nothing happens and the text "Submitting order information..." just sits there. I haven't been able to find any solution to this (while the problem seems common).

I tried magento's default theme, blank theme, I tried disabling (in the xml config) all non-magento modules. There are no console errors. I have no clue how to debug this.

Anybody out there seen this problem?

migrated from stackoverflow.com Oct 21 '13 at 19:52

This question came from our site for professional and enthusiast programmers.

  • What are you logs showing? – jzahedieh Oct 3 '13 at 16:23
  • system.log and exception.log show no errors – Joao Oct 3 '13 at 16:35
  • Enable the Authorize.net debug mode: System->Configuration->Payment Methods->Authorize.net and set Debug to Yes. This will write a payment_authorizenet.log file to /var/log in your Magento installation. You should also check your browser console for any errors generated. – Peter Michael Oct 5 '13 at 3:55
  • Having the same issue. Working though it now and I'll share the answer if I get one. So far it seems we are having issues with the communication between our server and authorize.net's servers. – Ben Truby Oct 8 '13 at 16:34
  • I'm having the exact same issue on 1.7.0.2, direct post has been working fine, then just stopped. nothing in the logs, just hangs on "Submitting order information..." Anyone have any ideas. No changes that I am aware of, it stopped sometime after Dec 11. – user4526 Dec 31 '13 at 21:16
3

I just ran into the same issue with Magento 1.8.0.0

There has been a change in the file

/app/design/frontend/base/default/template/checkout/onepage/review/info.phtml

(lines 79 - 83):

<script type="text/javascript">
//<![CDATA[
    review = new Review('<?php echo $this->getUrl('checkout/onepage/saveOrder', array('form_key' => Mage::getSingleton('core/session')->getFormKey())) ?>', '<?php echo $this->getUrl('checkout/onepage/success') ?>', $('checkout-agreements'));
//]]>
</script>

This is where the form_key hidden field/parameter gets added to the form. In my case I had this file customized and didn't update my copy in

/app/design/frontend/MYTEMPLATEPATH/default/template/checkout/onepage/review/info.phtml

(your 'MYTEMPLATEPATH' may vary)

Once I replaced those lines with the new code from Magento 1.8 everything worked like a charm.

  • 2
    Great. actually thats the issue. when upgrading to Magento 1.8 there is form key which was added to improve the security engine of the checkout page. it wasn't exist in the previous versions, what means that everyone who using custom theme must implement the new form key method as @Peter Michael meant above. – Idan Gozlan Dec 1 '13 at 12:22
  • My theme does not override that file but I still have this problem. What gives? I'm on 1.8.1 – CommaToast May 1 '14 at 2:27
2

I just installed magento 1.8 and have a similar problem I think this problem is because of

    if (!$this->_validateFormKey()) {
        $this->_redirect('*/*');
        return;
    }

in the OnepageController.php in the saveOrderAction() method.

I think I found a solution, add this line

   $this->getRequest()->setParam('form_key', Mage::getSingleton('core/session')->getFormKey());

copy the file /app/code/core/Mage/Authorizenet/controllers/Directpost/PaymentController.php to /app/code/local/Mage/Authorizenet/controllers/Directpost/PaymentController.php

and edit the method placeAction, after line 142

    $this->_getDirectPostSession()->setQuoteId($this->_getCheckout()->getQuote()->getId());

add this line:

    $this->getRequest()->setParam('form_key', Mage::getSingleton('core/session')->getFormKey());
  • Thanks for the input. Didn't work for me though... – Joao Oct 3 '13 at 18:54
  • 1
    I forget that you need to rewrite the controller by creating a simple module, for now just try to edit the core file to see if it does help, if it's working and you might want to do a simple module to rewrite the controller with the local one you created.. – Omniscience - Dan Oct 3 '13 at 19:26
  • Still no dice. Thanks though. I know this question is kind of a shot in the dark. – Joao Oct 3 '13 at 20:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.