We use Ubercart for most of our basic and complex e-commerce requirements.
Recently, our client required that the CC number should not be displayed in full on the final review order page. After a lot of Googling this what we finally did:
1. In the file: sites/all/modules/ubercart/payment/uc_credit/uc_credit.module
2. inside funtion uc_payment_method_credit() find this line of code at around line number 521 case ‘cart-review’
3. In this case statement you will find a line like this:
$review[] = array(’title’ => t(’Card Number’), ‘data’ => uc_credit_display_number($arg1->payment_details['cc_number']));
4. uc_credit_display_number() function takes a second paramter called mask (by default it is FALSE). Pass TRUE as this second parameter. So, now your code should look like this:
$review[] = array(’title’ => t(’Card Number’), ‘data’ => uc_credit_display_number($arg1->payment_details['cc_number'], TRUE));
Thats it!
On your review page the credit card number should be masked showing only the last for digits.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment