public function getPaymentMethod($paymentId)
{
//$paramsC = PhocacartUtils::getComponentParameters();
//$shipping_amount_rule = $paramsC->get( 'shipping_amount_rule', 0 );
$db = Factory::getDBO();
/*$query = ' SELECT p.id, p.title, p.image,'
.' FROM #__phocacart_payment_methods AS s'
.' WHERE p.id = '.(int)$paymentId
.' LIMIT 1';
$db->setQuery($query);*/
$query = ' SELECT p.id, p.tax_id, p.cost, p.cost_additional, p.calculation_type, p.title, p.image, p.method, p.params, p.description, ' . ' t.id as taxid, t.title as taxtitle, t.tax_rate as taxrate, t.calculation_type as taxcalculationtype' . ' FROM #__phocacart_payment_methods AS p' . ' LEFT JOIN #__phocacart_taxes AS t ON t.id = p.tax_id' . ' WHERE p.id = ' . (int) $paymentId . ' ORDER BY p.id' . ' LIMIT 1';
$db->setQuery($query);
$payment = $db->loadObject();
if (isset($payment->params)) {
$registry = new Registry();
//$registry->loadString($payment->params);
if (isset($payment->params)) {
$registry->loadString($payment->params);
}
$payment->params = $registry;
//$payment->paramsArray = $registry->toArray();
}
return $payment;
}