aspose file tools*
The moose likes Servlets and the fly likes show a website's response on my web page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "show a website Watch "show a website New topic
Author

show a website's response on my web page

Reet Goel
Greenhorn

Joined: May 02, 2007
Posts: 14
Hi,

I was asked a question in an interview and I couldn't answer it. Need to know it's answer.

I may not remember the question exactly but it was somewhat as given below:

Suppose, you have a shopping site. When a user buys a product and pays for it you open the user's bank site from your own shopping site. Now, once the payment has been made the response of the bank's site should get displayed on your site. How would you accomplish this?

Can someone please answer this question?

Thanks!
[ August 08, 2007: Message edited by: Bear Bibeault ]
Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1533
If I am not understanding you wrong, you want to make online shopping feasible and everything happening real-time, payments being made online and changes being reflected in the bank account then and there.

I believe your shopping site and bank's site should have a tie up. You can not share your shopping cart knowledge with the bank. Bank can not give you the source-code or knowledge of how they are maintaining their transactions, they can only give you some information like,
give me account number, give me amount, tell me what transaction to do, i will give you back the response.

I guess your site should be using services from of the bank. Will the term web-services come into play? I dont know because I am learning web-services, but i doubt if that is the case.


Keep Smiling Always — My life is smoother when running silent. -paul
[FAQs] [Certification Guides] [The Linux Documentation Project]
Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1533
And since you mentioned it was in interview, so if the question being not too technical then there are third parties like Paypal. You can try googling 'paypal'.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42612
    
  65
Is the question about displaying the other site in a frame or iframe?


Ping & DNS - my free Android networking tools app
Sundaram Karthick
Greenhorn

Joined: Jun 26, 2007
Posts: 24
I am not closely following yur question, but if the question was after submitting the items in shopping cart and forwarding the purchase details to the payment site and once the payment is made, display the required details in your site, there are 2 things here
1. the payment success state
2. the payment gateway site forwarding back to the origin site based on payment result.
If the payment is made successfully, the payment site will itself confirm the same and will forward the user back to the origin site. Based on the success state a specific page/action can be invoked and the required details can be displayed.
Usually all this happens in a https , so the required information and payment result can be exchanged as hidden formfields or a complete form submit. Also as mentioned above webservices can also be used here.
Hope this helps


SCJP 1.5, SCWCD 1.4, SCBCD 5
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: show a website's response on my web page