You are here

function uc_credit_terminal in Ubercart 6.2

Same name and namespace in other branches
  1. 5 payment/uc_credit/uc_credit.module \uc_credit_terminal()
  2. 7.3 payment/uc_credit/uc_credit.admin.inc \uc_credit_terminal()

Displays the credit card terminal page.

1 string reference to 'uc_credit_terminal'
uc_credit_menu in payment/uc_credit/uc_credit.module
Implements hook_menu().

File

payment/uc_credit/uc_credit.admin.inc, line 11
Credit administration menu items.

Code

function uc_credit_terminal($order) {
  $output = l(t('Return to order view screen.'), 'admin/store/orders/' . $order->order_id);
  $output .= '<p>' . t('Use this terminal to process credit card payments through your default gateway.') . '</p>';
  if (!variable_get('uc_credit_debug', FALSE) || variable_get('uc_credit_checkout_process', TRUE)) {
    $output .= '<p>' . t('Be warned that credit card data will automatically be converted to the last 4 digits of the card once a transaction has occurred.  As such, subsequent charges after a partial payment will not have any stored credit card information to use.') . '</p>';
  }
  $context = array(
    'revision' => 'formatted-original',
    'type' => 'order_total',
    'subject' => array(
      'order' => $order,
    ),
  );
  $output .= '<div><strong>' . t('Order total: @total', array(
    '@total' => uc_price($order->order_total, $context),
  )) . '</strong></div>' . '<div><strong>' . t('Balance: @balance', array(
    '@balance' => uc_price(uc_payment_balance($order), $context),
  )) . '</strong></div>';
  $output .= drupal_get_form('uc_credit_terminal_form', $order);
  return $output;
}