You are here

function uc_recurring_admin_charge_form_submit in UC Recurring Payments and Subscriptions 7.2

Same name and namespace in other branches
  1. 6.2 uc_recurring.admin.inc \uc_recurring_admin_charge_form_submit()
  2. 6 uc_recurring.admin.inc \uc_recurring_admin_charge_form_submit()

@todo Please document this function.

See also

http://drupal.org/node/1354

File

./uc_recurring.admin.inc, line 155
Recurring payments administration page callbacks and form builder functions.

Code

function uc_recurring_admin_charge_form_submit($form, &$form_state) {
  $rfid = $form_state['values']['rfid'];
  $fee = uc_recurring_fee_user_load($rfid);

  // Attempt to renew the charge.
  if (uc_recurring_renew($fee)) {
    drupal_set_message(t('Recurring fee @fee charged successfully.', array(
      '@fee' => $rfid,
    )));
  }
  else {
    drupal_set_message(t('Attempt to charge recurring fee @fee failed.', array(
      '@fee' => $rfid,
    )), 'error');
  }
}