You are here

function uc_payment_method_cybersource_hop in Ubercart 7.3

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

Payment method callback.

1 string reference to 'uc_payment_method_cybersource_hop'
uc_cybersource_payment_method in payment/uc_cybersource/uc_cybersource.module
Defines payment method properties.

File

payment/uc_cybersource/uc_cybersource.module, line 364
A module used for CyberSource's Silent Order POST and Hosted Order Page methods of payment.

Code

function uc_payment_method_cybersource_hop($op, &$order) {
  if ($op == 'settings') {
    $form['uc_cybersource_hop_server'] = array(
      '#type' => 'select',
      '#title' => t('CyberSource HOP server'),
      '#description' => t('Select between production/live or test mode.'),
      '#options' => array(
        'https://orderpagetest.ic3.com/hop/orderform.jsp' => t('Test Center'),
        'https://orderpage.ic3.com/hop/orderform.jsp' => t('Production/Live'),
      ),
      '#default_value' => variable_get('uc_cybersource_hop_server', 'https://orderpagetest.ic3.com/hop/orderform.jsp'),
    );
    $form['uc_cybersource_hop_transaction_type'] = array(
      '#type' => 'radios',
      '#title' => t('CyberSource transaction type'),
      '#description' => t('Authorize and settle, or authorize only for capture on CyberSource.com'),
      '#options' => array(
        'authorization' => t('Authorize only'),
        'sale' => t('Authorize and capture'),
      ),
      '#default_value' => variable_get('uc_cybersource_hop_transaction_type', 'sale'),
    );
    $form['uc_cybersource_cs_hop_button_text'] = array(
      '#type' => 'textfield',
      '#title' => t('CyberSource "Buy button" text'),
      '#description' => t('This text appears on the button users press to process their payment on the Hosted Order Page.'),
      '#default_value' => variable_get('uc_cybersource_cs_hop_button_text', t('Process payment')),
    );
    return $form;
  }
}