473,322 Members | 1,911 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Using a Credit Card Reader

Not sure if this is a good place to post this... I'm writing and ASP.net
app using vb .net. I need to interact with a credit card reader. I have
one that sits inline with the keyboard. Works great, except for the fact
that no matter what field the user is in on the transaction page (Name,
Address, Credit Card number) the reader will dump the data at the cursor.
So, if the user is in the name field and they happen to swipe the card,
that's where the info goes.

has anyone worked with this type of thing before? Is there a way to disable
the card reader or detect that the info is coming from the reader? So I can
only enable it when the user is in the proper field, or move the data to the
proper field when it's detected... Thanks.

J
Nov 21 '05 #1
12 11103
make sure that you are on the credit card field before you enable that
keypress. If the credit card reader is on the keyboard it self then make
sure that it is eather disabled untill that field has focus.. or make sure
that the credit card keypress is bypassed unless the credit card field has
focus
"Jerry Camel" <rl*****@msn.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Not sure if this is a good place to post this... I'm writing and ASP.net
app using vb .net. I need to interact with a credit card reader. I have
one that sits inline with the keyboard. Works great, except for the fact
that no matter what field the user is in on the transaction page (Name,
Address, Credit Card number) the reader will dump the data at the cursor.
So, if the user is in the name field and they happen to swipe the card,
that's where the info goes.

has anyone worked with this type of thing before? Is there a way to
disable
the card reader or detect that the info is coming from the reader? So I
can
only enable it when the user is in the proper field, or move the data to
the
proper field when it's detected... Thanks.

J

Nov 21 '05 #2
That's what I can't figure out how to do. There doesn't seem to be a way to
programatically interact with the card reader.
"Chris" <cc*********@hotmail.com> wrote in message
news:uE**************@TK2MSFTNGP12.phx.gbl...
make sure that you are on the credit card field before you enable that
keypress. If the credit card reader is on the keyboard it self then make
sure that it is eather disabled untill that field has focus.. or make sure
that the credit card keypress is bypassed unless the credit card field has
focus
"Jerry Camel" <rl*****@msn.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Not sure if this is a good place to post this... I'm writing and ASP.net app using vb .net. I need to interact with a credit card reader. I have one that sits inline with the keyboard. Works great, except for the fact that no matter what field the user is in on the transaction page (Name,
Address, Credit Card number) the reader will dump the data at the cursor. So, if the user is in the name field and they happen to swipe the card,
that's where the info goes.

has anyone worked with this type of thing before? Is there a way to
disable
the card reader or detect that the info is coming from the reader? So I
can
only enable it when the user is in the proper field, or move the data to
the
proper field when it's detected... Thanks.

J


Nov 21 '05 #3

"Jerry Camel" <rl*****@msn.com> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl...
Not sure if this is a good place to post this... I'm writing and ASP.net
app using vb .net. I need to interact with a credit card reader. I have
one that sits inline with the keyboard. Works great, except for the fact
that no matter what field the user is in on the transaction page (Name,
Address, Credit Card number) the reader will dump the data at the cursor.
So, if the user is in the name field and they happen to swipe the card,
that's where the info goes.

has anyone worked with this type of thing before? Is there a way to disable
the card reader or detect that the info is coming from the reader? So I can
only enable it when the user is in the proper field, or move the data to the
proper field when it's detected... Thanks.

J


I did a quick Google search on this subject and there seems to not be any real info out there to do this in VB.NET. Maybe, the
manufacturer of the reader you are using has a SDK for their reader. It might not be for VB.NET, but, might be something that
you could convert.
Sorry I could not offer a better suggestion.
james

Nov 21 '05 #4
The keyboard reader should send characters to the KeyPress Event of whatever
control has the focus at the time the card is read. You should be able to
use the Form.KeyPreview set to True and then in the KeyPress Event of the
Form that is active, intercept the characters as they are sent. I suspect
that the first character sent to the Keypress event will be a special
character to signal that a string of characters from the card reader is being
sent. You can then add the characters in a string in the KeyPress event
until the ending special character is sent. Not sure about this but might
work.

"james" wrote:

"Jerry Camel" <rl*****@msn.com> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl...
Not sure if this is a good place to post this... I'm writing and ASP.net
app using vb .net. I need to interact with a credit card reader. I have
one that sits inline with the keyboard. Works great, except for the fact
that no matter what field the user is in on the transaction page (Name,
Address, Credit Card number) the reader will dump the data at the cursor.
So, if the user is in the name field and they happen to swipe the card,
that's where the info goes.

has anyone worked with this type of thing before? Is there a way to disable
the card reader or detect that the info is coming from the reader? So I can
only enable it when the user is in the proper field, or move the data to the
proper field when it's detected... Thanks.

J


I did a quick Google search on this subject and there seems to not be any real info out there to do this in VB.NET. Maybe, the
manufacturer of the reader you are using has a SDK for their reader. It might not be for VB.NET, but, might be something that
you could convert.
Sorry I could not offer a better suggestion.
james

Nov 21 '05 #5
I have been working on a project using a magnetic swipe card reader
(basically a credit card reader) with vb.net for the last few months.
It sounds like the type of reader you have is what is called a
"keyboard wedge". That type emualtes a keyboard. So, when a card is
passed through the reader, what it reads off of the card is passed back
as if someone were manually typing it in on the keyboard. So, whatever
control has focus, the text property will be set to that value.

I am using the type of reader that is not a "keyboard wedge". With it,
I am able to raise an event when the reader detects that a card has
been passed through it and pass the value read from the card along with
the event. I am then able to do what I want with the value.

When I researched the hardware, the prices were basically the same for
the "keyboard wedge" style and the other style.

So, unless you can get the manufacturer to assist in how to disable the
credit card reader, you may want to look at the other type of reader.
In my situation, we did not want the reader mounted on the keyboard, it
is connected to the PC via USB connection and then mounted near the PC.

Hope this helps.

Nov 21 '05 #6
Thanks, Darrin. This is what I figured... I'll have to search for a
different card reader. Can you give me the make/model of what you're using?
Thanks.

J

"Darrin" <bl*****@hotmail.com> wrote in message
news:11*********************@o13g2000cwo.googlegro ups.com...
I have been working on a project using a magnetic swipe card reader
(basically a credit card reader) with vb.net for the last few months.
It sounds like the type of reader you have is what is called a
"keyboard wedge". That type emualtes a keyboard. So, when a card is
passed through the reader, what it reads off of the card is passed back
as if someone were manually typing it in on the keyboard. So, whatever
control has focus, the text property will be set to that value.

I am using the type of reader that is not a "keyboard wedge". With it,
I am able to raise an event when the reader detects that a card has
been passed through it and pass the value read from the card along with
the event. I am then able to do what I want with the value.

When I researched the hardware, the prices were basically the same for
the "keyboard wedge" style and the other style.

So, unless you can get the manufacturer to assist in how to disable the
credit card reader, you may want to look at the other type of reader.
In my situation, we did not want the reader mounted on the keyboard, it
is connected to the PC via USB connection and then mounted near the PC.

Hope this helps.

Nov 21 '05 #7
You don't have to get a separate card reader...see my previous note on this
thread. If you use a separate card reader, then you will have to read from a
serial, USB, Parallel, etc. port. I've used one and it's a PAIN!

"Jerry Camel" wrote:
Thanks, Darrin. This is what I figured... I'll have to search for a
different card reader. Can you give me the make/model of what you're using?
Thanks.

J

"Darrin" <bl*****@hotmail.com> wrote in message
news:11*********************@o13g2000cwo.googlegro ups.com...
I have been working on a project using a magnetic swipe card reader
(basically a credit card reader) with vb.net for the last few months.
It sounds like the type of reader you have is what is called a
"keyboard wedge". That type emualtes a keyboard. So, when a card is
passed through the reader, what it reads off of the card is passed back
as if someone were manually typing it in on the keyboard. So, whatever
control has focus, the text property will be set to that value.

I am using the type of reader that is not a "keyboard wedge". With it,
I am able to raise an event when the reader detects that a card has
been passed through it and pass the value read from the card along with
the event. I am then able to do what I want with the value.

When I researched the hardware, the prices were basically the same for
the "keyboard wedge" style and the other style.

So, unless you can get the manufacturer to assist in how to disable the
credit card reader, you may want to look at the other type of reader.
In my situation, we did not want the reader mounted on the keyboard, it
is connected to the PC via USB connection and then mounted near the PC.

Hope this helps.


Nov 21 '05 #8
BW
I had this problem a few years back at another company.

We had Cherry (yes, that was the name) keyboards and the reader was built
into the keyboard.

What these keyboards do, and I suspect your reader does the same thing, is
send a control character at the start of the input and a control character
at the end of the input, basically they were acting as a delimiter to the
card information. In the keypress event of the form we would look for the
control character (much like you would if you were looking for say ctrl+l)
then we would change focus to where we needed it, in our case it was a
hidden textbox and read in the string. When the text box read in the ending
control character we would stop reading into our hidden text box and put
focus back to the original control.

The control character could be set through some dip switches under a panel
on the bottom of the keyboard. You could even have it not send control
characters (this was fairly pointless).

Do you have any documentation for the reader at all? This should tell you
how to set the control characters. If you don't have docs, check with then
manufacturer or look on the internet for the make and model of the device.

HTH
BW
"Jerry Camel" <rl*****@msn.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Not sure if this is a good place to post this... I'm writing and ASP.net
app using vb .net. I need to interact with a credit card reader. I have
one that sits inline with the keyboard. Works great, except for the fact
that no matter what field the user is in on the transaction page (Name,
Address, Credit Card number) the reader will dump the data at the cursor.
So, if the user is in the name field and they happen to swipe the card,
that's where the info goes.

has anyone worked with this type of thing before? Is there a way to disable the card reader or detect that the info is coming from the reader? So I can only enable it when the user is in the proper field, or move the data to the proper field when it's detected... Thanks.

J

Nov 21 '05 #9
off the top of my head a less than elegant work-around comes to mind -- it
seems that this problem could be resolved by either capturing keyboard
events at the form level or by limiting other fields to non-numeric data --
granted, not a perfect solution, but it is better than the current
situation...

"Jerry Camel" <rl*****@msn.com> wrote in message
news:OM****************@TK2MSFTNGP12.phx.gbl...
That's what I can't figure out how to do. There doesn't seem to be a way
to
programatically interact with the card reader.
"Chris" <cc*********@hotmail.com> wrote in message
news:uE**************@TK2MSFTNGP12.phx.gbl...
make sure that you are on the credit card field before you enable that
keypress. If the credit card reader is on the keyboard it self then make
sure that it is eather disabled untill that field has focus.. or make
sure
that the credit card keypress is bypassed unless the credit card field
has
focus
"Jerry Camel" <rl*****@msn.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
> Not sure if this is a good place to post this... I'm writing and ASP.net > app using vb .net. I need to interact with a credit card reader. I have > one that sits inline with the keyboard. Works great, except for the fact > that no matter what field the user is in on the transaction page (Name,
> Address, Credit Card number) the reader will dump the data at the cursor. > So, if the user is in the name field and they happen to swipe the card,
> that's where the info goes.
>
> has anyone worked with this type of thing before? Is there a way to
> disable
> the card reader or detect that the info is coming from the reader? So
> I
> can
> only enable it when the user is in the proper field, or move the data
> to
> the
> proper field when it's detected... Thanks.
>
> J
>
>



Nov 21 '05 #10
Hi,

This is the main reason that I find keyboard wedge devices to be next to
useless. I use either a serial card reader or a USB reader that DOES NOT
act as a keyboard device. The only USB reader that I have found that meets
this description is from Magtek (model 21040102 or equivalent).

Serial readers allow you to parse the data as it arrives, and to place it in
the appropriate fields. Likewise, the USB reader (which employs the Windows
USB APIs, so is more complex to implement) from Magtek permits this
operation.

Dick

--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 4th
Edition ISBN 1-890422-28-2 (391 pages) published July 2004. See
www.mabry.com/vbpgser4 to order.
Nov 21 '05 #11
Thanks for the thoughts everyone...

I think I may have to go with a different reader. This is an .ASP app...
Mostly javascript at the client side. I don't really have a keypress event
to capture with. And now I'm being told that I may have to run on a
weblogic server, so .ASP may not be involved at all.

Thanks, again.

Jerry
"Jerry Camel" <rl*****@msn.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Not sure if this is a good place to post this... I'm writing and ASP.net
app using vb .net. I need to interact with a credit card reader. I have
one that sits inline with the keyboard. Works great, except for the fact
that no matter what field the user is in on the transaction page (Name,
Address, Credit Card number) the reader will dump the data at the cursor.
So, if the user is in the name field and they happen to swipe the card,
that's where the info goes.

has anyone worked with this type of thing before? Is there a way to disable the card reader or detect that the info is coming from the reader? So I can only enable it when the user is in the proper field, or move the data to the proper field when it's detected... Thanks.

J

Nov 21 '05 #12
BW
You should have said so in the first place, you could have saved everyone a
lot of typing ;-)

IMHO it's unreasonable to expect a card reader to be used with a web-based
app, since you can get the kind of control you need with server-side code.

Since this _is_ as web-based app you are seriously going to have to consider
and ActiveX control or a Java applet (not javascript) to get the kind of
control you require.

Good luck with that.

BW

"Rlrcstr" <rl*****@msn.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Thanks for the thoughts everyone...

I think I may have to go with a different reader. This is an .ASP app...
Mostly javascript at the client side. I don't really have a keypress event to capture with. And now I'm being told that I may have to run on a
weblogic server, so .ASP may not be involved at all.

Thanks, again.

Jerry
"Jerry Camel" <rl*****@msn.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Not sure if this is a good place to post this... I'm writing and ASP.net app using vb .net. I need to interact with a credit card reader. I have one that sits inline with the keyboard. Works great, except for the fact that no matter what field the user is in on the transaction page (Name,
Address, Credit Card number) the reader will dump the data at the cursor. So, if the user is in the name field and they happen to swipe the card,
that's where the info goes.

has anyone worked with this type of thing before? Is there a way to

disable
the card reader or detect that the info is coming from the reader? So I

can
only enable it when the user is in the proper field, or move the data to

the
proper field when it's detected... Thanks.

J


Nov 21 '05 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Simon Wigzell | last post by:
My client wants to have credit card information fields on his forms for his website visitors to be able to buy his wervices by credit card. The credit card info - Brand, number and expiry date will...
112
by: Andy | last post by:
Hi All! We are doing new development for SQL Server 2000 and also moving from SQL 7.0 to SQL Server 2000. What are cons and pros for using IDENTITY property as PK in SQL SERVER 2000? Please,...
10
by: dries | last post by:
A friend of mine has a problem with his credit card validation routine and it is probably a simple thing to solve but I cannot find it. It has to do with the expiry dates. What happens is that as...
7
by: gj | last post by:
I have an application in Access 97 I will be rewriting in the latest version of Access in 6 months. In the meantime, does anyone know of an ActiveX control I can add into an Access 97 form to...
4
by: gl | last post by:
I have just started a project that's going to do very heavy credit card processing through asp.net and i had some questions. I've never really done any cc processing through code and I wasn't sure...
6
by: Grant | last post by:
Does any one know how to check the algorithm of the credit card number that was entered in the text box? I want to be able to make sure the users enter correct credit card number since we will...
9
by: nm | last post by:
Hi, I am a developer quite familiar with the C# language and .NET framework. I develop mainly data driven websites. All of our past clients have shopping cart systems developed by me in ASP.NET...
3
by: mikekissman | last post by:
I've built an online reservation website in ASP .NET with a SQL Server backend. It allows customers to search for available resources, than charges their credit card a fee to hold the reservation....
1
by: securedcardss | last post by:
http://card.2youtop.info secured credit card card credit instant secured card cash credit secured card
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.