function uc_paypal_ec_submit in Ubercart 7.3
Same name and namespace in other branches
- 5 payment/uc_paypal/uc_paypal.module \uc_paypal_ec_submit()
- 6.2 payment/uc_paypal/uc_paypal.pages.inc \uc_paypal_ec_submit()
Presents the final total to the user for checkout!
1 string reference to 'uc_paypal_ec_submit'
- uc_paypal_menu in payment/
uc_paypal/ uc_paypal.module - Implements hook_menu().
File
- payment/
uc_paypal/ uc_paypal.pages.inc, line 382 - 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');
$build['review'] = array(
'#theme' => 'uc_cart_review_table',
'#items' => $order->products,
'#show_subtotal' => FALSE,
);
$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;
}