Guest [email protected] Posted February 2, 2012 Share Posted February 2, 2012 Hi, I am based in the UK, and my USA orders have been failing. The Barclaycard CPI is failing as it's receiving the full USA State from Cubecart, when it is expecting a 2 digit code (Texas - TX). So, basically all my orders from the States are currently failing. I contacted Barclaycard who stated only a 2 digit code should be sent through,but CC is sending the full name across - Texas when it should be sending TX!! Anyone else in the UK having this issue, or know how to fix it? Many thanks, Dave Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted February 2, 2012 Share Posted February 2, 2012 I can't help, but I do know there are lots of changes involving various gateway plugins in the 5.0.7 upgrade. I didn't see anything for Barclaycard in the difference file, but I may not know what to look for. Quote Link to comment Share on other sites More sharing options...
Guest [email protected] Posted February 2, 2012 Share Posted February 2, 2012 Thanks for that Dirty Butler. I shall upgrade to 5.0.7 then, currently 5.0.6. Started on a SWITCH/CASE call in gateway.class.php to hack into it. Quote Link to comment Share on other sites More sharing options...
Guest [email protected] Posted February 2, 2012 Share Posted February 2, 2012 Still broken. I am so wondering why I bothered to upgrade to CC5. I have reported it as a bug, so probably the end of that. Is it just me, or is CC5 not fit for purpose (putting it politely). Can't recall buying any other software package and having to spent hours trying to bug fix and get it to work! There has to be something better out there, please put me out my misery........... Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted February 2, 2012 Share Posted February 2, 2012 I'm sorry it's been so difficult for you. I blame most of my problems with it on ignorant mistakes I had made in previous versions that finally came back to bite me. I wish I could help, but I'm only a moderator to help keep the spam posts deleted as quickly as possible. Quote Link to comment Share on other sites More sharing options...
Toucan Web Design Posted February 3, 2012 Share Posted February 3, 2012 In the mean time, could try the following: In modules/gateways/BarclayCard/gateway.class.php Find: if ($hidden['bcountry'] == 'US') { $hidden['bstate'] = $this->_basket['billing_address']['state']; } else { $hidden['bcountyprovince'] = $this->_basket['billing_address']['state']; } if ($hidden['scountry'] == 'US') { $hidden['sstate'] = $this->_basket['delivery_address']['state']; } else { $hidden['scountyprovince'] = $this->_basket['delivery_address']['state']; } Replace with: if ($hidden['bcountry'] == 'US') { $hidden['bstate'] = getStateFormat($this->_basket['billing_address']['state_abbrev'], 'name', 'abbrev'); } else { $hidden['bcountyprovince'] = $this->_basket['billing_address']['state']; } if ($hidden['scountry'] == 'US') { $hidden['sstate'] = getStateFormat($this->_basket['delivery_address']['state_abbrev'], 'name', 'abbrev'); } else { $hidden['scountyprovince'] = $this->_basket['delivery_address']['state']; } Might do the trick for you, took the code from the SagePay gateway, as that also requires abbreviated states on USA orders, haven't tested though, so make sure to take a copy of the file first and just pop some orders through after to make sure it's working ok 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.