function uc_paypal_ec_submit in Ubercart 6.2
Same name and namespace in other branches
- 5 payment/uc_paypal/uc_paypal.module \uc_paypal_ec_submit()
- 7.3 payment/uc_paypal/uc_paypal.pages.inc \uc_paypal_ec_submit()
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 387 - 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');
$output = '<div>' . theme('cart_review_table', FALSE) . '</div>';
$output .= uc_order_pane_line_items('customer', $order);
$output .= '<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>';
$output .= drupal_get_form('uc_paypal_ec_submit_form');
return $output;
}