Commit f7d2d4f2 authored by balis_m's avatar balis_m Committed by bserem

Issue #2203957 by balis_m, pinkonomy: Add explanation text when selecting Winbank payment

parent 1ed368b8
......@@ -103,6 +103,7 @@ function commerce_winbank_redirect_settings_form($settings = NULL) {
'allow_installments' => FALSE,
'max_installments' => 0,
'currency_code' => in_array($default_currency, array_keys(commerce_winbank_redirect_available_currencies())) ? $default_currency : 'EUR',
'payment_method_description' => 'Continue with checkout to complete payment via Winbank Paycenter',
);
$form['merchant_id'] = array(
......@@ -165,10 +166,32 @@ function commerce_winbank_redirect_settings_form($settings = NULL) {
'#options' => $cur,
'#default_value' => $settings['currency_code'],
);
$form['payment_method_description'] = array(
'#type' => 'textarea',
'#title' => t('Payment method description'),
'#required' => TRUE,
'#default_value' => $settings['payment_method_description'],
);
return $form;
}
/**
* Payment method callback: submit form.
*/
function commerce_winbank_redirect_submit_form($payment_method, $pane_values, $checkout_pane, $order) {
$form = array();
if (!empty($payment_method['settings']['payment_method_description'])) {
$form['commerce_winbank_redirect_description'] = array(
'#markup' => t($payment_method['settings']['payment_method_description'])
);
}
return $form;
}
/**
* Implements hook_redirect_form().
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment