Solved

Need to post form data from java and proceed to a website

Posted on 2006-06-20
7
401 Views
Last Modified: 2010-03-31
Hi  all,

We have a site developed using struts. We are adding a payment gateway to it, however, my problem is this.
We need to post data to this site then proceed to this site for the customer to enter their credit card information and when successfully completed they are returned to our website. We sell online learning so the real issue is if they saw the return URL they could use this and get enrolled in classes without actually paying for them.

I need to know how to post form data to another website but have it hidden from the user. I can post from Java that's not the issue and retrieve the response, the issue is I need to go to the website with the posted data and have the customer interact with the site before returning to our site. I want it hidden and would prefer to do it using Java.

I may not have explained this correctly but hopefully, you get the idea.
A page that displays hidden text boxes would allow a user to see the return URL.
Any ideas would be appreciated.

0
Comment
Question by:rj_stone
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 1

Expert Comment

by:sharath_kulal
ID: 16945407
don't know what payment gateway u're using, but if the gateway provider has webservice for CC check. then you could have you're own screen for the customer to enter CC details and from your servlet call the webservice of the provider with CC details for authorization.

even if the provider doesn't provide you webservice, then check if they would accept URL query strings which you could create at the server.

hope this helps
0
 

Author Comment

by:rj_stone
ID: 16945551
Payment gateway the customer wants to use is internetsecure
0
 
LVL 1

Accepted Solution

by:
sharath_kulal earned 300 total points
ID: 16945864
i just went thru their site and there is an option of "Merchant Direct" on this page:

http://www.internetsecure.com/solutions-integration.htm

This is based on  XML-based API and so you should be able to communicate from your server to their server thru XML for Credit Card authorizations, this seems to be a more flexible option and you would have better control of transactions on your server.

0
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 
LVL 30

Assisted Solution

by:Mayank S
Mayank S earned 100 total points
ID: 16948785
The other web-site would've exposed a servlet or a web-service to which you need to post data and get the response - make use of that and you don't need to display anything to the user while that processing is taking place.
0
 
LVL 35

Assisted Solution

by:girionis
girionis earned 100 total points
ID: 16949221
> if they saw the return URL they could use this and get enrolled in classes without actually paying for them.

you could make this page secure and require a form-based authentication. Then anyone that would need to have access to this page would need to supply a username/password. By doing it you ensure that noone that hasn't paid can access the site.
0
 

Author Comment

by:rj_stone
ID: 16951551
I saw the XML API but the client does not want any processing to take place on our site. They want all processing done on internetsecur's website.

So unfortunately we need to allow the users to interact with the site before redirecting back to us. I think I can make use of a hidden page and post from it via struts. If the address bar is hidden then the page name probably won't e visible.

Thanks for the ideas though. Its appreciated. I'll split the points betwwen you all.




0
 
LVL 35

Expert Comment

by:girionis
ID: 16952231
Thanks for accepting, glad I was of help :)
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Opening PDF on button click and fill new document 2 54
hibernate example issues from command prompt 10 66
Java Eclipse Loop 3 31
program arguments vs VM arguments 4 31
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question