You are here

function commerce_stripe_pi_menu in Commerce Stripe Payment Intent 7

Implements hook_menu().

File

./commerce_stripe_pi.module, line 32
Payment intent stripe payment integration.

Code

function commerce_stripe_pi_menu() {
  $items = array();

  // Add a menu item to stripe payment transactions that can be refunded.
  $items['admin/commerce/orders/%commerce_order/payment/%commerce_payment_transaction/commerce-stripe-pi-refund'] = array(
    'title' => 'Refund',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'commerce_stripe_pi_refund_form',
      3,
      5,
    ),
    'access callback' => 'commerce_stripe_pi_return_access',
    'access arguments' => array(
      3,
      5,
    ),
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'context' => MENU_CONTEXT_INLINE,
    'weight' => 1,
    'file' => 'includes/commerce_stripe_pi.admin.inc',
  );
  $items['admin/commerce/orders/%commerce_order/payment/%commerce_payment_transaction/stripe-pi-capture'] = array(
    'title' => 'Capture',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'commerce_stripe_pi_capture_form',
      3,
      5,
    ),
    'access callback' => 'commerce_stripe_pi_capture_access',
    'access arguments' => array(
      3,
      5,
    ),
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'context' => MENU_CONTEXT_INLINE,
    'weight' => 2,
    'file' => 'includes/commerce_stripe_pi.admin.inc',
  );
  $items['admin/commerce/orders/%commerce_order/payment/%commerce_payment_transaction/stripe-pi-void'] = array(
    'title' => 'Void',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'commerce_stripe_pi_void_form',
      3,
      5,
    ),
    'access callback' => 'commerce_stripe_pi_void_access',
    'access arguments' => array(
      3,
      5,
    ),
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'context' => MENU_CONTEXT_INLINE,
    'weight' => 2,
    'file' => 'includes/commerce_stripe_pi.admin.inc',
  );
  $items['commerce_stripe_pi/webhook'] = array(
    'page callback' => 'commerce_stripe_pi_webhook',
    'page arguments' => array(
      2,
    ),
    // This will be called by external server, so there is no restrictions.
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
  );
  return $items;
}