Sure you have Osclass Payments Pro 1.1.6+ and PHP 7 running on your current server, which will no longer support Mcrypt and therefore shows that error.
Open functions.php of payment_pro and add this script at the start:
function encrypt_decrypt($action, $string) {
$output = false;
$encrypt_method = "AES-256-CBC";
$secret_key = PAYMENT_PRO_CRYPT_KEY; //'WS-SERVICE-KEY';
$secret_iv = PAYMENT_PRO_CRYPT_KEY; //'WS-SERVICE-VALUE';
// hash
$key = hash('sha256', $secret_key);
// iv - encrypt method AES-256-CBC expects 16 bytes - else you will get a warning
$iv = substr(hash('sha256', $secret_iv), 0, 16);
if ($action == 'encrypt') {
$output = base64_encode(openssl_encrypt($string, $encrypt_method, $key, 0, $iv));
} else {
if ($action == 'decrypt') {
$output = openssl_decrypt(base64_decode($string), $encrypt_method, $key, 0, $iv);
}
}
return $output;
}
Then, modify the following functions payment_pro_crypt($string) and payment_pro_decrypt($string) to this:
function payment_pro_crypt($string) {
/*$cypher = MCRYPT_RIJNDAEL_256;
$mode = MCRYPT_MODE_ECB;
return base64_encode(mcrypt_encrypt($cypher, PAYMENT_PRO_CRYPT_KEY, $string, $mode,
mcrypt_create_iv(mcrypt_get_iv_size($cypher, $mode), MCRYPT_RAND)
));*/
return encrypt_decrypt('encrypt', $string);
}
function payment_pro_decrypt($string) {
/*if($string=='') { return ''; };
$cypher = MCRYPT_RIJNDAEL_256;
$mode = MCRYPT_MODE_ECB;
return str_replace("\0", "", mcrypt_decrypt($cypher, PAYMENT_PRO_CRYPT_KEY, base64_decode($string), $mode,
mcrypt_create_iv(mcrypt_get_iv_size($cypher, $mode), MCRYPT_RAND)
));*/
if ($string == '') return '';
return encrypt_decrypt('decrypt', $string);
}
It is all!