_uc_authorize_cim_xml_billto

  1. drupal
    1. 6 uc_authorizenet.module function
    2. 7 uc_authorizenet.module function
Drupal 7 _uc_authorize_cim_xml_billto($order)

Maps an order's billing information to an array for later XML conversion.

1 call to _uc_authorize_cim_xml_billto()

File

sites/all/modules/ubercart/payment/uc_authorizenet/uc_authorizenet.module, line 1120
Processes payments using Authorize.net. Supports AIM and ARB.

Code

function _uc_authorize_cim_xml_billto($order) {
  $billing_country = uc_get_country_data(array('country_id' => $order->billing_country));
  return array(
    'firstName' => substr($order->billing_first_name, 0, 50), 
    'lastName' => substr($order->billing_last_name, 0, 50), 
    'company' => substr($order->billing_company, 0, 50), 
    'address' => substr($order->billing_street1, 0, 60), 
    'city' => substr($order->billing_city, 0, 40), 
    'state' => substr(uc_get_zone_code($order->billing_zone), 0, 2), 
    'zip' => substr($order->billing_postal_code, 0, 20), 
    'country' => !$billing_country ? '' : $billing_country[0]['country_iso_code_2'], 
    'phoneNumber' => substr($order->billing_phone, 0, 25),
  );
}