payment notification

  • Posts: 25
  • Thank you received: 1
10 years 3 months ago #201063

-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.4.37
-- Error-message(debug-mod must be tuned on) -- : -

Hi,
I modified the "credit card" plugin in order to make a custom payment gateway for the bank we work with in Turkey. First of all I want to ask if it is a proper way to create a custom gateway. I managed to make payment but there is problem in notification system. I set the callbackUrl as
$httpsHikashop = str_replace('http://','https://', HIKASHOP_LIVE);
$callbackurl = $httpsHikashop.'index.php?option=com_hikashop&ctrl=checkout&task=notify¬if_payment=creditcard&tmpl=component&lang=tr';

It is not working.
How the notification system works?

If the payment is confirmed by bank, bank returns a value as "00" every 5 minutes until get a response as "Approved".
Thank you.

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

  • Posts: 13201
  • Thank you received: 2322
10 years 3 months ago #201065

Hi,

You should have a look at the existing payment plugins, the notification is returned to HikaShop and then HikaShop call a trigger, once the call is done the plugin get it and do specfic tasks based on the informations given.

Here is the developer documentation:
www.hikashop.com/support/support/documen...r-documentation.html

The following user(s) said Thank You: nabukadnezar

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

  • Posts: 25
  • Thank you received: 1
10 years 3 months ago #201426

I cerated a new payment method kind of credit card payment. I want to ask how to create a custom html form in which I will get the credit card's informations. Thank you.

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

  • Posts: 84220
  • Thank you received: 13673
  • MODERATOR
10 years 3 months ago #201553

Hi,

You want to implement the needCC function in your payment plugin. It's really easy:

	function needCC(&$method) {
		$method->ask_cc = true;
		return true;
	}
Then, in the onBeforeOrderCreate function of your plugin, you can call the $this->ccLoad() function to load the credit card data entered by the user in your credit card form and you'll be able to access it like that:
$this->cc_number
$this->cc_month
$this->cc_year
...etc...
You can see examples of that in the code of the numerous payment plugins already displaying a credit card form like paypal pro, or authorize.net

The following user(s) said Thank You: nabukadnezar

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

  • Posts: 25
  • Thank you received: 1
10 years 3 months ago #201837

Hi,
Thank you for your reply. Now payment plugin works perfect. The only thing is about notification mails. Every one minute about 15 notification mails come. I think it entered to a infinite loop. What can cause such a situation? Thank you.

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

  • Posts: 12953
  • Thank you received: 1778
10 years 3 months ago #201860

Hello,
Can you tell us which email are you exactly receiving so that we can know how and why it's sent ?
Thanks.

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

  • Posts: 25
  • Thank you received: 1
10 years 3 months ago #202056

Hi,
When I make a succesful payment with creditcard I receive a confirmed notify mail with products order code which is what should be, beside this I receive more than 10 cancel notify mails with different order codes.
Thank you.

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

  • Posts: 84220
  • Thank you received: 13673
  • MODERATOR
10 years 3 months ago #202116

Hi,

We would need to look at the code of the plugin to tell you because this indicates that the order is being duplicated and that doesn't happen with other payment plugins.

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

  • Posts: 25
  • Thank you received: 1
10 years 2 months ago #202322

I sent the plugin files. Thank you.

Attachments:

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

  • Posts: 84220
  • Thank you received: 13673
  • MODERATOR
10 years 2 months ago #202330

Bonjour,

Le soucis vient de la fonction onBeforeOrderCreate de votre plugin qui n'a pas lieu d'être.
La fonction onHistoryDisplay devrait également être enlevée, même si elle ne cause pas de soucis vu qu'elle ne sert à rien.

The following user(s) said Thank You: nabukadnezar

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

  • Posts: 25
  • Thank you received: 1
10 years 2 months ago #202409

Thank you very much, it resolved the problem :)

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

  • Posts: 84220
  • Thank you received: 13673
  • MODERATOR
10 years 2 months ago #202426

Sorry for the answer in French. It was late in the night :/

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

  • Posts: 25
  • Thank you received: 1
10 years 2 months ago #202773

No problem, thanks to translate.google :)

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

Time to create page: 0.098 seconds
Powered by Kunena Forum