Sage plugin stopped working with Hikashop & PHP update

  • Posts: 141
  • Thank you received: 3
  • Hikashop Business
4 years 2 months ago #315079

-- HikaShop version -- : 4.2.2
-- Joomla version -- : 3.9.14
-- PHP version -- : 7.3.13

This weekend I updated our server from PHP 7.2 to 7.3, and after seeing no issues with our Hikashop installation ( v 4.2.0 ), I updated the store to v4.2.2. I found a few threads which implied that the Legacy Checkout page wasn't fully compatible with PHP 7.3, so I switched to the modern version. The store functions all seemed to work properly, but it soon became apparent that the Sage Payment plugin ( 2.0.0, according to its XML document ) had stopped communicating with their service properly, delivering the "Could not process payment. Please try again later." message.

Debugging showed me that Sage was sending an error code of 900017, which is not included in the plugin's error index. I was able to track it down online, where I learned it supposedly meant that "the CC expiration date was incorrectly formatted". As I dug into what was being sent to Sage, I learned that none of the credit card information was being included in the CURL request.

It appears that the credit card information being temporarily stored in the plugin's User State variables is now assembled into a JSON encoded object which is then base64 encoded and stored in a single State variable rather than being divided among the card number, mm, yy, and ccv State variables, so when the url is built for CURL, the CC data fields it uses are blank.

I modified the plugin to re-assemble the CC data object and populate those fields and the plugin began working again.

For the moment all is good.

I know the Sage plugin is no longer included in the Hikashop Business installation (because Sage is not very helpful about these things), but if this change in State behavior is a Hikashop change (possibly having to do with the modern checkout page rather than the Legacy version), it might affect other old payment plugins.

I'd appreciate any insight you can provide, if you would.

Thanks.

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

  • Posts: 81515
  • Thank you received: 13068
  • MODERATOR
4 years 2 months ago #315084

Hi,

The Sage plugin is not included in HikaShop. So the version you have is a really old one which was developed before we developed the new checkout. That's why it didn't work after the update of your HikaShop.
However, we do provide an up to date version of the plugin here:
www.hikashop.com/component/hikashop/product/cid-114.html
If you purchase it and install it on your website, it will work with the new checkout without any change needed.

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

  • Posts: 141
  • Thank you received: 3
  • Hikashop Business
4 years 2 months ago #315091

Yeah, I remember hacking it many years ago, but not to what extent.

Regardless, Thanks for your help.

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

Time to create page: 0.058 seconds
Powered by Kunena Forum