function commerce_sermepa_get_icons in Commerce sermepa 7
Returns an array of Sermepa payment method icon img elements.
Return value
array The array of themed payment method icons keyed by name: visa, mastercard, maestro.
1 call to commerce_sermepa_get_icons()
File
- ./
commerce_sermepa.module, line 93 - Provides a payment method for Drupal Commerce using Sermepa/Redsys gateway.
Code
function commerce_sermepa_get_icons() {
$icons = array();
$payment_methods = array(
'mastercard' => t('MasterCard'),
'visa' => t('Visa'),
'maestro' => t('Maestro'),
'sermepa_redsys' => t('Redsýs'),
);
foreach ($payment_methods as $name => $title) {
$variables = array(
'path' => drupal_get_path('module', 'commerce_sermepa') . '/images/' . $name . '.png',
'title' => $title,
'alt' => $title,
'attributes' => array(
'class' => array(
'commerce-sermepa-icon',
),
),
);
$icons[$name] = theme('image', $variables);
}
return $icons;
}