Note that there are some explanatory texts on larger screens.

plurals
  1. POFatal error: Call to a member function getPayment() on a non-object in app/code/core/Mage/Paypal/Block/Express/Review.php on line 203
    text
    copied!<p>I am stucked on this error in making transaction through paypal express checkout after redirecting back from paypal.</p> <p>I found this error in shipping method.</p> <p>I am using magento 1.7 version.</p> <p>here is the code where it gives error</p> <pre><code> protected function _beforeToHtml() { $methodInstance = $this-&gt;_quote-&gt;getPayment()-&gt;getMethodInstance(); // here i get error $this-&gt;setPaymentMethodTitle($methodInstance-&gt;getTitle()); $this-&gt;setUpdateOrderSubmitUrl($this-&gt;getUrl("{$this-&gt;_paypalActionPrefix}/express/updateOrder")); $this-&gt;setUpdateShippingMethodsUrl($this-&gt;getUrl("{$this-&gt;_paypalActionPrefix}/express/updateShippingMethods")); $this-&gt;setShippingRateRequired(true); if ($this-&gt;_quote-&gt;getIsVirtual()) { $this-&gt;setShippingRateRequired(false); } else { // prepare shipping rates $this-&gt;_address = $this-&gt;_quote-&gt;getShippingAddress(); $groups = $this-&gt;_address-&gt;getGroupedAllShippingRates(); if ($groups &amp;&amp; $this-&gt;_address) { $this-&gt;setShippingRateGroups($groups); // determine current selected code &amp; name foreach ($groups as $code =&gt; $rates) { foreach ($rates as $rate) { if ($this-&gt;_address-&gt;getShippingMethod() == $rate-&gt;getCode()) { $this-&gt;_currentShippingRate = $rate; break(2); } } } } // misc shipping parameters $this-&gt;setShippingMethodSubmitUrl($this-&gt;getUrl("{$this-&gt;_paypalActionPrefix}/express/saveShippingMethod")) -&gt;setCanEditShippingAddress($this-&gt;_quote-&gt;getMayEditShippingAddress()) -&gt;setCanEditShippingMethod($this-&gt;_quote-&gt;getMayEditShippingMethod()) ; } $this-&gt;setEditUrl($this-&gt;getUrl("{$this-&gt;_paypalActionPrefix}/express/edit")) -&gt;setPlaceOrderUrl($this-&gt;getUrl("{$this-&gt;_paypalActionPrefix}/express/placeOrder")); return parent::_beforeToHtml(); } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload