function pay_method_delete_confirm_submit in Pay 7
Process payment method delete confirm submissions.
File
- includes/
pay.admin.inc, line 314 - Administration form settings and related functions.
Code
function pay_method_delete_confirm_submit($form, &$form_state) {
$pay_method = pay_method_load($form_state['values']['pmid']);
// The delete method will automatically revert to disable.
$pay_method
->delete();
$t_args = array(
'%name' => $pay_method
->title(),
);
drupal_set_message(t('The payment method %name has been deleted.', $t_args));
watchdog('menu', 'Deleted payment method %name.', $t_args, WATCHDOG_NOTICE);
menu_rebuild();
$form_state['redirect'] = 'admin/config/pay/method';
return;
}