Some payments are not updating to confirmed after a user has paid

  • Posts: 1
  • Thank you received: 0
1 day 19 hours ago #365766

-- HikaShop version -- : 4.7.4
-- Joomla version -- : 3.10.20-elts
-- PHP version -- : 8.2.27

Hello,

We have some cases in our platforms using HikaShop where a user pays for a product, receives the confirmation by e-mail, but the order is not confirmed on our side.
We cannot find any trace of an error or any kind of communication between the payment method and our platform that could reveal a bug.

This problem happens to a very small amount of users but we haven't been able to identify what could cause it.

The payment methods used are:

  • Systempay payment plugin
  • Sogecommerce payment plugin

Is there any known issue of order updates with these methods?

Best regards,
Bazile

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

  • Posts: 83296
  • Thank you received: 13466
  • MODERATOR
1 day 16 hours ago #365767

Hi,

So I looked at Systempay's plugin code at paiement.systempay.fr/doc/en-EN/plugins/#hikashop
The plugin generates a file logs/systempay.log on your website, which stores information about the payment notification (when the gateway contacts your server, after the user has paid).
So, the first thing is to check for this log. In it, you can search for the order ID of an order with the issue and see what the log says.

If the logs says that the payment is successful then the plugin must have triggered the updating of the order status to confirmed.
If that didn't happen, it's likely that a fatal error happened during that process, preventing HikaShop from doing this.
When HikaShop changes the status of an order, the plugins events onBeforeOrderUpdate and onAfterOrderUpdate are triggered.
So it's possible that a plugin implementing the onBeforeOrderUpdate event failed, or cancelled the order update for some reason.
That could be a custom plugin with a glitch in some special case, it could be a mass action with an action "before an order is updated".

If the log doesn't contain any information about the order, then the problem is not in HikaShop, its configuration or the plugins linked to it. It could be the web server, a firewall or something similar blocking the payment notification request for some reason.

Now, since you're saying that the problem happens in some rare cases with both payment methods, and that it works most of the time, this tells me that it's probably nothing to do with the server or the payment notification handling in the plugins. It's likely a process run just before the order confirmation which glitches. A custom plugin or a mass action with a "run PHP action" would be the first culprits.

Finally, you're saying something quite strange:

receives the confirmation by e-mail, but the order is not confirmed on our side

HikaShop sends two emails to the user by default:
- the "order creation notification" sent to the user when the order is created
- the "order status notification" sent to the user when the status of the order is changed from "created" to "confirmed" via a payment notification
If you're talking about the first email, then that's normal.
If you're talking about the second email, then it's really strange. That's because the order status notification is generated and sent by HikaShop after the status has been updated in the database. So, if we're talking about this case, then that would means that the status is being modified on the fly during the saving process (by a plugin, a massaction, etc), or by some custom code when the email is being generated. In any case, you should get some information in the "history" area of the order. Do you see the "automatic payment notification" row there ? What status is there ?

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

Time to create page: 0.057 seconds
Powered by Kunena Forum