function commerce_cop_edit_payment_form_submit in Commerce Custom Offline Payments 7
_state
Parameters
type $form:
File
- ./
commerce_cop.admin.inc, line 129 - Custom offline payment methods for Drupal Commerce.
Code
function commerce_cop_edit_payment_form_submit($form, &$form_state) {
$v = $form_state['values'];
$record = $v;
$record['title'] = filter_xss_admin($v['title']);
$record['description'] = filter_xss_admin($v['description']);
$record['information'] = filter_xss_admin($v['information']['value']);
$record['format'] = $v['information']['format'];
if (commerce_cop_payment_save($record)) {
drupal_set_message(t('The payment has been saved'));
$form_state['redirect'] = 'admin/commerce/config/custom-offline-payments';
if (module_exists('commerce_payment_fields')) {
//@to do deep integration with Drupal Commerce Payment Transaction Fields module.
entity_info_cache_clear();
menu_rebuild();
}
}
}