- Posts: 267
- Thank you received: 5
Update PHP error
8 years 5 days ago - 8 years 5 days ago #298542
by dvddvd
Update PHP error was created by dvddvd
Last edit: 8 years 5 days ago by dvddvd.
Please Log in or Create an account to join the conversation.
8 years 4 days ago #298560
by nicolas
Replied by nicolas on topic Update PHP error
Hi,
Indeed, this function has been deprecated in PHP 7.2
The solution is to use openssl_encode instead which should normally be available.
Change the line:
to:
in the file plugins/hikashoppayment/servired/servired.php and that should fix the problem.
Please let us know how it works so that we can include the change on our end as we don't have the necessary information to test the servired payment plugin on our end.
Please also note that it requires PHP to support openSSL (it should be the case already for the vast majority of hostings):
php.net/manual/en/openssl.installation.php
Indeed, this function has been deprecated in PHP 7.2
The solution is to use openssl_encode instead which should normally be available.
Change the line:
Code:
$encryptkey = mcrypt_encrypt(MCRYPT_3DES, $decodekey, (string)$orderServired, MCRYPT_MODE_CBC, $iv);
Code:
$message_padded = $orderServired;
if (strlen($message_padded) % 8) {
$message_padded = str_pad($message_padded,
strlen($message_padded) + 8 - strlen($message_padded) % 8, "\0");
}
$encryptkey = openssl_encrypt($message_padded, "DES-EDE3-CBC", $decodekey, OPENSSL_RAW_DATA | OPENSSL_NO_PADDING, $iv);
Please let us know how it works so that we can include the change on our end as we don't have the necessary information to test the servired payment plugin on our end.
Please also note that it requires PHP to support openSSL (it should be the case already for the vast majority of hostings):
php.net/manual/en/openssl.installation.php
The following user(s) said Thank You: dvddvd
Please Log in or Create an account to join the conversation.
7 years 11 months ago #298861
by dvddvd
Replied by dvddvd on topic Update PHP error
Thank you Nicilas,
works correctly!!!
works correctly!!!
The following user(s) said Thank You: nicolas
Please Log in or Create an account to join the conversation.
Time to create page: 0.227 seconds