comtersoft » Ubercart
Call us today at US: 703 - 349 - 1168 | India: +91 471 - 301 0690

Ubercart - Mask credit card number on review page

Posted on August 2nd, 2009 in ubercart | No Comments »

 

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.

Ubercart credit Card Mask On Review Page

Ubercart credit Card Mask On Review Page

Ubercart for Drupal- Know how!

Posted on July 9th, 2009 in Developers Lounge, Drupal | No Comments »

 

Ubercart is a e-commerce module suite for Drupal which consists of set of modules designed to allow you to run a store on your Drupal site. All front end modules are integrable and  configurable using drupal modules.Development has been driven by two major emphases: flexibility and usability. The various systems driving Ubercart, including the product catalog,shopping cart and checkout, order, shipping, and payment systems have all beendesigned to be extended to meet any need. Furthermore, the administrative interface, particularly relating to processing and fulfilling orders, has been designed for ease of use and efficient display of information.

It is a great solution for stores that selling physical products.

Ubercart is being sponsored and developed by the team at

http://www.ubercart.org

Sign up for site access to join the Ubercart community

and take advantage of our forums and issue tracking.

Features overview:

http://www.ubercart.org/what_is_ubercart

Screenshots:

http://www.ubercart.org/screenshots

User’s and Developer’s Guides:

http://www.ubercart.org/docs

Installation Manual (with module descriptions):

http://www.ubercart.org/docs/user/90/installing_ubercart

Support forums:

http://www.ubercart.org/forum

The secret of getting ahead is getting started. ComterSoft is the starting point