function uc_credit_terminal in Ubercart 5
Same name and namespace in other branches
- 6.2 payment/uc_credit/uc_credit.admin.inc \uc_credit_terminal()
- 7.3 payment/uc_credit/uc_credit.admin.inc \uc_credit_terminal()
1 string reference to 'uc_credit_terminal'
- uc_credit_menu in payment/
uc_credit/ uc_credit.module - Implementation of hook_menu().
File
- payment/
uc_credit/ uc_credit.module, line 1219 - Defines the credit card payment method and hooks in payment gateways.
Code
function uc_credit_terminal($order_id) {
$order = uc_order_load($order_id);
if ($order === FALSE) {
drupal_set_message(t('Order @order_id does not exist.', array(
'@order_id' => $order_id,
)));
drupal_goto('admin/store/orders');
}
$output = l(t('Return to order view screen.'), 'admin/store/orders/' . $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>';
}
$output .= '<div><strong>' . t('Order total: @total', array(
'@total' => uc_currency_format($order->order_total),
)) . '</strong></div>' . '<div><strong>' . t('Balance: @balance', array(
'@balance' => uc_currency_format(uc_payment_balance($order)),
)) . '</strong></div>';
$output .= drupal_get_form('uc_credit_terminal_form', $order, $balance);
return $output;
}