function _uc_authorize_cim_xml_billto in Ubercart 6.2
Same name and namespace in other branches
- 8.4 payment/uc_authorizenet/uc_authorizenet.module \_uc_authorize_cim_xml_billto()
- 5 payment/uc_authorizenet/uc_authorizenet.module \_uc_authorize_cim_xml_billto()
- 7.3 payment/uc_authorizenet/uc_authorizenet.module \_uc_authorize_cim_xml_billto()
Map an order's billing information to an array for later XML conversion.
1 call to _uc_authorize_cim_xml_billto()
- _uc_authorizenet_cim_profile_create_request in payment/
uc_authorizenet/ uc_authorizenet.module - Helper to create the CIM profile creation request.
File
- payment/
uc_authorizenet/ uc_authorizenet.module, line 1130 - Process 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),
);
}