You are here

function uc_recurring_admin_charge_form 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()
  2. 6 uc_recurring.admin.inc \uc_recurring_admin_charge_form()

Confirm a recurring fee charge.

Parameters

$form_state:

$uid:

Return value

unknown_type

1 string reference to 'uc_recurring_admin_charge_form'
uc_recurring_recurring_info in ./uc_recurring.module
Implements hook_recurring_info().

File

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

Code

function uc_recurring_admin_charge_form($form, $form_state, $rfid, $fee_handler) {
  $fee = uc_recurring_fee_user_load($rfid);
  if ($fee->fee_handler == $fee_handler) {
    $form['rfid'] = array(
      '#type' => 'hidden',
      '#value' => $rfid,
    );
    $form['message'] = array(
      '#markup' => '<div>' . t('Are you sure you want to charge the customer !amount at this time?', array(
        '!amount' => theme('uc_price', array(
          'price' => $fee->fee_amount,
        )),
      )) . '</div>',
    );
    $form['submit'] = array(
      '#type' => 'submit',
      '#value' => t('Process Renewal'),
      '#suffix' => l(t('Cancel'), request_uri()),
    );
    return $form;
  }
  else {
    drupal_set_message(t('Invalid fee handler was given, try again from the operations for this <a href="@url">recurring fee</a>, if problem persists contact the site administrator.', array(
      '@url' => url(request_uri()),
    )), 'error');
  }
}