Square payment plugin. does not clear cart on created.

  • Posts: 7
  • Thank you received: 0
  • Hikashop Business
3 months 3 weeks ago #362418

-- HikaShop version -- : 5.1.0
-- Joomla version -- : 5.1.2
-- PHP version -- : 8.1.28
-- Browser(s) name and version -- : chrome
-- Error-message(debug-mod must be tuned on) -- : Cart does not clear for square payment when created

I am not sure what I am doing wrong here. I have paypal and manual payment methods which both work fine and will clear the cart on created status. I can click finish to pay for an order with paypal and then back out and the cart will be cleared. However with Square payment plugin. If i click finish and then hit back on the browser. It will show my cart still populated , I check orders in hikashop and it shows that it was created so why is the front end not clearing the cart?

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

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
3 months 3 weeks ago #362419

Hello,

We will need these elements :
- Your Square plugin setting via a screenshot
- Activate the Joomla Debug, in maximum level and process a test to see if we have errror message & clues
=> Provide this via a screenshot



Regards

Last edit: 3 months 3 weeks ago by Philip.

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

  • Posts: 7
  • Thank you received: 0
  • Hikashop Business
3 months 3 weeks ago #362428

Hi my square settings is attached. some is cut off. at top it says published and at bottom access level is set to all. I went and set joomla to maximum error recording then tried to add to cart on front end and check out with square, purposely backing out. The cart does not empty. I am unsure where to get the log file? i went to administrator/logs and see some stuff listed under error.php. but the last entries were just

2024-07-30T22:03:07+00:00 WARNING 144.62.xxx.xxx deprecated Joomla\CMS\Application\CMSApplication::getCfg() is deprecated and will be removed in 6.0. Use Factory->getApplication()->get() instead.
2024-07-30T22:03:07+00:00 WARNING 144.62.xxx.xxx deprecated Joomla\CMS\Application\CMSApplication::getCfg() is deprecated and will be removed in 6.0. Use Factory->getApplication()->get() instead.

Attachments:

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

  • Posts: 7
  • Thank you received: 0
  • Hikashop Business
3 months 3 weeks ago #362431

also when i abort payment and cart is not clear i can click on finish again and it causes the system to create a new order number that also shows a status of created but i can again abort payment and go back to a populated cart.

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
3 months 3 weeks ago #362429

Hi,

I looked into the issue.
From what I can see, the problem is linked to two things:
- You must have entered a "return URL" in the settings of the payment method.
- HikaShop has a system where, when the user is directed to the "after_end" page (after a payment), it will clear the cart, and then, either display the default thank you page of HikaShop, or redirect the user to the "return_url" of the payment method if not empty. However, when developing the Square plugin, the developer make a mistake and used "returnurl" instead of "return_url". This led to HikaShop ignoring it and always display the default thank you page. To counter this, the developer modified the plugin so that when the return URL is provided, the plugin directly directs the user to it, instead of the "after_end" page of HikaShop. And thus, this leads to the cart not being cleared after the payment if you have the "clear cart after order is" setting set to "confirmed" in the HikaShop configuration. If you leave this setting to the default "created", which is the default, then the cart is cleared by HikaShop before the payent plugin redirects to the payment gateway, and thus it works the same if you don't go through the after_end page. I think that's why the developer of the plugin didn't see the problem you have.
So the solution will be to change the returnurl parameter of the plugin to return_url, and to keep always using the "after_end" URL in the code of the plugin.

This will require modifying the code of the payment plugin. I'll send an email to the developer of this plugin after sending this message so that he can make the necessary modifications.

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

  • Posts: 7
  • Thank you received: 0
  • Hikashop Business
3 months 3 weeks ago #362443

Hi my issue exists with clear cart on created and only for the square plugin. No return url is being used .

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

  • Posts: 137
  • Thank you received: 33
  • MODERATOR
3 months 3 weeks ago #362452

Hello,

Thanks for your feedback, I'm actually looking into the issue and debugging it on my end, we can continue via email at : tsukidev.contact[at]gmail[dot]com


Kind regards,
Mohamed.
Tsuki Dev
tsukidev.contact[at]gmail[dot]com

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

  • Posts: 7
  • Thank you received: 0
  • Hikashop Business
3 months 3 weeks ago #362482

Thanks. I've sent you an email. From paedbo13 hotmail.

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

Time to create page: 0.057 seconds
Powered by Kunena Forum