function _uc_paypal_card_type in Ubercart 7.3
Same name and namespace in other branches
- 5 payment/uc_paypal/uc_paypal.module \_uc_paypal_card_type()
- 6.2 payment/uc_paypal/uc_paypal.module \_uc_paypal_card_type()
Returns the PayPal approved credit card type for a card number.
1 call to _uc_paypal_card_type()
- uc_paypal_wpp_charge in payment/
uc_paypal/ uc_paypal.module - Processes a credit card payment through Website Payments Pro.
File
- payment/
uc_paypal/ uc_paypal.module, line 1029 - 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;
}