Al Brookbanks Posted November 1, 2013 Share Posted November 1, 2013 No the cache can be ignored. Quote Link to comment Share on other sites More sharing options...
Kristoff Posted November 1, 2013 Author Share Posted November 1, 2013 Ok, that's not working then. Could it be what I said about the A or X at the end of the callback URL relating to AES or XOR? If so, it's not changing when I change between the 2 on the settings. Is there any way to manually change this? Quote Link to comment Share on other sites More sharing options...
Kristoff Posted November 1, 2013 Author Share Posted November 1, 2013 Guys, Success!! (I think!) Will post shortly... Edit: I've sussed it. I did a search for "XOR" and found this little fella: private $_encryption = 'AES'; // can be XOR Despite the setting on the gateway being XOR it said AES here. So I changed AES to XOR and it worked straight away! Quote Link to comment Share on other sites More sharing options...
bsmither Posted November 1, 2013 Share Posted November 1, 2013 According to the code in the SagePay module gateway file, everything about the order is suppose to arrive as a string in a querystring (or post) variable called 'crypt'. If the very first character of this string value is '@', then we know it is the AES encryption protocol. This is assuming we have the current/correct SagePay API protocol. I had you add a test for the presence of 'crypt' being sent along with the callback: if(!isset($_REQUEST['crypt']) || empty($_REQUEST['crypt'])) $values['StatusDetail'] .= " Nothing to decrypt."; According to the result of this test, there is no 'crypt' being sent with the callback. Regardless how you have the encryption set in the SagePay module, if you find the order details at MySagePay, then CubeCart is working with respect to sending, and receiving the callback. What is not working is * knowing the name of the variable with the results of the transaction * knowing how to determine by what method of encryption is being used That would be in the SagePay API documentation. Quote Link to comment Share on other sites More sharing options...
bsmither Posted November 1, 2013 Share Posted November 1, 2013 Replace the two statements I had you add earlier with this: $values['StatusDetail'] = implode(', ', array_keys($_REQUEST)); This should show in the Transactions log by what name the results are coming in on. Quote Link to comment Share on other sites More sharing options...
Kristoff Posted November 1, 2013 Author Share Posted November 1, 2013 It's working now buddy. Do you mean check and see what encryption it's using? Quote Link to comment Share on other sites More sharing options...
bsmither Posted November 1, 2013 Share Posted November 1, 2013 From the statement you posted above, eight lines down is another statement that determines the module's setting and uses that. "Do you mean check and see what encryption it's using?" It will tell us the name of the variable the returning data is in. If it's not 'crypt', but something else, we will see its name. Quote Link to comment Share on other sites More sharing options...
Kristoff Posted November 1, 2013 Author Share Posted November 1, 2013 I don't know if i've got them in the wrong place, but i've just got: 902780b*****7dd2d9UHwLcDzD OK £0.50 SagePay Today, 14:40 0000 : The Authorisation was Successful. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.