Author: lektran
Date: Fri May 30 05:13:29 2008
New Revision: 661677
URL:
http://svn.apache.org/viewvc?rev=661677&view=revLog:
Applied patch from Raj Saini OFBIZ-1812, added additional support for Visa Electron card numbers
Modified:
ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilValidate.java
Modified: ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilValidate.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilValidate.java?rev=661677&r1=661676&r2=661677&view=diff==============================================================================
--- ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilValidate.java (original)
+++ ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilValidate.java Fri May 30 05:13:29 2008
@@ -1149,8 +1149,15 @@
*/
public static boolean isVisaElectron(String cc) {
String first6digs = cc.substring(0, 6);
+ String first4digs = cc.substring(0, 4);
- if ((cc.length() == 16) && (first6digs.equals("417500")))
+ if ((cc.length() == 16) &&
+ (first6digs.equals("417500") ||
+ first4digs.equals("4917") ||
+ first4digs.equals("4913") ||
+ first4digs.equals("4508") ||
+ first4digs.equals("4844") ||
+ first4digs.equals("4027")))
return isCreditCard(cc);
return false;
}