The random eclecticisms of loonytoons

Magento payment broken continue button

Current magento version: 1.4.1.1

We recently upgraded a magento site to version 1.4.1.1 as part of moving the site to a new server. Everything seemed to run smoothly with no issues, job done.

However it didn’t take long forĀ  the customer to ring up – ‘My site’s broken, no one can make payments anymore’. Once customer had entered their credit card details they found that the continue button did not work at all, they were stuck on the payment screen. Uh oh, time to dig around checking the server setups, looking for any reported issues with authorize.net (the payment engine being used) and checking into the changes made in the magento upgrade.

Amazingly the problem turned out to be that in latest version of magento, they had included a new javascript file for validating the payment variables input by the user and without this file the payment process would just stop at the card input screen and refuse to go any further.

The solution is simple. Just add the following line of code to your themes page.xml (in the layouts folder) and all should be fine:

<action method="addJs"><script>lib/ccard.js</script></action>

Everything would have been fine if we’d been using the default theme, or if we hadn’t had to override the default page.xml with our own version for our theme.

It just makes me wonder if there was some way that developers could be notified when key changes are made to files, especially to theme files that are overwritten in most installs to avoid such head scratching and long periods of debugging in the future. As far as I can tell this wasn’t even mentioned in the release notes. Do let me know if I’m wrong though and varien do actually release such useful information!

Share

2 thoughts on “Magento payment broken continue button

  1. Christoffer says:

    Hello, thanks for this.

    Where in the page.xml do I add this?

    lib/ccard.js

  2. loonytoons says:

    Close to the top of the page.xml file should be a section with a lot of other addJs method lines, so I just added mine directly under there.
    If you take a look at the default page.xml file though you should be able to see the line in there also and can just replicate that.

    Hope that helps!

Leave a Reply

Your email address will not be published. Required fields are marked *