function commerce_checkout_complete_form_submit in Commerce Core 7
Form submit callback for commerce_checkout_complete_form().
File
- modules/
checkout/ includes/ commerce_checkout.admin.inc, line 440 - Administrative callbacks for the Checkout module.
Code
function commerce_checkout_complete_form_submit($form, &$form_state) {
if ($order = commerce_order_load($form_state['values']['order_id'])) {
commerce_checkout_complete($order);
drupal_set_message(t('Checkout completion rules have been executed for the order.'));
$form_state['redirect'] = 'admin/commerce/orders/' . $order->order_id . '/edit';
}
else {
drupal_set_message(t('Order not found.'), 'error');
$form_state['redirect'] = 'admin/commerce/orders';
}
}