function commerce_paypal_checkout_menu in Commerce PayPal 7.2
Implements hook_menu().
File
- modules/
checkout/ commerce_paypal_checkout.module, line 11 - Implements PayPal Checkout in Drupal Commerce checkout.
Code
function commerce_paypal_checkout_menu() {
return array(
// Add a menu item for capturing authorizations.
'admin/commerce/orders/%commerce_order/payment/%commerce_payment_transaction/paypal-checkout-capture' => array(
'title' => 'Capture',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'commerce_paypal_checkout_capture_form',
3,
5,
),
'access callback' => 'commerce_paypal_checkout_capture_void_access',
'access arguments' => array(
3,
5,
),
'type' => MENU_DEFAULT_LOCAL_TASK,
'context' => MENU_CONTEXT_INLINE,
'weight' => 2,
'file' => 'includes/commerce_paypal_checkout.admin.inc',
),
// Add a menu item for voiding authorizations.
'admin/commerce/orders/%commerce_order/payment/%commerce_payment_transaction/paypal-checkout-void' => array(
'title' => 'Void',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'commerce_paypal_checkout_void_form',
3,
5,
),
'access callback' => 'commerce_paypal_checkout_capture_void_access',
'access arguments' => array(
3,
5,
),
'type' => MENU_DEFAULT_LOCAL_TASK,
'context' => MENU_CONTEXT_INLINE,
'weight' => 4,
'file' => 'includes/commerce_paypal_checkout.admin.inc',
),
// Add a menu item for refunding settled transactions.
'admin/commerce/orders/%commerce_order/payment/%commerce_payment_transaction/paypal-checkout-refund' => array(
'title' => 'Refund',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'commerce_paypal_checkout_refund_form',
3,
5,
),
'access callback' => 'commerce_paypal_checkout_refund_access',
'access arguments' => array(
3,
5,
),
'type' => MENU_DEFAULT_LOCAL_TASK,
'context' => MENU_CONTEXT_INLINE,
'weight' => 4,
'file' => 'includes/commerce_paypal_checkout.admin.inc',
),
'commerce-paypal-checkout/create-order/%commerce_order/%commerce_paypal_checkout_method_instance' => array(
'page callback' => 'commerce_paypal_checkout_create_order',
'page arguments' => array(
2,
3,
),
'access callback' => 'commerce_checkout_access',
'access arguments' => array(
2,
),
'type' => MENU_CALLBACK,
),
'commerce-paypal-checkout/approve-order/%commerce_order/%commerce_paypal_checkout_method_instance/%' => array(
'page callback' => 'commerce_paypal_checkout_approve_order',
'page arguments' => array(
2,
3,
4,
),
'access callback' => 'commerce_checkout_access',
'access arguments' => array(
2,
),
'type' => MENU_CALLBACK,
),
);
}