Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Paypal redirect not working
 
crasx
Jr. Member
 
Total Posts:  8
Joined:  2012-06-01
 

After upgrading to 1.8 paypal standard will not redirect. I have no idea why, nothing in logs, nothing in js console.

I am using a nonstandard template with heavy css modifications called elect, when I change to the default template it works. any idea how I can fix this? Ie: what tweaks I need to make in my old template?

 
Magento Community Magento Community
Magento Community
Magento Community
 
joelika
Jr. Member
 
Total Posts:  1
Joined:  2009-02-03
 

Looks like 1.8 added a key to the onepage checkout form action. Make sure your final saveOrder JS has the form key included (in either checkout/onepage/review.phtml or checkout/onepage/review/info.phtml depending on how old your template is):

<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>

I had to add that into my template to get PayPal standard to work again. Pulled it from the default theme.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Robbi187
Jr. Member
 
Total Posts:  1
Joined:  2013-01-29
 

Hi,

I can’t seem to find either of those files, all I see in my themes onepage/review folder is item.phtml

Can anyone help me out with this please?

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
graemeekay
Jr. Member
 
Total Posts:  1
Joined:  2013-07-31
 

Hi,

When I look for the active info.phtml file I find that it is in:

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

and the code the you suggest that I modify has been amended by EBizcart SAGEPAY.

to the following:

<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’));

SageServer = new EbizmartsSagePaySuite.Checkout
(
{
‘checkout’:  checkout,
‘review’:  review,
‘payment’:  payment,
‘billing’:  billing,
‘accordion’: accordion
}
);
//]]>
</script>

If I remove the extra section added (ie SageServer) then my PayPal redirect works but SagePay does not… and if I replace the code the opposite occurs.

Please could you advise as to how to get them both working together.

Mank Thanks…

 
Magento Community Magento Community
Magento Community
Magento Community
 
rocwu
Jr. Member
 
Avatar
Total Posts:  3
Joined:  2011-02-28
 
joelika - 08 October 2013 08:10 PM

Looks like 1.8 added a key to the onepage checkout form action. Make sure your final saveOrder JS has the form key included (in either checkout/onepage/review.phtml or checkout/onepage/review/info.phtml depending on how old your template is):

<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>

I had to add that into my template to get PayPal standard to work again. Pulled it from the default theme.

Hi, I met this problem too. would you mind explain a bit more about:  where to find the form key and how to get the form key included?

Thank you so much!

 
Magento Community Magento Community
Magento Community
Magento Community
 
crasx
Jr. Member
 
Total Posts:  8
Joined:  2012-06-01
 
joelika - 08 October 2013 08:10 PM

Looks like 1.8 added a key to the onepage checkout form action. Make sure your final saveOrder JS has the form key included (in either checkout/onepage/review.phtml or checkout/onepage/review/info.phtml depending on how old your template is):

<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>

I had to add that into my template to get PayPal standard to work again. Pulled it from the default theme.

worked for me! thank you!

 
Magento Community Magento Community
Magento Community
Magento Community
 
scottb814
Jr. Member
 
Total Posts:  1
Joined:  2013-10-29
 

I am relatively new to Magento and I am experiencing this same problem

I tried to hunt down and locate the files that were discussed and make the changes as described.

I am still seeing a blank page - it acts like it wants to go to Paypal but does not make it - I go backwards and the screen shows an empty cart.

I am not sure what to do so I went back and tried to correct the files I changed just in case I did it wrong.

I even installed a new 1 page check out thinking it might fix it all

Any help would be appreciated - my store is ready to launch I just cannot accept payments and Paypal was my preferred option.

Thanks in advance

Scott

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top