Ask a Question related to FileMaker, Design and Development.
-
proterm #1
Identify credit card types based on thier number
As a practice and learn session, I'd like to construct a FileMaker
calc field that "looks" at a credit card number in a field, and then
ID the card based on the first number, and then show the credit card
type?
Examples:
Fields-
CC_number <= CC number entered into this field.
CC_ID.c <= CC type identified in this field.
This simple calc is obviously wrong, but describes what I think it
logically looks like (identify the first number and relate that to the
CC type):
CC_ID.c =
if (left 1, 3, "AMEX"),
if (left 1, 4, "Visa"),
if (left 1, 5, "Master"),
if (left 1, 6, "Discover")
Jerry Cline
proterm Guest
-
Display Credit Card number with dynamic Dashes
Hi, I record Credit card numbers without the dashes in them but want to display them with the dashes. is a loop needed for this? where can I find how... -
From validation? [ credit card ]
I want to have a form in my director movie where the user enters their credit card details. Does anyone know how I can validate the number to see... -
Credit Card processing...
Hello there.... I would like my users on my site to be able to pay with credit cards and I need an "immediate" validation and transffer... Can... -
[PHP] Credit card/Debit card validation
I have a mod10 validation script written in another scripting language. I could try to convert it if you would like but I am sure that someone has... -
Credit card/Debit card validation
Does anyone know of a PHP routine to validate Credit/Debit cards? I've seen some convoluted Javascript scripts but want a PHP version so validation... -
Michael Myett #2
Re: Identify credit card types based on thier number
Brian Dunning has two files available that show examples of credit card
validation at [url]http://www.briandunning.com/filemaker.shtml[/url]
They are both free downloads and are unlocked so you can see how they work.
Michael Myett
proterm wrote:> As a practice and learn session, I'd like to construct a FileMaker
> calc field that "looks" at a credit card number in a field, and then
> ID the card based on the first number, and then show the credit card
> type?Michael Myett Guest
-
John Weinshel #3
Re: Identify credit card types based on thier number
Try:
Choose(Left(CC, 1) - 3,
"Amex", "Visa", "MC", "Discover"
)
Remember Amex uses only 15 digits.
--
John Weinshel
Datagrace
Vashon Island, WA
(206) 463-1634
Associate Member, Filemaker Solutions Alliance
"proterm" <Jerry@intrec.com> wrote in message
news:88f45ed6.0309112136.636bd1c4@posting.google.c om...> As a practice and learn session, I'd like to construct a FileMaker
> calc field that "looks" at a credit card number in a field, and then
> ID the card based on the first number, and then show the credit card
> type?
>
> Examples:
> Fields-
> CC_number <= CC number entered into this field.
> CC_ID.c <= CC type identified in this field.
>
> This simple calc is obviously wrong, but describes what I think it
> logically looks like (identify the first number and relate that to the
> CC type):
>
> CC_ID.c =
>
> if (left 1, 3, "AMEX"),
> if (left 1, 4, "Visa"),
> if (left 1, 5, "Master"),
> if (left 1, 6, "Discover")
>
> Jerry Cline
John Weinshel Guest
-
Howard Schlossberg #4
Re: Identify credit card types based on thier number
proterm wrote:
> CC_ID.c =
>
> if (left 1, 3, "AMEX"),
> if (left 1, 4, "Visa"),
> if (left 1, 5, "Master"),
> if (left 1, 6, "Discover")
John's answer will work, but it isn't the most obvious to debug. try this:
case(
left(CC_number, 1)=3, "AMEX",
left(CC_number, 1)=4, "Visa",
left(CC_number, 1)=5, "Master",
left(CC_number, 1)=6, "Discover")
And not only does Amex only have 15 characters, but so do *some*
mastercards.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg (818) 883-2846
FM Pro Solutions Los Angeles, California
Associate Member, FileMaker Solutions Alliance
Howard Schlossberg Guest
-
proterm #5
Re: Identify credit card types based on thier number
The several methods posted to my request were extremely helpful. The
solutions went beyond the point of just solving the problem, they
allowed me to go beyond the point I originally had in mind.
Thank you for the detailed examples.
Jerry Cline
proterm Guest



Reply With Quote

