function uc_credit_display_number in Ubercart 7.3
Same name and namespace in other branches
- 5 payment/uc_credit/uc_credit.module \uc_credit_display_number()
- 6.2 payment/uc_credit/uc_credit.module \uc_credit_display_number()
Returns a credit card number with appropriate masking.
1 call to uc_credit_display_number()
- uc_payment_method_credit in payment/
uc_credit/ uc_credit.module - Callback function for the Credit Card payment method.
File
- payment/
uc_credit/ uc_credit.module, line 725 - Defines the credit card payment method and hooks in payment gateways.
Code
function uc_credit_display_number($number) {
if (strlen($number) == 4) {
return t('(Last 4) ') . $number;
}
return str_repeat('-', 12) . substr($number, -4);
}