Can you please explain how to use a custom message in a payment plugin?
Thank you!$message - custom message array set by plugin to override standard messages made by component.
Kind regards,
Dmitrijs
Thank you!$message - custom message array set by plugin to override standard messages made by component.
Code: Select all
// THERE ARE 3 PLACES WHERE THE MESSAGE CAN BE CREATED:
// 1) COMPONENT - components/com_phocacart/views/info/tmpl/ ...
// 2) LANGUAGE FILE - there is specific string in language file which can be customized for each e-shop (see top of ini file)
// 3) PAYMENT PLUGIN - means that payment plugin can override the component (1) and language file (2) message
// See examples:
$proceed = 1;
$message = array();
/*
// Order processed successfully made - no downloadable items
$message['order_nodownload'] = JText::_('COM_PHOCACART_ORDER_SUCCESSFULLY_PROCESSED')
.'</br>' . JText::_('COM_PHOCACART_ORDER_PROCESSED_ADDITIONAL_INFO');
// Order processed successfully made - downloadable items
$message['order_download'] = JText::_('COM_PHOCACART_ORDER_SUCCESSFULLY_PROCESSED')
.'</br>' . JText::_('COM_PHOCACART_ORDER_PROCESSED_DOWNLOADABLE_ITEMS_ADDITIONAL_INFO');
// Order and payment successfully made - no downloadable items
$message['payment_nodownload'] = JText::_('COM_PHOCACART_ORDER_AND_PAYMENT_SUCCESSFULLY_PROCESSED')
.'</br>' . JText::_('COM_PHOCACART_ORDER_PAYMENT_PROCESSED_ADDITIONAL_INFO');
// Order and payment successfully made - downloadable items
$message['payment_download'] = JText::_('COM_PHOCACART_ORDER_AND_PAYMENT_SUCCESSFULLY_PROCESSED')
.'</br>' . JText::_('COM_PHOCACART_ORDER_PAYMENT_PROCESSED_DOWNLOADABLE_ITEMS_ADDITIONAL_INFO');
*/
return true;