function commerce_payflow_cardtype_name in Commerce PayPal 7.2
Returns the name of the credit card type matching the CARDTYPE value.
1 call to commerce_payflow_cardtype_name()
- commerce_payflow_link_redirect_form_submit in modules/
payflow/ commerce_payflow.module - Payment method callback: redirect form return submission.
File
- modules/
payflow/ commerce_payflow.module, line 1577 - Implements PayPal Payments Advanced (U.S. only) and Payflow Link Hosted Checkout pages and Transparent Redirect.
Code
function commerce_payflow_cardtype_name($cardtype) {
switch (intval($cardtype)) {
case 0:
return t('Visa');
case 1:
return t('MasterCard');
case 2:
return t('Discover');
case 3:
return t('American Express');
case 4:
return t("Diner's Club");
case 5:
return t('JCB');
default:
return t('Credit card');
}
}