I used your class for a project. It worked nice but I'd had problems getting and decrypting the crypt data from the SagePay.
A solution which helped was to change a bit the ' decodeAndDecrypt' function.
I changed this row of the the decodeAndDecrypt function in the SagePay.php :
I used your class for a project. It worked nice but I'd had problems getting and decrypting the crypt data from the SagePay. A solution which helped was to change a bit the ' decodeAndDecrypt' function. I changed this row of the the decodeAndDecrypt function in the SagePay.php :
return mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $this->encryptPassword, $strIn, MCRYPT_MODE_CBC);
to:
return mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $this->encryptPassword, $strIn, MCRYPT_MODE_CBC, $this->encryptPassword);
Now everything work just fine for me :) I hope that his make some sense an thanks for a very good work ...