function commerce_square_menu in Commerce Square Connect 7
Implements hook_menu().
File
- ./
commerce_square.module, line 302 - Module file for Commerce Square.
Code
function commerce_square_menu() {
$items = array();
$items['admin/commerce/config/square'] = array(
'title' => 'Square settings',
'description' => 'Configure Square.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'commerce_square_settings_form',
),
'access arguments' => array(
'administer commerce_square',
),
'file' => 'includes/commerce_square.admin.inc',
);
$items['admin/commerce_square/oauth/obtain'] = array(
'title' => 'Obtain Square Merchant Token',
'page callback' => 'commerce_square_obtain_token',
'access callback' => 'commerce_square_obtain_token_access',
'type' => MENU_CALLBACK,
);
$items['admin/commerce/orders/%commerce_order/payment/%commerce_payment_transaction/square-capture'] = array(
'title' => 'Capture',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'commerce_square_capture_form',
3,
5,
),
'access callback' => 'commerce_square_payment_transaction_access',
'access arguments' => array(
3,
5,
'capture',
),
'type' => MENU_DEFAULT_LOCAL_TASK,
'context' => MENU_CONTEXT_INLINE,
'file' => 'includes/commerce_square.admin.inc',
'weight' => 10,
);
$items['admin/commerce/orders/%commerce_order/payment/%commerce_payment_transaction/square-void'] = array(
'title' => 'Void',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'commerce_square_void_form',
3,
5,
),
'access callback' => 'commerce_square_payment_transaction_access',
'access arguments' => array(
3,
5,
'void',
),
'type' => MENU_DEFAULT_LOCAL_TASK,
'context' => MENU_CONTEXT_INLINE,
'file' => 'includes/commerce_square.admin.inc',
'weight' => 10,
);
$items['admin/commerce/orders/%commerce_order/payment/%commerce_payment_transaction/square-refund'] = array(
'title' => 'Refund',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'commerce_square_refund_form',
3,
5,
),
'access callback' => 'commerce_square_payment_transaction_access',
'access arguments' => array(
3,
5,
'refund',
),
'type' => MENU_DEFAULT_LOCAL_TASK,
'context' => MENU_CONTEXT_INLINE,
'file' => 'includes/commerce_square.admin.inc',
'weight' => 10,
);
return $items;
}