You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Raj Saini <ra...@gmail.com> on 2008/05/30 10:45:21 UTC

VisaElectron card type validation in UtilValidate.java

Hi,

While integrating the payment gateway I found and issue with Visa 
Electron card validation. On line 1153 in UtilValidte.java Visa Electron 
cards, number is validated as:

    if ((cc.length() == 16) && (first6digs.equals("417500")))

Whereas the testing cards I have (also my real Visa Electron card) do 
not have their first 6 digits as "417500". Has any one one else been to 
similar situation? Any idea what should be the right CC number pattern?

Thanks,

Raj





Re: VisaElectron card type validation in UtilValidate.java

Posted by Jacques Le Roux <ja...@les7arts.com>.
Hi Raj,

Yes I will do soon (IIRC I wrote the line below)

Thanks

Jacques

From: "Raj Saini" <ra...@gmail.com>
> Hi Scot,
> 
> Thanks for the info. Current validation only support cards starting with 
> 417550. Should we not change the validation to support other variations?
> 
> Thanks,
> 
> Raj
> Scott Gray wrote:
>> Hi Raj
>>
>> Wikipedia says it's these:
>> 417500,4917,4913,4508,4844
>> http://en.wikipedia.org/wiki/Credit_card_numbers
>>
>> Regards
>> Scott
>>
>> 2008/5/30 Raj Saini <ra...@gmail.com>:
>>
>>   
>>> Hi,
>>>
>>> While integrating the payment gateway I found and issue with Visa Electron
>>> card validation. On line 1153 in UtilValidte.java Visa Electron cards,
>>> number is validated as:
>>>
>>>   if ((cc.length() == 16) && (first6digs.equals("417500")))
>>>
>>> Whereas the testing cards I have (also my real Visa Electron card) do not
>>> have their first 6 digits as "417500". Has any one one else been to similar
>>> situation? Any idea what should be the right CC number pattern?
>>>
>>> Thanks,
>>>
>>> Raj
>>>
>>>
>>>
>>>
>>>
>>>     
>>
>>   
>

Re: VisaElectron card type validation in UtilValidate.java

Posted by Jacques Le Roux <ja...@les7arts.com>.
OK, so forget me :o)

Jacques

From: "Raj Saini" <ra...@gmail.com>
> Thanks Scott, I will do this.
> 
> Raj
> Scott Gray wrote:
>> Sounds good to me so I'll do you a deal, you provide the patch and I'll
>> commit it :-)
>>
>> Regards
>> Scott
>>
>> 2008/5/30 Raj Saini <ra...@gmail.com>:
>>
>>   
>>> Hi Scot,
>>>
>>> Thanks for the info. Current validation only support cards starting with
>>> 417550. Should we not change the validation to support other variations?
>>>
>>> Thanks,
>>>
>>> Raj
>>>
>>> Scott Gray wrote:
>>>
>>>     
>>>> Hi Raj
>>>>
>>>> Wikipedia says it's these:
>>>> 417500,4917,4913,4508,4844
>>>> http://en.wikipedia.org/wiki/Credit_card_numbers
>>>>
>>>> Regards
>>>> Scott
>>>>
>>>> 2008/5/30 Raj Saini <ra...@gmail.com>:
>>>>
>>>>
>>>>
>>>>       
>>>>> Hi,
>>>>>
>>>>> While integrating the payment gateway I found and issue with Visa
>>>>> Electron
>>>>> card validation. On line 1153 in UtilValidte.java Visa Electron cards,
>>>>> number is validated as:
>>>>>
>>>>>  if ((cc.length() == 16) && (first6digs.equals("417500")))
>>>>>
>>>>> Whereas the testing cards I have (also my real Visa Electron card) do not
>>>>> have their first 6 digits as "417500". Has any one one else been to
>>>>> similar
>>>>> situation? Any idea what should be the right CC number pattern?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Raj
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>         
>>>>
>>>>       
>>>     
>>
>>   
>

Re: custom ecommerce application

Posted by Eric DE MAULDE <er...@free.fr>.
I just found my respomse in tne previous FAQ point
2nd approach : After copying the 5 files
"then by simply copying/creating the files that need to be changed ... 
controller.xml"

I read too the Widget article
Now I believe I can develop/use some different custom ecommerce applications



> the trunk version has a clone example that would be customizing not 
> custom.
>
>
> Eric DE MAULDE sent the following on 5/30/2008 3:08 AM:
>> Hi,
>>
>> I have read the FAQ "What is considered the best practice in creating a
>> custom web application with OFBiz ?"
>> I havn't very well understood the 3rd paragraph : which approach is
>> linked to "customizing an application" and "custom application" ?
>>
>> My target : work with some custom ecommerce applications up-to-date
>> Are custom and up-to-date compatible ?
>>
>> In both approachs, I start from scratch (I delete entity-resource in
>> applications/ecommerce/ofbiz-component.xml)
>>
>> 1st approach : I copy (with SVK) "applications/ecommerce" to
>> "specialpurpose/myFurnitureEcommerce"
>>                       I modify the files mentionned in the FAQ and I do
>> another changes
>>                       I pull (with SVK) from "applications/ecommerce" to
>> "specialpurpose/myFurnitureEcommerce" one or two times a month in order
>> that my application is up-to-date
>>
>> 2nd approach : Where can I copy the 5 files ? (just the files in the
>> same tree in "specialpurpose/...")
>>                        How can I manage the differences between two
>> custom ecommerce applications ?
>>
>> Could you advice me ?
>> Could you detail the 3rd paragraph ?
>>
>> Thanks
>>
>> Eric
>>
>>
>>
>
>
>
>
> -- 
> No virus found in this incoming message.
> Checked by AVG.
> Version: 7.5.524 / Virus Database: 269.24.3/1472 - Release Date: 
> 29/05/2008 07:27
>
> 


Re: custom ecommerce application

Posted by BJ Freeman <bj...@free-man.net>.
the trunk version has a clone example that would be customizing not custom.


Eric DE MAULDE sent the following on 5/30/2008 3:08 AM:
> Hi,
> 
> I have read the FAQ "What is considered the best practice in creating a
> custom web application with OFBiz ?"
> I havn't very well understood the 3rd paragraph : which approach is
> linked to "customizing an application" and "custom application" ?
> 
> My target : work with some custom ecommerce applications up-to-date
> Are custom and up-to-date compatible ?
> 
> In both approachs, I start from scratch (I delete entity-resource in
> applications/ecommerce/ofbiz-component.xml)
> 
> 1st approach : I copy (with SVK) "applications/ecommerce" to
> "specialpurpose/myFurnitureEcommerce"
>                       I modify the files mentionned in the FAQ and I do
> another changes
>                       I pull (with SVK) from "applications/ecommerce" to
> "specialpurpose/myFurnitureEcommerce" one or two times a month in order
> that my application is up-to-date
> 
> 2nd approach : Where can I copy the 5 files ? (just the files in the
> same tree in "specialpurpose/...")
>                        How can I manage the differences between two
> custom ecommerce applications ?
> 
> Could you advice me ?
> Could you detail the 3rd paragraph ?
> 
> Thanks
> 
> Eric
> 
> 
> 


custom ecommerce application

Posted by Eric DE MAULDE <er...@free.fr>.
Hi,

I have read the FAQ "What is considered the best practice in creating a 
custom web application with OFBiz ?"
I havn't very well understood the 3rd paragraph : which approach is linked 
to "customizing an application" and "custom application" ?

My target : work with some custom ecommerce applications up-to-date
Are custom and up-to-date compatible ?

In both approachs, I start from scratch (I delete entity-resource in 
applications/ecommerce/ofbiz-component.xml)

1st approach : I copy (with SVK) "applications/ecommerce" to 
"specialpurpose/myFurnitureEcommerce"
                       I modify the files mentionned in the FAQ and I do 
another changes
                       I pull (with SVK) from "applications/ecommerce" to 
"specialpurpose/myFurnitureEcommerce" one or two times a month in order that 
my application is up-to-date

2nd approach : Where can I copy the 5 files ? (just the files in the same 
tree in "specialpurpose/...")
                        How can I manage the differences between two custom 
ecommerce applications ?

Could you advice me ?
Could you detail the 3rd paragraph ?

Thanks

Eric 


Re: VisaElectron card type validation in UtilValidate.java

Posted by Raj Saini <ra...@gmail.com>.
Thanks Scott, I will do this.

Raj
Scott Gray wrote:
> Sounds good to me so I'll do you a deal, you provide the patch and I'll
> commit it :-)
>
> Regards
> Scott
>
> 2008/5/30 Raj Saini <ra...@gmail.com>:
>
>   
>> Hi Scot,
>>
>> Thanks for the info. Current validation only support cards starting with
>> 417550. Should we not change the validation to support other variations?
>>
>> Thanks,
>>
>> Raj
>>
>> Scott Gray wrote:
>>
>>     
>>> Hi Raj
>>>
>>> Wikipedia says it's these:
>>> 417500,4917,4913,4508,4844
>>> http://en.wikipedia.org/wiki/Credit_card_numbers
>>>
>>> Regards
>>> Scott
>>>
>>> 2008/5/30 Raj Saini <ra...@gmail.com>:
>>>
>>>
>>>
>>>       
>>>> Hi,
>>>>
>>>> While integrating the payment gateway I found and issue with Visa
>>>> Electron
>>>> card validation. On line 1153 in UtilValidte.java Visa Electron cards,
>>>> number is validated as:
>>>>
>>>>  if ((cc.length() == 16) && (first6digs.equals("417500")))
>>>>
>>>> Whereas the testing cards I have (also my real Visa Electron card) do not
>>>> have their first 6 digits as "417500". Has any one one else been to
>>>> similar
>>>> situation? Any idea what should be the right CC number pattern?
>>>>
>>>> Thanks,
>>>>
>>>> Raj
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>         
>>>
>>>       
>>     
>
>   


Re: VisaElectron card type validation in UtilValidate.java

Posted by Raj Saini <ra...@gmail.com>.
Hi Jacques,

I tried on Visa Electron site. Did not find any thing.

I think I will create an issue and provide the patch for the know number 
patterns. If we find more known supported numbers we can add them later.

Thanks,

Raj

Jacques Le Roux wrote:
> Yes, I think so. But maybe we could ask directly to Visa (in case 
> there are more of them); or have a look into their site ?
>
> Jacques
>
> From: "Raj Saini" <ra...@gmail.com>
>> I doubt Wikipedia information is complete. I have a  Visa Electron 
>> (debit) card and its first four digits are 4027. Should I also 
>> include this in validation?
>>
>> Thanks,
>>
>> Raj
>>
>> Scott Gray wrote:
>>> Sounds good to me so I'll do you a deal, you provide the patch and I'll
>>> commit it :-)
>>>
>>> Regards
>>> Scott
>>>
>>> 2008/5/30 Raj Saini <ra...@gmail.com>:
>>>
>>>  
>>>> Hi Scot,
>>>>
>>>> Thanks for the info. Current validation only support cards starting 
>>>> with
>>>> 417550. Should we not change the validation to support other 
>>>> variations?
>>>>
>>>> Thanks,
>>>>
>>>> Raj
>>>>
>>>> Scott Gray wrote:
>>>>
>>>>    
>>>>> Hi Raj
>>>>>
>>>>> Wikipedia says it's these:
>>>>> 417500,4917,4913,4508,4844
>>>>> http://en.wikipedia.org/wiki/Credit_card_numbers
>>>>>
>>>>> Regards
>>>>> Scott
>>>>>
>>>>> 2008/5/30 Raj Saini <ra...@gmail.com>:
>>>>>
>>>>>
>>>>>
>>>>>      
>>>>>> Hi,
>>>>>>
>>>>>> While integrating the payment gateway I found and issue with Visa
>>>>>> Electron
>>>>>> card validation. On line 1153 in UtilValidte.java Visa Electron 
>>>>>> cards,
>>>>>> number is validated as:
>>>>>>
>>>>>>  if ((cc.length() == 16) && (first6digs.equals("417500")))
>>>>>>
>>>>>> Whereas the testing cards I have (also my real Visa Electron 
>>>>>> card) do not
>>>>>> have their first 6 digits as "417500". Has any one one else been to
>>>>>> similar
>>>>>> situation? Any idea what should be the right CC number pattern?
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Raj
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>         
>>>>>
>>>>>       
>>>>     
>>>
>>>   
>>
>


Re: VisaElectron card type validation in UtilValidate.java

Posted by Jacques Le Roux <ja...@les7arts.com>.
Yes, I think so. But maybe we could ask directly to Visa (in case there are more of them); or have a look into their site ?

Jacques

From: "Raj Saini" <ra...@gmail.com>
>I doubt Wikipedia information is complete. I have a  Visa Electron 
> (debit) card and its first four digits are 4027. Should I also include 
> this in validation?
> 
> Thanks,
> 
> Raj
> 
> Scott Gray wrote:
>> Sounds good to me so I'll do you a deal, you provide the patch and I'll
>> commit it :-)
>>
>> Regards
>> Scott
>>
>> 2008/5/30 Raj Saini <ra...@gmail.com>:
>>
>>   
>>> Hi Scot,
>>>
>>> Thanks for the info. Current validation only support cards starting with
>>> 417550. Should we not change the validation to support other variations?
>>>
>>> Thanks,
>>>
>>> Raj
>>>
>>> Scott Gray wrote:
>>>
>>>     
>>>> Hi Raj
>>>>
>>>> Wikipedia says it's these:
>>>> 417500,4917,4913,4508,4844
>>>> http://en.wikipedia.org/wiki/Credit_card_numbers
>>>>
>>>> Regards
>>>> Scott
>>>>
>>>> 2008/5/30 Raj Saini <ra...@gmail.com>:
>>>>
>>>>
>>>>
>>>>       
>>>>> Hi,
>>>>>
>>>>> While integrating the payment gateway I found and issue with Visa
>>>>> Electron
>>>>> card validation. On line 1153 in UtilValidte.java Visa Electron cards,
>>>>> number is validated as:
>>>>>
>>>>>  if ((cc.length() == 16) && (first6digs.equals("417500")))
>>>>>
>>>>> Whereas the testing cards I have (also my real Visa Electron card) do not
>>>>> have their first 6 digits as "417500". Has any one one else been to
>>>>> similar
>>>>> situation? Any idea what should be the right CC number pattern?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Raj
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>         
>>>>
>>>>       
>>>     
>>
>>   
>

Re: VisaElectron card type validation in UtilValidate.java

Posted by Raj Saini <ra...@gmail.com>.
I doubt Wikipedia information is complete. I have a  Visa Electron 
(debit) card and its first four digits are 4027. Should I also include 
this in validation?

Thanks,

Raj

Scott Gray wrote:
> Sounds good to me so I'll do you a deal, you provide the patch and I'll
> commit it :-)
>
> Regards
> Scott
>
> 2008/5/30 Raj Saini <ra...@gmail.com>:
>
>   
>> Hi Scot,
>>
>> Thanks for the info. Current validation only support cards starting with
>> 417550. Should we not change the validation to support other variations?
>>
>> Thanks,
>>
>> Raj
>>
>> Scott Gray wrote:
>>
>>     
>>> Hi Raj
>>>
>>> Wikipedia says it's these:
>>> 417500,4917,4913,4508,4844
>>> http://en.wikipedia.org/wiki/Credit_card_numbers
>>>
>>> Regards
>>> Scott
>>>
>>> 2008/5/30 Raj Saini <ra...@gmail.com>:
>>>
>>>
>>>
>>>       
>>>> Hi,
>>>>
>>>> While integrating the payment gateway I found and issue with Visa
>>>> Electron
>>>> card validation. On line 1153 in UtilValidte.java Visa Electron cards,
>>>> number is validated as:
>>>>
>>>>  if ((cc.length() == 16) && (first6digs.equals("417500")))
>>>>
>>>> Whereas the testing cards I have (also my real Visa Electron card) do not
>>>> have their first 6 digits as "417500". Has any one one else been to
>>>> similar
>>>> situation? Any idea what should be the right CC number pattern?
>>>>
>>>> Thanks,
>>>>
>>>> Raj
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>         
>>>
>>>       
>>     
>
>   


Re: VisaElectron card type validation in UtilValidate.java

Posted by Scott Gray <le...@gmail.com>.
Sounds good to me so I'll do you a deal, you provide the patch and I'll
commit it :-)

Regards
Scott

2008/5/30 Raj Saini <ra...@gmail.com>:

> Hi Scot,
>
> Thanks for the info. Current validation only support cards starting with
> 417550. Should we not change the validation to support other variations?
>
> Thanks,
>
> Raj
>
> Scott Gray wrote:
>
>> Hi Raj
>>
>> Wikipedia says it's these:
>> 417500,4917,4913,4508,4844
>> http://en.wikipedia.org/wiki/Credit_card_numbers
>>
>> Regards
>> Scott
>>
>> 2008/5/30 Raj Saini <ra...@gmail.com>:
>>
>>
>>
>>> Hi,
>>>
>>> While integrating the payment gateway I found and issue with Visa
>>> Electron
>>> card validation. On line 1153 in UtilValidte.java Visa Electron cards,
>>> number is validated as:
>>>
>>>  if ((cc.length() == 16) && (first6digs.equals("417500")))
>>>
>>> Whereas the testing cards I have (also my real Visa Electron card) do not
>>> have their first 6 digits as "417500". Has any one one else been to
>>> similar
>>> situation? Any idea what should be the right CC number pattern?
>>>
>>> Thanks,
>>>
>>> Raj
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>
>

Re: VisaElectron card type validation in UtilValidate.java

Posted by Raj Saini <ra...@gmail.com>.
Hi Scot,

Thanks for the info. Current validation only support cards starting with 
417550. Should we not change the validation to support other variations?

Thanks,

Raj
Scott Gray wrote:
> Hi Raj
>
> Wikipedia says it's these:
> 417500,4917,4913,4508,4844
> http://en.wikipedia.org/wiki/Credit_card_numbers
>
> Regards
> Scott
>
> 2008/5/30 Raj Saini <ra...@gmail.com>:
>
>   
>> Hi,
>>
>> While integrating the payment gateway I found and issue with Visa Electron
>> card validation. On line 1153 in UtilValidte.java Visa Electron cards,
>> number is validated as:
>>
>>   if ((cc.length() == 16) && (first6digs.equals("417500")))
>>
>> Whereas the testing cards I have (also my real Visa Electron card) do not
>> have their first 6 digits as "417500". Has any one one else been to similar
>> situation? Any idea what should be the right CC number pattern?
>>
>> Thanks,
>>
>> Raj
>>
>>
>>
>>
>>
>>     
>
>   


Re: VisaElectron card type validation in UtilValidate.java

Posted by Scott Gray <le...@gmail.com>.
Hi Raj

Wikipedia says it's these:
417500,4917,4913,4508,4844
http://en.wikipedia.org/wiki/Credit_card_numbers

Regards
Scott

2008/5/30 Raj Saini <ra...@gmail.com>:

> Hi,
>
> While integrating the payment gateway I found and issue with Visa Electron
> card validation. On line 1153 in UtilValidte.java Visa Electron cards,
> number is validated as:
>
>   if ((cc.length() == 16) && (first6digs.equals("417500")))
>
> Whereas the testing cards I have (also my real Visa Electron card) do not
> have their first 6 digits as "417500". Has any one one else been to similar
> situation? Any idea what should be the right CC number pattern?
>
> Thanks,
>
> Raj
>
>
>
>
>