function commerce_robokassa_submit_form in Commerce robokassa 7.2
Same name and namespace in other branches
- 7 commerce_robokassa.module \commerce_robokassa_submit_form()
Payment method callback: adds a message and CSS to the submission form.
File
- ./
commerce_robokassa.module, line 409 - Drupal Commerce Robokassa payment method.
Code
function commerce_robokassa_submit_form($payment_method, $pane_values, $checkout_pane, $order) {
// @todo add payways list and show payment gateway price per payways
$logo_path = drupal_get_path('module', 'commerce_robokassa') . '/images/logo.png';
$image = array(
'#theme' => 'image',
'#path' => $logo_path,
'#alt' => t('Robokassa'),
'#title' => t('Robokassa'),
);
$form['robokassa_logo'] = array(
'#markup' => '<div class="commerce-robokassa-logo">' . render($image) . '</div>',
);
$selected_currs = !empty($payment_method['settings']['allowed_currencies']) ? array_filter($payment_method['settings']['allowed_currencies']) : array();
if (!empty($selected_currs)) {
$currs = commerce_robokassa_payment_methods_list($payment_method['settings']);
$form['IncCurrLabel'] = array(
'#type' => 'radios',
'#title' => t('Pay via'),
'#options' => array_intersect_key($currs, $selected_currs),
);
}
if ($payment_method['settings']['show_robokassa_fee_message']) {
$form['robokassa_fee_message'] = array(
'#markup' => '<div class="commerce-robokassa-fee-message">' . t('In addition to the order amount robokassa fee can be charged.') . '</div>',
);
}
return $form;
}