You are here

function uc_paypal_menu in Ubercart 5

Same name and namespace in other branches
  1. 6.2 payment/uc_paypal/uc_paypal.module \uc_paypal_menu()
  2. 7.3 payment/uc_paypal/uc_paypal.module \uc_paypal_menu()

Implementation of hook_menu().

File

payment/uc_paypal/uc_paypal.module, line 28
Integrates various PayPal payment services and Instant Payment Notifications (IPN) with Ubercart!

Code

function uc_paypal_menu($may_cache) {
  if ($may_cache) {

    // Always accessible, helps for testing while site is offline.
    $items[] = array(
      'path' => 'uc_paypal/ipn',
      'title' => t('PayPal IPN'),
      'callback' => 'uc_paypal_ipn',
      'access' => TRUE,
      'type' => MENU_CALLBACK,
    );

    // Callback functions for Express Checkout.
    $items[] = array(
      'path' => 'cart/echeckout/selected',
      'title' => t('Review order'),
      'callback' => 'uc_paypal_ec_review_redirect',
      'access' => user_access('access content'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'cart/echeckout/review',
      'title' => t('Review payment'),
      'callback' => 'uc_paypal_ec_review',
      'access' => user_access('access content'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'cart/echeckout/submit',
      'title' => t('Submit order'),
      'callback' => 'uc_paypal_ec_submit',
      'access' => user_access('access content'),
      'type' => MENU_CALLBACK,
    );

    // Callback functions for Website Payments Standard.
    $items[] = array(
      'path' => 'uc_paypal/wps/complete',
      'title' => t('PayPal payment complete'),
      'callback' => 'uc_paypal_complete',
      'access' => user_access('access content'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'uc_paypal/wps/cancel',
      'title' => t('PayPal payment cancelled'),
      'callback' => 'uc_paypal_cancel',
      'access' => user_access('access content'),
      'type' => MENU_CALLBACK,
    );
  }
  return $items;
}