function uc_authorizenet_arb_admin_update_form_submit in Ubercart 5
Same name and namespace in other branches
- 6.2 payment/uc_authorizenet/uc_authorizenet.admin.inc \uc_authorizenet_arb_admin_update_form_submit()
File
- payment/
uc_authorizenet/ uc_authorizenet.module, line 995 - Process payments using Authorize.net. Supports AIM and ARB.
Code
function uc_authorizenet_arb_admin_update_form_submit($form_id, $form_values) {
$fee = uc_recurring_fee_load('user', $form_values['rfid']);
$updates = array(
'payment' => array(
'creditCard' => array(
'cardNumber' => $form_values['cc_data']['cc_number'],
'expirationDate' => $form_values['cc_data']['cc_exp_year'] . '-' . $form_values['cc_data']['cc_exp_month'],
),
),
);
$result = uc_authorizenet_arb_update($fee['data'], $updates, $fee['order_id']);
// If the update was successful...
if ($result) {
drupal_set_message(t('Subscription data updated at Authorize.Net.'));
}
else {
drupal_set_message(t('Subscription update failed. See order admin comments for more details.'), 'error');
}
return 'admin/store/orders/recurring';
}