function commerce_robokassa_settings_form in Commerce robokassa 7.2
Same name and namespace in other branches
- 7 includes/commerce_robokassa.admin.inc \commerce_robokassa_settings_form()
Payment method callback: settings form.
Parameters
mixed $settings: Payment method instance settings.
Return value
array Settings form array.
File
- ./
commerce_robokassa.module, line 335 - Drupal Commerce Robokassa payment method.
Code
function commerce_robokassa_settings_form($settings = NULL) {
$form = array();
$settings = (array) $settings + commerce_robokassa_default_settings();
$form['MrchLogin'] = array(
'#type' => 'textfield',
'#title' => t('login'),
'#description' => t('Your robokassa login'),
'#default_value' => $settings['MrchLogin'],
'#required' => TRUE,
);
$form['pass1'] = array(
'#type' => 'textfield',
'#title' => t('First password'),
'#description' => t('Password 1'),
'#default_value' => $settings['pass1'],
'#required' => TRUE,
);
$form['pass2'] = array(
'#type' => 'textfield',
'#title' => t('Second password'),
'#description' => t('Password 2'),
'#default_value' => $settings['pass2'],
'#required' => TRUE,
);
$form['server'] = array(
'#type' => 'radios',
'#title' => t('Robokassa server'),
'#options' => array(
'test' => t('Test - use for testing.'),
'live' => t('Live - use for processing real transactions'),
),
'#default_value' => $settings['server'],
'#required' => TRUE,
);
$form['hash_type'] = array(
'#type' => 'radios',
'#title' => t('Hash type'),
'#options' => array(
'md5' => 'md5',
'ripemd160' => 'ripemd160',
'sha1' => 'sha1',
'sha256' => 'sha256',
'sha384' => 'sha384',
'sha512' => 'sha512',
),
'#default_value' => $settings['hash_type'],
'#required' => TRUE,
);
$form['allowed_currencies'] = array(
'#type' => 'checkboxes',
'#title' => t('Currencies'),
'#options' => commerce_robokassa_payment_methods_list($settings),
'#default_value' => $settings['allowed_currencies'],
);
$form['show_robokassa_fee_message'] = array(
'#type' => 'checkbox',
'#title' => t('Show robokassa fee message'),
'#default_value' => $settings['show_robokassa_fee_message'],
);
return $form;
}