Jump to content

Barclaycard Payment gateway issue with USA.


Guest sales@justdoitguides.co.uk

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...