function _uc_paypal_card_type in Ubercart 5
Same name and namespace in other branches
- 6.2 payment/uc_paypal/uc_paypal.module \_uc_paypal_card_type()
- 7.3 payment/uc_paypal/uc_paypal.module \_uc_paypal_card_type()
1 call to _uc_paypal_card_type()
- uc_paypal_wpp_charge in payment/
uc_paypal/ uc_paypal.module
File
- payment/
uc_paypal/ uc_paypal.module, line 1391 - Integrates various PayPal payment services and Instant Payment Notifications (IPN) with Ubercart!
Code
function _uc_paypal_card_type($cc_number) {
switch (substr(strval($cc_number), 0, 1)) {
case '3':
return 'Amex';
case '4':
return 'Visa';
case '5':
return 'MasterCard';
case '6':
return 'Discover';
}
return FALSE;
}