What processing do you want to do ? If you want to do offline processing
such as checking the validity of a card number, or determining the card type
form the number, you just have to get the necessary information and write
your own code. Note that, in some countries, testing the validity of a card
number offline, that is without connecting to a credit card server, might be
forbidden, either exlicitly or implicitly. This is because a program that
tests number validity might be used to generate lists of valid numbers. (Of
course, this does not include partial validity checking such as number of
digits or testing for non digits characters.) Determining the card type from
the number is done through a list of partial numbers you can get from any
bank. The four leftmost digits are used for this identification.
If you want to process a payment, you have to connect to your bank server.
How it is done vary from bank to bank. Generally, they send you a
certificate, some parameter files, an api and some servlet examples to adapt
to your application.
The general process is the following :
Your application makes a call to the request servlet, passing all
parameters needed for the transcation (amount and order id, for example) The
parameters specific to the merchant are red from the parameter files.
The request servlet make a call to the api, get the certificate, encode all
the data and sends back to the user a HTML form linked to the bank service.
This form doesn't contains the user credit card infromation, but it contains
all the data, concerning the order, including the amount. That's why it has
to be encoded.
The user enters its card data in the form and the data is sent directly to
the bank server.
The user receive an HTML page saying if the transaction was accepted or
not. If it was, a link on the page leads to a servlet on your site that is
suppose to deal with the "accepted" case. If it wasn't, the link is to
another servlet which deal with the corresponding case. This two servlet are
for displaying info to the user. (It might also be a unique servlet with a
parameter corresponding to the transaction status.)
As the user might not activate the link on the form, the server also sends
a request to a third servlet in which you can do all necessary processing
(typically writing in the database if the transaction was accepted or not,
and maybe checking the amount to see if it hasn't changed ;-)
Note that you can also ask the user it's credit card information, store it
in your database and the connect to the bank service. But of course, the
user might not like it as much.
Hope this helps
Pierre-Yves
-----Message d'origine-----
De : A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]De la part de
Garcilazo, Francisco (GEAE, Softtek)
Envoy� : mercredi 2 mai 2001 00:27
� : [EMAIL PROTECTED]
Objet : Re: credit card processing
If I can't be able to check the book?...What can I do?..
-----Original Message-----
From: PURINGTON,HEATHER (HP-Vancouver,ex1)
[mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 01, 2001 4:40 PM
To: [EMAIL PROTECTED]
Subject: Re: credit card processing
The book "XML and Java from Scratch" has an example of how to do this.
-----Original Message-----
From: Peter Wayner [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 30, 2001 6:55 PM
To: [EMAIL PROTECTED]
Subject: credit card processing
Hi--
I was wondering if anyone has had much experience using a servlet for
credit card processing? I need to do a fair amount of processing and
then charge for some information. Can any recommend any code to try?
Is it easier to use something like Paypal? Any suggestions would be
appreciated. Thanks.
Peter Wayner
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html