Can't add new payment option

  • Posts: 4
  • Thank you received: 0
  • Hikashop Business
16 hours 21 minutes ago #369721

-- HikaShop version -- : 6.1.1
-- Joomla version -- : 5.4.0
-- Error-message(debug-mod must be tuned on) -- : Compile Error: Array and string offset access syntax with curly braces is no longer supported

Hello,

I recently got the warning message "Your PayPal payment method is obsolete and will soon be discontinued by PayPal. Please go in the System>Payment methods menu, click on the 'new' button and select the 'HikaShop PayPal Checkout payment plugin' to configure the PayPal Checkout payment method which is now replacing it. Once done and the new PayPal Checkout payment method is available on your website, disable the old PayPal payment method and this error message will disappear."
I tried following these guidelines, but got a Joomla error page. I updated HikaShop to the latest version, but the problem persisted. After switching on debugging, I saw that it's a PHP error:

Compile Error: Array and string offset access syntax with curly braces is no longer supported

The code is:

public static function getScriptNameFromUrl ( $url )
{
$path = parse_url($url, PHP_URL_PATH);
$len = strlen($path);
if ( $len == 0 || '/' == $path{$len-1} ) {
return "";
}
return basename($path);
}

coming form /homepages/3/d522575378/htdocs/joomla-2014-04-07/plugins/hikashoppayment/platron/PG_Signature.php:17

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

  • Posts: 4
  • Thank you received: 0
  • Hikashop Business
15 hours 58 minutes ago #369722

(N.B.: I was able to fix this issue because I also have ssh access to the site. I simply edited the PHP code mentioned in the exception report, and replaced the curly braces by normal [] indexing. This way, I was able to continue. But perhaps this should be fixed in an upcoming version to ensure PHP compatibility?)

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

  • Posts: 84812
  • Thank you received: 13810
  • MODERATOR
11 hours 36 minutes ago #369724

Hi,

This plugin has not been included in HikaShop for more than 10 years. So you have an old version of the plugin. That's why you're getting this error on a new version of PHP.
If you wish to continue using this payment plugin, then you should update it with the latest version available on github: github.com/HikaShop/hikashoppayment-platron
This would automatically fix the problem.
Otherwise, I would recommend removing it from your website.

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

Time to create page: 0.042 seconds
Powered by Kunena Forum