This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes online reservation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "online reservation " Watch "online reservation " New topic
Author

online reservation

J Das
Ranch Hand

Joined: Jul 27, 2011
Posts: 83

hello everyone.. ... Could someone clear my view on how onliine ticket bookings ( or reservations ) are done ??? I am dealing with a project for my end semesters where I have to develop an Online Airline Ticket Booking website.. I am using Java (Servlets,JSP) .. So my question in simple words is.. how does the seat for a certain customer gets reserved when he/she books ??? what are the steps ?? what technology must be brought in here to check(verify) the Credit card of the customer and how does the customer gets the ticket??? Hope I am able to clearly depict the situation... Please help..
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41052
    
  43
Um, a semester project? How much work do you think Expedia, Travelocity et al. have spent on their sites? Maybe you can narrow down the scope to something manageable?


Ping & DNS - my free Android networking tools app
J Das
Ranch Hand

Joined: Jul 27, 2011
Posts: 83

Ulf Dittmer wrote:Um, a semester project? How much work do you think Expedia, Travelocity et al. have spent on their sites? Maybe you can narrow down the scope to something manageable?


Yes indeed .. but the thing is like ,our institution has distributed the projects to us and this is what i got as my part... Now i need some help.. If you could help me i would be in definite grace...
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41052
    
  43
Well, what do you have so far? Where are you stuck making progress? If you haven't started, what ideas have you had?
J Das
Ranch Hand

Joined: Jul 27, 2011
Posts: 83

Ulf Dittmer wrote:Well, what do you have so far? Where are you stuck making progress? If you haven't started, what ideas have you had?


Well I haven't started this yet.... but I am not able to figure out how the following situation which will eventually show up when the client books a ticket....

the client fills up the form which opts for client's information ... Now when the client gives his Credit Card number for the payment purpose.. how does the verification of the Credit Card takes place ???

My question is that , when the client submits his Credit Card Number to my website (to buy a ticket)
how do I check/verify that the given Credit card Number is a real one ??? I my opinion the Bank will get involved here because of the verification of the Credit Card.. But how do these steps take place ??? How should this feature be added to my application...??? I hope you get my point.. Please help me understand..
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41052
    
  43
In the real world you would contract the services of a "payment processor". For your project, it's probably sufficient to apply the usual checks for validity of the CC#; see org.apache.commons.validator.CreditCardValidator for an example.
Guru dhaasan
Ranch Hand

Joined: Sep 13, 2006
Posts: 126

Interesting discussion Das & Ulf...

@Das: At what level you want your project to be... Credit card validation or real time booking??? I see no point in the later for the sake of a college project...


Thanks, Shiv
SCJP, OCE - JSP & Servlets Developer
J Das
Ranch Hand

Joined: Jul 27, 2011
Posts: 83

Guru dhaasan wrote:Interesting discussion Das & Ulf...

@Das: At what level you want your project to be... Credit card validation or real time booking??? I see no point in the later for the sake of a college project...


Thanks Guru for taking a look ... Actually i have read some forums where they have mentioned that in order to pay online , one needs to have a Payment Gateway, a Merchant Bank and this and that.... But the thing is how do I check it when I am just developing in my LOCALHOST....??? I hope you understand my query... Please suggest something....

Guru dhaasan
Ranch Hand

Joined: Sep 13, 2006
Posts: 126

What you heard from different sources is true.. you should involve with payment gateway and stuff and more importantly you've to PAY for that... That's why i told its pointless for a college project...

Better is that as suggested by Ulf, you can use apache commons library for validating the credit card and just a dummy payment gateway system which mimics what you see in a real world
May be like once the card is validated successfully, you can redirect to the success page saying that the transaction was successful. If the CC validation fails, just route to an error page

Hope this makes sense for your project..
J Das
Ranch Hand

Joined: Jul 27, 2011
Posts: 83

Guru dhaasan wrote:What you heard from different sources is true.. you should involve with payment gateway and stuff and more importantly you've to PAY for that... That's why i told its pointless for a college project...

Better is that as suggested by Ulf, you can use apache commons library for validating the credit card and just a dummy payment gateway system which mimics what you see in a real world
May be like once the card is validated successfully, you can redirect to the success page saying that the transaction was successful. If the CC validation fails, just route to an error page

Hope this makes sense for your project..


Yes indeed, you are right...But how to implement those Apache Common Libraries ?? I mean to say where in the code does they actually sit ??? Could you please suggest me how to proceed when i use Servlets and JSP ...
Guru dhaasan
Ranch Hand

Joined: Sep 13, 2006
Posts: 126

Get the credit card # from the user (jsp/servlet) and use the commons-validator.jar to validate the same
Google for some examples of how to use that validator class
J Das
Ranch Hand

Joined: Jul 27, 2011
Posts: 83

Guru dhaasan wrote:Get the credit card # from the user (jsp/servlet) and use the commons-validator.jar to validate the same
Google for some examples of how to use that validator class


Ok after the User enters all necessary information along with his Credit Card No.in the form , these information will be sent to the Servlet ... Right ?? So there the proper checking goes .. Right ??? which means that These common validator classes must be written in the servlets ??? Please correct me if my viewpoint is wrong...

Kindly give me a clear idea of how this concept gets implemented in a MVC architechure ... I mean to say when the client submits his info ( along with Credit Card No.) , what are the steps involved and what things happens where ???
Guru dhaasan
Ranch Hand

Joined: Sep 13, 2006
Posts: 126

why do you need a mvc for this
J Das
Ranch Hand

Joined: Jul 27, 2011
Posts: 83

Guru dhaasan wrote:why do you need a mvc for this


So what should we be using ?? and kindly let me know the flow of work.. what happens after submision of the Credit Card No.
Guru dhaasan
Ranch Hand

Joined: Sep 13, 2006
Posts: 126

No credit card info. should be persisted.... in real life scneario, you will just forward the info. to Payment gateway... Take the CC details, validate it and route to a success/error page depending on the validation result...

keep it simple
J Das
Ranch Hand

Joined: Jul 27, 2011
Posts: 83

Guru dhaasan wrote:No credit card info. should be persisted.... in real life scneario, you will just forward the info. to Payment gateway... Take the CC details, validate it and route to a success/error page depending on the validation result...

keep it simple


Yes , but the thing is like ... to buy a ticket one has to have a Credit Card which involves a Bank.. So how will the payment be done through localhost ???
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41052
    
  43
Ulf Dittmer wrote:In the real world you would contract the services of a "payment processor".
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30057
    
149

Guru dhaasan wrote:why do you need a mvc for this

Why wouldn't you? MVC is the most common architecture. One should have a reason to not be using it.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
J Das
Ranch Hand

Joined: Jul 27, 2011
Posts: 83

Jeanne Boyarsky wrote:
Guru dhaasan wrote:why do you need a mvc for this

Why wouldn't you? MVC is the most common architecture. One should have a reason to not be using it.


Could you clearly describe me .. how can this be done ?? I mean after submission of the credit card number , what steps should my application follow in an MVC architecture ?? Please advice...
Also make me understand how all of this payment process goes locally ( in localhost ) where i do not have the option of communicating with a live Bank .. hope you get my question and i hope you suggest me some good tips to do this...
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

J Das wrote:Also make me understand how all of this payment process goes locally ( in localhost ) where i do not have the option of communicating with a live Bank.


This is really getting absurd. Obviously you can't communicate with a real-life entity which will say that your input is good or not, and bill someone's credit card. This is only a demo, after all. So obviously you must put something in place yourself which says whether your input is good, and doesn't bill anybody's credit card.

The easiest thing to do is to accept all inputs as good. A slightly more difficult thing would be to just check the credit card number for validity, but this has already been suggested several times. Were you seriously imagining that you would have to build an entire fake merchant bank to connect to?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: online reservation
 
Similar Threads
Travel Agent Profile -- Part II
Frequent Flyer mileage system - not being used
EJB design suggestions
Get Data from another server
Servlet code for updating data in database