Kristoff Posted October 7, 2014 Share Posted October 7, 2014 Hi guys, we had this issue before, but fixed it, see here: http://forums.cubeca...s-with-sagepay/ However, this time, i've checked how I fixed it before, which is still the same, yet not working. Basically after payment, the order is just setting to pending... Nightmare. Any ideas? Seems like it's not letting me set it to XOR? Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted October 7, 2014 Share Posted October 7, 2014 SagePay don't support XOR with 3.0 anymore. Quote Link to comment Share on other sites More sharing options...
Kristoff Posted October 7, 2014 Author Share Posted October 7, 2014 How do we go about validating payments now then? Or can't we? Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted October 7, 2014 Share Posted October 7, 2014 Can't the PHP config be recompiled to support mcrypt? Quote Link to comment Share on other sites More sharing options...
Kristoff Posted October 7, 2014 Author Share Posted October 7, 2014 I have no idea what that is or what it consists of? Quote Link to comment Share on other sites More sharing options...
bsmither Posted October 7, 2014 Share Posted October 7, 2014 Let's just double-check: In admin, navigation panel, click PHP Info. Scroll down about half-way until you get to a section (in alphabetical order) that may or may not be there: mcrypt. It will be between mbstring and mhash. If the mcrypt section is there, then we have a different problem with the module. If the mcrypt section is not there, then please contact your hosting provider to have them enable this PHP extension for your hosting account. Quote Link to comment Share on other sites More sharing options...
Kristoff Posted October 7, 2014 Author Share Posted October 7, 2014 Let's just double-check: In admin, navigation panel, click PHP Info. Scroll down about half-way until you get to a section (in alphabetical order) that may or may not be there: mcrypt. It will be between mbstring and mhash. If the mcrypt section is there, then we have a different problem with the module. If the mcrypt section is not there, then please contact your hosting provider to have them enable this PHP extension for your hosting account. '--with-mcrypt=/opt/libmcrypt/'? Quote Link to comment Share on other sites More sharing options...
bsmither Posted October 7, 2014 Share Posted October 7, 2014 Scroll down the page about half-way until you get to a section (in alphabetical order) that may or may not be there: mcrypt. Quote Link to comment Share on other sites More sharing options...
Kristoff Posted October 7, 2014 Author Share Posted October 7, 2014 It's mentioned in 2 places. Configure Command and Registered Stream Filters. Quote Link to comment Share on other sites More sharing options...
bsmither Posted October 7, 2014 Share Posted October 7, 2014 Scroll down, my son! Scroll down!! Quote Link to comment Share on other sites More sharing options...
Kristoff Posted October 7, 2014 Author Share Posted October 7, 2014 Ok, apologies. Mac/Chrome, hid my scrollbar, looked like the bottom of the page!! mcrypt mcrypt support enabled mcrypt_filter support enabled Version 2.5.8 Api No 20021217 Supported ciphers cast-128 gost rijndael-128 twofish arcfour cast-256 loki97 rijndael-192 saferplus wake blowfish-compat des rijndael-256 serpent xtea blowfish enigma rc2 tripledes Supported modes cbc cfb ctr ecb ncfb nofb ofb stream Directive Local Value Master Value mcrypt.algorithms_dir no value no value mcrypt.modes_dir no value no value Quote Link to comment Share on other sites More sharing options...
bsmither Posted October 7, 2014 Share Posted October 7, 2014 Ok, so you have mcrypt. Now we need to look again at the module to figure out what's going on. It is not because of any inability to use AES. Quote Link to comment Share on other sites More sharing options...
Kristoff Posted October 7, 2014 Author Share Posted October 7, 2014 The problem i'm having is that it's just leaving the order as Pending. How can I find any other details out on why it's not completing the payment? Edit: My returning URL after payment is: index.php?cart_order_id=141007-233451-7808&_a=complete Second Edit: Could this be related to the issue? Upon arriving at Sagepay the URL is: cardselection?vpstxid={92AE6080-A594-3572-B9A0-529E92DD5DE3} Would the curly brackets be playing havock with the processing? Quote Link to comment Share on other sites More sharing options...
bsmither Posted October 8, 2014 Share Posted October 8, 2014 "Upon arriving at Sagepay" I would think the braces would not be the cause. But I don't see that phrase in the code. It could mean that once you got to: live.sagepay.com/gateway/service/vspform-register.vsp SagePay immediately bounced you to a different page. To know if that happened, you would need to activate the "Developer Tools" of Chrome and watched the traffic going in and out of the browser. Have we looked at the Transaction Logs for any of these recent orders? Quote Link to comment Share on other sites More sharing options...
Kristoff Posted October 8, 2014 Author Share Posted October 8, 2014 Yep. The last order before updating had: b1d8******hVXOK £50.00 SagePay Oct 02 2014, 12:47 PM 0000 : The Authorisation was Successful. The orders since the update: Not Available £50.00 SagePay Yesterday, 23:35 Nothing in notes column Quote Link to comment Share on other sites More sharing options...
bsmither Posted October 8, 2014 Share Posted October 8, 2014 That tells me the process() function is getting called. That's good. What I would like to see is the Notes column for an order made after making this edit in gateway.class.php, near line 293:Was: $transData['notes'] = ''; Now: $transData['notes'] = 'Crypt: '.$_REQUEST['crypt'].'<br>'; We can discover if, in fact, the response starts with an '@'. Quote Link to comment Share on other sites More sharing options...
Kristoff Posted October 8, 2014 Author Share Posted October 8, 2014 "Notes: Crypt:" Quote Link to comment Share on other sites More sharing options...
bsmither Posted October 8, 2014 Share Posted October 8, 2014 Getting warmer! If nothing followed "Crypt:" then $_REQUEST['crypt'] does not exist (probably). So, next experiment... Was: $transData['notes'] = 'Crypt: '.$_REQUEST['crypt'].'<br>'; Now: $REQ_keys = print_r(array_keys($_REQUEST]), true); $transData['notes'] = 'SagePay Keys: ' . $REQ_keys . '<br>'; Quote Link to comment Share on other sites More sharing options...
Kristoff Posted October 8, 2014 Author Share Posted October 8, 2014 $REQ_keys = print_r(array_keys($_REQUEST]), true); Is the squared bracket after Request an error? Quote Link to comment Share on other sites More sharing options...
bsmither Posted October 8, 2014 Share Posted October 8, 2014 Shoot! Yes, it is. Quote Link to comment Share on other sites More sharing options...
Kristoff Posted October 8, 2014 Author Share Posted October 8, 2014 SagePay Keys: Array ( [0] => _g [1] => type [2] => cmd [3] => module [4] => cart_order_id [5] => __utma [6] => __utmb [7] => __utmc [8] => __utmz [9] => PHPSESSID [10] => _a ) Edit: That seems to come from here? $order->logTransaction($transData); httpredir(currentPage(array('_g', 'type', 'cmd', 'module'), array('_a' => 'complete'))); return false; Line 319ish? Quote Link to comment Share on other sites More sharing options...
bsmither Posted October 8, 2014 Share Posted October 8, 2014 Very interesting. The keys are coming from line 219, a piece of data we give to SagePay to inform them of how to contact your store with the results of the transaction. ."&SuccessURL=".$GLOBALS['storeURL'].'/index.php?_g=rm&type=gateway&cmd=process&module=SagePay&cart_order_id='.$this->_basket['cart_order_id'] The __ut* keys are from google, facebook, yahoo, I forget. We can ignore them. There is no other key that SagePay is using to send the results back. (But I wonder where the '_a' is coming from?) Quote Link to comment Share on other sites More sharing options...
Kristoff Posted October 8, 2014 Author Share Posted October 8, 2014 I have no idea. They all look like they tie in to the 319 line to me, but I don't really know what I'm looking at. I can't get on to the sagepay site until tomorrow, but would the content of the transactions in sagepay be any help? It has the returning URL along with other bits and bobs. Quote Link to comment Share on other sites More sharing options...
bsmither Posted October 8, 2014 Share Posted October 8, 2014 I'm looking at a development kit for SagePay and all I see is the cURL method of access (as opposed to the IPN method). (I am mentioning all this techno-speak for Al's perusal.) But does this SagePay use the IPN method??? That is, is the customer taken to SagePay, or does the customer stay at your site and enter the data in a form (perhaps an iframe)? Quote Link to comment Share on other sites More sharing options...
Kristoff Posted October 8, 2014 Author Share Posted October 8, 2014 User goes to sagepay site and makes the payment on sagepay form, then returns to the website. Where it used to say completed and they could download the item. 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.