function pay_method_gateway::payment_types in Pay 6
Same name and namespace in other branches
- 7 includes/handlers/pay_method_gateway.inc \pay_method_gateway::payment_types()
2 calls to pay_method_gateway::payment_types()
- pay_method_gateway::form in includes/
handlers/ pay_method_gateway.inc - pay_method_gateway::settings_form in includes/
handlers/ pay_method_gateway.inc
File
- includes/
handlers/ pay_method_gateway.inc, line 323 - The base class for credit card payment activities.
Class
- pay_method_gateway
- @file The base class for credit card payment activities.
Code
function payment_types($filter = NULL) {
$payment_types = array();
if ($this->gateway_supports_cc) {
$payment_types = array(
'visa' => t('Visa'),
'mc' => t('Mastercard'),
'amex' => t('American Express'),
'discover' => t('Discover'),
'diners' => t("Diner's Club"),
'laser' => t('Laser'),
'maestro' => t('Maestro'),
'switch' => t('Switch'),
'solo' => t('Solo'),
);
}
if ($this->gateway_supports_ach) {
// TODO this is a stub. We need to build the echeck form and validation
// functions for this to be relevant. Thus it's commented out for now.
//$payment_types['ach'] = t('Online checking transfer.');
}
if ($filter) {
foreach ($payment_types as $key => $label) {
if (!$filter[$key]) {
unset($payment_types[$key]);
}
}
}
return $payment_types;
}