Payment Method Not showing

  • Posts: 175
  • Thank you received: 0
8 years 9 months ago #227835

-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.36

Hello

i tried to create a new custom payment plugins and it doesnt show in the checkout process
i have read www.hikashop.com/support/support/documen...ntation.html#payment and checked single one of it and it's all ok

this is pastebin of my code

pastebin.com/7uXcx2VT

any suggestion?

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

  • Posts: 12953
  • Thank you received: 1778
8 years 9 months ago #227858

Hello,
You should follow each point of the Payment section of the FAQ : www.hikashop.com/support/faq.html#paym

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

  • Posts: 175
  • Thank you received: 0
8 years 9 months ago #227961

Hello

thank you, i will look into it again to see if i miss anything

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

  • Posts: 175
  • Thank you received: 0
8 years 9 months ago #228135

Hello

after looking more into it, i finally got it to work

however, when click on the next step to get the order detail, the purchase method doesnt show

works fine when choosing payment method
i.imgur.com/uyuL2rW.jpg

order detail - doesnt show
i.imgur.com/SmJNmPJ.jpg

any suggestion?

Last edit: 8 years 9 months ago by veeco.

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

  • Posts: 12953
  • Thank you received: 1778
8 years 9 months ago #228164

Hello,
Can you give me more informations on the payment method you are using and how did you exactly configured it through some screenshots for example ?
Thanks.

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

  • Posts: 175
  • Thank you received: 0
8 years 9 months ago #228669

Hello, sorry for late reply

this is my script

www.mediafire.com/download/0l7dh5qqzw67arf/ionpay.rar

I think something is missing [payment name?] and thats causing the method name not appearing

Thank you

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

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
8 years 9 months ago #228703

Hi,

I see two problems in your payment plugin code:
1. You have the code:

	function onPaymentSave(&$cart,&$rates,&$payment_id){

	}
Since you don't extend from hikashopPaymentPlugin, but directly from JPlugin, you indeed need that function, and in it, you need to add the code to store the selection of the customer. Otherwise, the payment method won't be registered as being selected.
The function should be like that:
function onPaymentSave(&$cart,&$rates,&$payment_id){
		$usable = array();
		$this->onPaymentDisplay($cart,$rates,$usable);
		$payment_id = (int) $payment_id;
		foreach($usable as $usable_method){
			if($usable_method->payment_id==$payment_id){
				return $usable_method;
			}
		}
		return false;
	}
Also, on the line:
var $name = 'IONPay';
it should all be in lowercase.

The following user(s) said Thank You: veeco

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

  • Posts: 175
  • Thank you received: 0
8 years 9 months ago #228844

Hello, THANK YOU so much

it finally show up on checkout page

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

Time to create page: 0.080 seconds
Powered by Kunena Forum