uc_paypal_ec_submit
Drupal 7 uc_paypal_ec_submit()
Presents the final total to the user for checkout!
1 string reference to 'uc_paypal_ec_submit'
File
- sites/
all/ modules/ ubercart/ payment/ uc_paypal/ uc_paypal.pages.inc, line 377 - Paypal administration menu items.
Code
function uc_paypal_ec_submit() {
if (!isset($_SESSION['TOKEN']) || ($order = uc_order_load($_SESSION['cart_order'])) == FALSE) {
unset($_SESSION['cart_order'], $_SESSION['have_details']);
unset($_SESSION['TOKEN'], $_SESSION['PAYERID']);
drupal_set_message(t('An error has occurred in your PayPal payment. Please review your cart and try again.'));
drupal_goto('cart');
}
drupal_add_css(drupal_get_path('module', 'uc_cart') . '/uc_cart.css');
$items = uc_cart_get_contents();
$build['review'] = array(
'#theme' => 'uc_cart_review_table',
'#items' => $items,
'#show_subtotal' => FALSE,
'#prefix' => '<div>',
'#suffix' => '</div>',
);
$build['line_items'] = uc_order_pane_line_items('customer', $order);
$build['instructions'] = array('#markup' => '<p>' . t("Your order is not complete until you click the 'Submit order' button below. Your PayPal account will be charged for the amount shown above once your order is placed. You will receive confirmation once your payment is complete.") . '</p>');
$build['submit_form'] = drupal_get_form('uc_paypal_ec_submit_form');
return $build;
}

