public static function CommercePaymentCreditCard::getTypeLabels in Commerce Core 7
Gets the labels of all available credit card types.
Return value
array The labels, keyed by ID.
1 call to CommercePaymentCreditCard::getTypeLabels()
- commerce_payment_credit_card_types in modules/
payment/ includes/ commerce_payment.credit_card.inc - Returns an associative array of credit card types.
File
- modules/
payment/ includes/ commerce_payment.credit_card.inc, line 496 - Credit-card helper functions for Drupal commerce.
Class
- CommercePaymentCreditCard
- Provides logic for listing card types and validating card details.
Code
public static function getTypeLabels() {
$type_labels = array();
foreach (self::getTypes() as $type) {
$type_labels[$type['id']] = $type['label'];
}
return $type_labels;
}