Index: branches/5.1.x/units/gateways/gw_classes/paypal.php =================================================================== diff -u -r13100 -r13465 --- branches/5.1.x/units/gateways/gw_classes/paypal.php (.../paypal.php) (revision 13100) +++ branches/5.1.x/units/gateways/gw_classes/paypal.php (.../paypal.php) (revision 13465) @@ -1,6 +1,6 @@ Conn->GetOne( sprintf($sql, $this->Conn->qstr($item_data['BillingCountry']) ) ); + $cs_helper =& $this->Application->recallObject('CountryStatesHelper'); + /* @var $cs_helper kCountryStatesHelper */ + + $ret['country'] = $cs_helper->getCountryIso( $item_data['BillingCountry'] ); $ret['notify_url'] = $this->Application->BaseURL('/in-commerce').'gw_notify.php?sid='.$this->Application->GetSID().'&admin=1&order_id='.$item_data['OrderId']; $ret['cmd'] = '_xclick'; // act as "Buy Now" PayPal button return $ret; @@ -142,9 +144,11 @@ $ret['city'] = $item_data['BillingCity']; $ret['state'] = $item_data['BillingState']; $ret['zip'] = $item_data['BillingZip']; - $sql = 'SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations WHERE DestAbbr = %s'; - $ret['country'] = $this->Conn->GetOne( sprintf($sql, $this->Conn->qstr($item_data['BillingCountry']) ) ); + $cs_helper =& $this->Application->recallObject('CountryStatesHelper'); + /* @var $cs_helper kCountryStatesHelper */ + + $ret['country'] = $cs_helper->getCountryIso( $item_data['BillingCountry'] ); $ret['notify_url'] = $this->Application->BaseURL('/in-commerce').'gw_notify.php?sid='.$this->Application->GetSID().'&admin=1&order_id='.$item_data['OrderId'].'&payment_type_id='.$tag_params['payment_type_id']; $ret['cmd'] = '_xclick-subscriptions'; // act as "Buy Now" PayPal button