- Posts: 5
- Thank you received: 0
Can't add new payment option
10 months 4 weeks ago #369721
by EMAS
Can't add new payment option was created by EMAS
-- 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
-- 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.
10 months 4 weeks ago #369722
by EMAS
Replied by EMAS on topic Can't add new payment option
(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.
10 months 4 weeks ago #369724
by nicolas
Replied by nicolas on topic Can't add new payment option
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.
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.
10 months 4 weeks ago #369730
by EMAS
Replied by EMAS on topic Can't add new payment option
Thank you for your response, Nicolas.
The problem was that I tried to add the new PayPal method, but couldn't do so due to this error. After my manual edit, I could add the new one (and remove the old).
The problem was that I tried to add the new PayPal method, but couldn't do so due to this error. After my manual edit, I could add the new one (and remove the old).
Please Log in or Create an account to join the conversation.
Time to create page: 0.078 seconds