tolzhabayev / sagepayForm-php

A simple class to integrate sagepayForm into your website
40 stars 26 forks source link

decodeAndDecrypt - change #4

Closed brbaso closed 10 years ago

brbaso commented 10 years ago

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 ...

tolzhabayev commented 10 years ago

Thanks, i have changed the class