function _uc_recurring_uc_authorizenet_cim_paymentprofile_update_request in UC Recurring Payments and Subscriptions 6.2
Same name and namespace in other branches
- 7.2 includes/uc_recurring.uc_authorizenet.inc \_uc_recurring_uc_authorizenet_cim_paymentprofile_update_request()
TODO: This function needs to be moved to the uc_authorizenet module and renamed to: _uc_authorizenet_cim_paymentprofile_update_request($order, $ref_id)
1 call to _uc_recurring_uc_authorizenet_cim_paymentprofile_update_request()
- _uc_recurring_uc_authorizenet_cim_update_paymentprofile in includes/
uc_recurring.uc_authorizenet.inc - TODO: This function needs to be moved to the uc_authorizenet module and renamed to: uc_authorizenet_cim_update_paymentprofile($order, $ref_id)
File
- includes/
uc_recurring.uc_authorizenet.inc, line 298 - Uc recurring implementation for the test gateway module.
Code
function _uc_recurring_uc_authorizenet_cim_paymentprofile_update_request($order, $ref_id) {
$profile = _uc_authorizenet_cim_profile_get($order, $ref_id);
if ($profile['resultCode'] == 'Error') {
return $profile;
}
else {
$request = array(
'refId' => substr($order->order_id . '-' . time(), 0, 20),
'customerProfileId' => $profile['customerProfileId'],
'paymentProfile' => 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),
),
),
'customerPaymentProfileId' => $profile['customerPaymentProfileId'],
),
);
return $request;
}
}