You are here

function payment_test_form_payment_amount in Payment 7

Implements form build callback: show a payment_amount element.

1 string reference to 'payment_test_form_payment_amount'
payment_test_menu in tests/payment_test/payment_test.module
Implements hook_menu().

File

tests/payment_test/payment_test.module, line 145
Hook implementations and shared functions.

Code

function payment_test_form_payment_amount(array $form, array &$form_state) {
  $form['#submit'] = array(
    'payment_test_form_payment_element',
  );
  $form['amount'] = array(
    '#type' => 'payment_amount',
    '#currency_code' => 'XXX',
  );
  if (arg(1)) {
    $form['amount']['#minimum_amount'] = (double) arg(1);
  }
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Submit'),
  );
  return $form;
}