function _uc_authorizenet_cim_profile_create_request in Ubercart 5
Same name and namespace in other branches
- 8.4 payment/uc_authorizenet/uc_authorizenet.module \_uc_authorizenet_cim_profile_create_request()
- 6.2 payment/uc_authorizenet/uc_authorizenet.module \_uc_authorizenet_cim_profile_create_request()
- 7.3 payment/uc_authorizenet/uc_authorizenet.module \_uc_authorizenet_cim_profile_create_request()
Helper to create the CIM profile creation request.
1 call to _uc_authorizenet_cim_profile_create_request()
- _uc_authorizenet_cim_profile_create in payment/
uc_authorizenet/ uc_authorizenet.module - Create a CIM profile using an order's data.
File
- payment/
uc_authorizenet/ uc_authorizenet.module, line 294 - Process payments using Authorize.net. Supports AIM and ARB.
Code
function _uc_authorizenet_cim_profile_create_request($order) {
return array(
'refId' => substr($order->order_id . '-' . time(), 0, 20),
'profile' => array(
'merchantCustomerId' => substr($order->uid, 0, 20),
'description' => substr(t('Order @order taking place at @date', array(
'@order' => $order->order_id,
'@date' => format_date(time()),
)), 0, 255),
'email' => substr($order->primary_email, 0, 255),
'paymentProfiles' => array(
'billTo' => _uc_authorize_cim_xml_billto($order),
'payment' => array(
'creditCard' => array(
'cardNumber' => $order->payment_details['cc_number'],
'expirationDate' => $order->payment_details['cc_exp_year'] . '-' . str_pad($order->payment_details['cc_exp_month'], 2, '0', STR_PAD_LEFT),
),
),
),
'shipToList' => _uc_authorize_cim_xml_shipto($order),
),
);
}