You are here

function payment_ubercart_callback in Payment for Ubercart 7

Same name and namespace in other branches
  1. 7.2 payment_ubercart.module \payment_ubercart_callback()

Implements Ubercart payment method callback.

See also

payment_ubercart_uc_payment_method()

1 string reference to 'payment_ubercart_callback'
payment_ubercart_uc_payment_method in ./payment_ubercart.module
Implements hook_uc_payment_method().

File

./payment_ubercart.module, line 182
Hook implementations and shared functions.

Code

function payment_ubercart_callback($op, &$order, array $form = NULL, array &$form_state = NULL) {
  if ($op == 'cart-details') {
    $payment = payment_ubercart_payment_create($order);

    // Build the form.
    $form_state['payment'] = $payment;
    $form = payment_form_embedded($form_state, $payment, array(
      $payment->method->pmid,
    ));
    unset($form['elements']['payment_method']['#title']);
    unset($form['elements']['payment_line_items']);
    unset($form['elements']['payment_status']);
    return $form['elements'];
  }
}