I have made an Invoice payment plugin from the check payment plugin.
Just changed the name and references to invoice instead of check.
It works as expected except for the plugins _end-page that will not show the $amount and the $order_number.
$information is shown properly.
I checked with var_dump($order) and the values for order_number is there and everything else.
The code for onAfterOrderConfirm function is exactly the same for my invoice.php as in the check.php.
With the payment method check the $amount and $order_number works.
Could you please check and see why this isn't working?
Yes I know that but both the Check and BankTranser plugins are used for those payment methods. I need one more for Invoices and more or less duplicated the BankTransfer plugin.
Well I didn't just change the name of it.
I did a search and replace in the file and changed all instances of "banktransfer" to "invoice".
Also changed the language strings to be able to have other, more relevant text in the plugin.
But if I compare the files there is no other changes made.
The ZIP-file I enclosed can be installed and used, you can test it if you like.
The strange thing is that the variable for Information works but not the others.
Note that you can use the westernunion payment plugin for your invoice plugin since it's also a simple payment plugin like bank transfer and check.
I checked your code but it sounds correctso I have no clue as to why it doesn't work.
I finally got some time to check this out again.
If I changed the code I got it to work, here is the solution:
<div class="hikashop_invoice_end" id="hikashop_invoice_end"> <span class="hikashop_invoice_end_message" id="hikashop_invoice_end_message"> <?php echo JText::_('ORDER_IS_COMPLETE').'<br/>'. JText::sprintf('INVOICE_MESSAGE'); echo " $amount<br/>"; echo "$information<br/><br/>"; echo JText::sprintf('INVOICE_ORDER_NUMBER'); echo "$order_number<br/>"; echo JText::_('THANK_YOU_FOR_PURCHASE'); ?> </span> </div>