Invoice payment plugin.

  • Posts: 182
  • Thank you received: 14
4 years 1 month ago #69185

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?


File Attachment:

File Name: invoice.zip
File Size:4 KB



Thanks


Jan

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2309
  • MODERATOR
4 years 1 month ago #69290

Hi jansuhr,

To create this kind of payment, you can too edit the "Bank transfer" payment method.
Just change the name and the informations, and this will work as wanted.

Please Log in or Create an account to join the conversation.

  • Posts: 182
  • Thank you received: 14
4 years 1 month ago #69304

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.

Jan

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2309
  • MODERATOR
4 years 1 month ago #69319

Do you just copy the files of the BankTransfer plugin and edit the name of the plugin ?

If yes, I don't really know why this is not working.

Please Log in or Create an account to join the conversation.

  • Posts: 182
  • Thank you received: 14
4 years 1 month ago #69344

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.

JAn

Please Log in or Create an account to join the conversation.

  • Posts: 54319
  • Thank you received: 7366
  • MODERATOR
4 years 1 month ago #69355

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.

Please Log in or Create an account to join the conversation.

  • Posts: 182
  • Thank you received: 14
4 years 3 weeks ago #74822

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>


Jan

The following user(s) said Thank You: nicolas

Please Log in or Create an account to join the conversation.

Time to create page: 0.062 seconds
Powered by Kunena Forum