Ebizmarts Sagepaysuite Onestepcheckout Place Order Form Key Issue

We had a client who migrated his domain from http to https. And his other payment methods in onestepcheckout page started failing.

The issue was that his sagepaysuite/checkout/review/info.phtml was being rendered however in this file you can see an if condition where it checks Magento version.

<?php if($this->helper('sagepaysuite')->isMagentoEE113OrUp() or $this->helper('sagepaysuite')->isMagentoCE1800rUp()): ?>
    <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>
<?php else: ?>
    <script type="text/javascript">
        //<![CDATA[
            review = new Review('<?php echo $this->getUrl('checkout/onepage/saveOrder') ?>', '<?php echo $this->getUrl('checkout/onepage/success') ?>', $('checkout-agreements'));
        //]]>
    </script>
<?php endif; ?>

Our client’s Magento version was CE 1.6.1.0, but we fully patched up the website so no matter we had to use form_key since SUPEE-6788, the part with form_key wasn’t being loaded.


Tags: sagepay supee-6788 form-key onestepcheckout