Index: branches/5.1.x/units/gateways/gw_classes/paymentech.php =================================================================== diff -u -N -r13100 -r13465 --- branches/5.1.x/units/gateways/gw_classes/paymentech.php (.../paymentech.php) (revision 13100) +++ branches/5.1.x/units/gateways/gw_classes/paymentech.php (.../paymentech.php) (revision 13465) @@ -1,6 +1,6 @@ '', ); - $sql = 'SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations WHERE DestAbbr = %s'; - $data['AVScountryCode'] = $this->Conn->GetOne( sprintf($sql, $this->Conn->qstr($item_data['BillingCountry']) ) ); + $cs_helper =& $this->Application->recallObject('CountryStatesHelper'); + /* @var $cs_helper kCountryStatesHelper */ + $data['AVScountryCode'] = $cs_helper->getCountryIso( $item_data['BillingCountry'] ); + if ($data['AVScountryCode'] != 'US') { $data['AVSstate'] = ''; }