0

I have the new paypoint module installed and it appears to be working, it can be configured and chosen as a payment option using the hosted method.

However, once the "place order" button is pressed and one would expect it to redirect to paypoint for payment, it just goes to a blank page with url/paypointgateway/hosted/redirect/ and sits there.

There is nothing in the paypoint log, the magento log or the apache log.

UPDATE:

In answer to the comment, the redirctAction is:

public function redirectAction() {
  return parent::_redirect_action(__METHOD__);
}

And the parent is:

protected function _redirect_action($child_method) {
     $html = 
        $this
            ->getLayout()
            ->createBlock(
                $this->_redirectBlock,
                null,
                array('paymentMethodInstance' => $this->_getPaymentMethodInstance())
            )
            ->toHtml();
     $this->getResponse()->setBody($html);
}

So I'll look into the layout file.

UPDATE 2:

Ok, have narrowed it down to this part returning nothing, well, a zero length string.:

$html = 
        $this
            ->getLayout()
            ->createBlock(
                $this->_redirectBlock,
                null,
                array('paymentMethodInstance' => $this->_getPaymentMethodInstance())
            )
            ->toHtml();

Note also that $this->_redirectBlock (a string) and $this->_getPaymentMethodInstance() (an object) are non-empty.

7
  • Check what the method redirectAction() from the HoesteController is supposed to do. Maybe there is something wrong with it. If all it does is loadLayout()->renderLayout() it might be something wrong with your layout file.
    – Marius
    Commented Apr 22, 2013 at 10:42
  • well...the _redirect_action method seams like a good place to start debugging. According to the code you updated a block should be created and displayed. Check to see what class is that block ($this->_redirectBlock), see if the class exists, and what it should do.
    – Marius
    Commented Apr 22, 2013 at 11:10
  • Thanks... the redirect block is paypointgateway/redirect_hostedredirect as set in the first controller. This seems to point to PayPoint_Gateway_Block_Redirect_Hostedredirect which sets a $_redirect_form_id only, but extends a block which has a _toHtml which returns the html for a page with an auto-submitting form. Commented Apr 22, 2013 at 11:20
  • Seams right. You say there is nothing in the Magento log, but is the log enabled? If it is then I'm out of ideas. Sorry.
    – Marius
    Commented Apr 22, 2013 at 11:36
  • @marius essentially the _toHtml() function is not being called from the PayPoint_Common_Block_Redirect_Hostedredirect file. Any thoughts on this? The file is being loaded, but that function not run. Commented Apr 22, 2013 at 15:41

1 Answer 1

1

Seams like the suggestions in the comments were on the right track. Maybe they can serve someone as steps to check in a similar issue:

  • Check what the method redirectAction() from the HoesteController is supposed to do. Maybe there is something wrong with it. If all it does is loadLayout()->renderLayout() it might be something wrong with your layout file
  • If the block is a child of class Mage_Core_Block_Template and _toHtml() does not have any output, could be because there is no template set for the block.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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