function commerce_square_capture_form in Commerce Square Connect 7
Form callback: allows the user to capture a prior authorization.
1 string reference to 'commerce_square_capture_form'
- commerce_square_menu in ./
commerce_square.module - Implements hook_menu().
File
- includes/
commerce_square.admin.inc, line 16 - Provides admin menu callbacks for Commerce Square.
Code
function commerce_square_capture_form($form, &$form_state, $order, $transaction) {
$form_state['order'] = $order;
$form_state['transaction'] = $transaction;
// Load and store the payment method instance for this transaction.
$payment_method = commerce_payment_method_instance_load($transaction->instance_id);
$form_state['payment_method'] = $payment_method;
$form = confirm_form($form, t('Are you sure you want to capture this transaction?'), 'admin/commerce/orders/' . $order->order_id . '/payment', '', t('Capture'), t('Cancel'), 'confirm');
return $form;
}