You are here

function uc_2checkout_payment_method in Ubercart 5

Same name and namespace in other branches
  1. 6.2 payment/uc_2checkout/uc_2checkout.module \uc_2checkout_payment_method()

Implementation of hook_payment_method().

File

payment/uc_2checkout/uc_2checkout.module, line 63
Integrates 2Checkout.com's redirected payment service.

Code

function uc_2checkout_payment_method() {
  $path = base_path() . drupal_get_path('module', 'uc_2checkout');
  $title = variable_get('uc_2checkout_method_title', t('Credit card on a secure server:'));
  $title .= '<br /><img src="' . $path . '/2cocc05.gif" style="position: relative; left: 2.5em;">';
  $methods[] = array(
    'id' => '2checkout',
    'name' => t('2Checkout'),
    'title' => $title,
    'review' => variable_get('uc_2checkout_check', FALSE) ? t('Credit card/eCheck') : t('Credit card'),
    'desc' => t('Redirect to 2Checkout to pay by credit card or eCheck.'),
    'callback' => 'uc_payment_method_2checkout',
    'weight' => 3,
    'checkout' => TRUE,
    'no_gateway' => TRUE,
  );
  return $methods;
}