UPDATES PayPlans 4.2.11 Released

Helpdesk

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

This section can only be seen by users with a valid subscription.
If you have a valid subscription, please login now

Your time
Stack Ideas HQ
Support is
Online

The support team is online and will be able to answer your inquiries. Please stay calm, follow the rules and do not cross post.

We will attend to you as soon as we can.

Buy Us Coffee

Are you happy with our support and would like to buy us a cup of coffee?

$
Enjoy the Coffee!
Service via PayPal
Subscribe for product updates & promotions