<?php
if (isset($tpl['params']) && !empty($tpl['params']))
{
	if (pjObject::getPlugin('pjPaypal') !== NULL)
	{
		if ($tpl['params']['a3_price'] > 0)
		{
			$controller->requestAction(array('controller' => 'pjPaypal', 'action' => 'pjActionSubscribe', 'params' => $tpl['params']));
		} else {
			$controller->requestAction(array('controller' => 'pjPaypal', 'action' => 'pjActionForm', 'params' => $tpl['params']));
		}
	}
}
?>