function commerce_paypal_wpp_card_type in Commerce PayPal 7.2
Same name and namespace in other branches
- 7 modules/wpp/commerce_paypal_wpp.module \commerce_paypal_wpp_card_type()
Returns the value for a credit card type expected by PayPal.
1 call to commerce_paypal_wpp_card_type()
- commerce_paypal_wpp_submit_form_submit in modules/
wpp/ commerce_paypal_wpp.module - Payment method callback: checkout form submission.
File
- modules/
wpp/ commerce_paypal_wpp.module, line 471 - Implements PayPal Website Payments Pro in Drupal Commerce checkout.
Code
function commerce_paypal_wpp_card_type($card_type) {
switch ($card_type) {
case 'visa':
return 'Visa';
case 'mastercard':
return 'MasterCard';
case 'amex':
return 'Amex';
case 'discover':
return 'Discover';
case 'dinersclub':
return 'DinersClub';
case 'jcb':
return 'JCB';
case 'unionpay':
return 'UnionPay';
case 'maestro':
return 'Maestro';
case 'solo':
return 'Solo';
}
}