UPDATES EasyBlog 6.0.11 Released! Update to the latest version now!

Helpdesk

Your Time
Our Time
Response Time
24 — 48 hours
We strive to provide the fastest ever response possible. However, we are not super beings.

Allow at least 24 — 48 hours
  Support is offline
Our team is away during the weekend. Some answers may already be available on our documentation

Rest assured that we will get back to your posts as soon as the week starts!
  Support is offline
None
Hello,

I am testing my custom payment gateway and this URL

index.php?option=com_payplans&view=payment&task=complete&gateway=mygateway&action=error

gives me an error

Call to undefined method PayPlansViewPayment::setTemplate()


Here is my code for onPayplansPaymentAfter event


public function onPayplansPaymentAfter(PPPayment $payment, &$action, &$data, $controller)
{
$logs = PPLog::getLog($payment, PPLogger::LEVEL_ERROR);
$record = array_pop($logs);

if ($record && !empty($record))
{
$action = 'error';
}

return parent::onPayplansPaymentAfter($payment, $action, $data, $controller);
}


The problem is that you are passing $this (View object) on dispatch of the onPayplansPaymentAfter event in Payment view and onPayplansPaymentAfter is expecting controller:


// Trigger apps, so they can perform post payment work
$args = array($payment, &$action, &$post, $this);
$html = PP::event()->trigger('onPayplansPaymentAfter', $args, 'payment', $payment);


Best regards,
Artem
The replies under this section are restricted to logged in users or users with an active subscription with us