You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.
If you're getting failed transactions through the HSBC gateway from customers living in Australia, Belgium or Argentina (to name a few) then this is the reason:
HSBC use a country code that is three digits long. So Australia should be 036, but it's stored in the gbu0_country table as just 36. This then rejected by the HSBC gateway because it's not three digits long.
To correct this, edit the script in the payment method from
foreach ($result as $num => $row) { $tmp[14] = $row['hsbccode'] ; }
to
foreach ($result as $num => $row) { $tmp[14] = sprintf ('%03s', $row['hsbccode'] ) ; }
I don't have Whatevercart 7, only v6, but unless the country code is now stored in the database as the three digit version (ie 036 not 36) then WC7 will also have the same problem, from the source code shown in https://forum.kryptronic.com/viewtopic. … 96#p134296
Offline
bbac wrote:
If you're getting failed transactions through the HSBC gateway from customers living in Australia, Belgium or Argentina (to name a few) then this is the reason:
HSBC use a country code that is three digits long. So Australia should be 036, but it's stored in the gbu0_country table as just 36. This then rejected by the HSBC gateway because it's not three digits long.
To correct this, edit the script in the payment method fromCode:
foreach ($result as $num => $row) { $tmp[14] = $row['hsbccode'] ; }to
Code:
foreach ($result as $num => $row) { $tmp[14] = sprintf ('%03s', $row['hsbccode'] ) ; }I don't have Whatevercart 7, only v6, but unless the country code is now stored in the database as the three digit version (ie 036 not 36) then WC7 will also have the same problem, from the source code shown in https://forum.kryptronic.com/viewtopic. … 96#p134296
Great site here. Lots of websites like this cover subjects that just aren’t covered by magazines.
Offline