Error with hikashop and firstdata

  • Posts: 2
  • Thank you received: 0
2 months 1 week ago #304689

Hi. We haven't updated anything all was working fine for all this time, but not for last days our checkout process takes 1-2 minutes to get to first data payment.

I enabled debug mode to see if we have any errors to start excluding things out..

1. Either it's our server ( again no updates or changes in Joomla ). Everything was fine for last year.
2. Either First Data has changed something..
3. Some code issue.

Notice: Undefined variable: order in /var/www/html/plugins/hikashoppayment/firstdata/firstdata.php on line 26

Notice: Trying to get property of non-object in /var/www/html/plugins/hikashoppayment/firstdata/firstdata.php on line 26

Notice: Undefined property: plgHikashoppaymentFirstdata::$url_itemid in /var/www/html/plugins/hikashoppayment/firstdata/firstdata.php on line 26

Notice: Undefined variable: order in /var/www/html/plugins/hikashoppayment/firstdata/firstdata.php on line 28

Notice: Trying to get property of non-object in /var/www/html/plugins/hikashoppayment/firstdata/firstdata.php on line 28

Notice: Undefined property: plgHikashoppaymentFirstdata::$url_itemid in /var/www/html/plugins/hikashoppayment/firstdata/firstdata.php on line 28

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

  • Posts: 65715
  • Thank you received: 9593
  • MODERATOR
2 months 1 week ago #304690

Hi,

First, it would be great that you provide your HikaShop version number.
Right now, we don't know, so we're not sure what you have on the lines of these notices in that file plugins/hikashoppayment/firstdata/firstdata.php

The Firstdata plugin require connecting to an external server (the Firstdata server) for the payment.
So it could be something that changed on your hosting plan not allowing outgoing connections.
It could also be a problem on Firstdata's end.
It could be totally unrelated to Firstdata and be for example an issue with the sending of the emails (if the sending of the email fails it might wait for a response from the email server and only continue the processing after that).
It could be many things. So you'll have to rule out possibilities. For example, try a checkout with the "bank transfer" payment method. If you don't have the issue, then it's not linked to the emails.

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

  • Posts: 2
  • Thank you received: 0
2 months 5 days ago #304966

// The constructor is optional if you don't need to initialize some parameters of some fields of the configuration and not that it can also be done in the getPaymentDefaultValues function as you will see later on
    public function __construct(&$subject, $config)
    {

        // This is the cancel URL of HikaShop that should be given to the payment gateway so that it can redirect to it when the user cancel the payment on the payment gateway page. That URL will automatically cancel the order of the user and redirect him to the checkout so that he can choose another payment method
        $this->pluginConfig['cancel_url'][2] = HIKASHOP_LIVE . 'index.php?option=com_hikashop&ctrl=order&task=cancel_order&order_id=' . $order->order_id . $this->url_itemid;
        // This is the "thank you" or "return" URL of HikaShop that should be given to the payment gateway so that it can redirect to it when the payment of the user is valid. That URL will reinit some variables in the session like the cart and will then automatically redirect to the "return_url" parameter
        $this->pluginConfig['return_url'][2] = HIKASHOP_LIVE . 'index.php?option=com_hikashop&ctrl=checkout&task=after_end&order_id=' . $order->order_id . $this->url_itemid;
        // This is the "notification" URL of HikaShop that should be given to the payment gateway so that it can send a request to that URL in order to tell HikaShop that the payment has been done (sometimes the payment gateway doesn't do that and passes the information to the return URL, in which case you need to use that notification URL as return URL and redirect the user to the HikaShop return URL at the end of the onPaymentNotification function)
        $this->pluginConfig['notify_url'][2] = HIKASHOP_LIVE . 'index.php?option=com_hikashop&ctrl=checkout&task=notify&notif_payment=' . $this->name . '&tmpl=component&lang=ru-RU&language=ru-RU';
        return parent::__construct($subject, $config);
    }

version: 3.3.0

Error is on cancel url and return url ( from errors I mentioned ).

We still have the issue with long waiting time until it connects to FirstData.

Bank method with payment was good. No issues with that, fast loading and all good.

Any other tips?

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

  • Posts: 65715
  • Thank you received: 9593
  • MODERATOR
2 months 5 days ago #304969

Hi

Here is what is in the file plugins/hikashoppayment/firstdata/firstdata.php of HikaShop 3.3.0:
monosnap.com/file/flYVWhAxpTBSybFMXOoqq88OvzlBnl
It has nothing to do with the code you posted and it cannot generate the notice messages that you pasted in your first message.
So I don't understand how you can have what you posted in that file.
Could you please double check ?
In fact, even with HikaShop 4.0.3, the same code as in my screenshot is in that file. So I'm surprised you would get some code which has nothing to do with what we have on our end.

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

Time to create page: 0.057 seconds
Powered by Kunena Forum