File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes Redirecting to an external payment website Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Redirecting to an external payment website" Watch "Redirecting to an external payment website" New topic

Redirecting to an external payment website

Hanneli Andreazzi

Joined: Nov 07, 2009
Posts: 1
Hi everyone!
I've been searching for some tips about it during all the week, but could not find anything concrete... I've found an old topic here (2005), but the answer was ins a broken link.
So, I have gotten the following problem: I must collect some info about the client using JSF, then redirect it for an [b]external[b] payment page using POST method. Something like:

What is the best way to do this? Should I create a servlet and then do it? Is there a way to do this using FacesCOntext.getCurrentInstance().getExternalCOntext()? If anyone has already had this kind of situation, could give me an example? Thanks a lot!! =)

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17410

Well, I have an app that works with PayPal, but what it does is contact the Paypal server internally, supplying PayPal with callback URLs. I send the invoicing data to PayPal, it provides the merchant services, then vectors back to my app once the purchase has been made. My JSF backing bean services do a URL redirect to a URL returned from the internal request to transition over to their server.

Other payment processors may work differently. You'll have to check the developer documentation for your merchant service provider(s).

An IDE is no substitute for an Intelligent Developer.
Dominik Obermaier

Joined: Sep 07, 2010
Posts: 1
Forgive me for digging up this old thread, but I have exactly the same problem which Hanneli described.

Hanneli, have you found any solutions for this?
I agree. Here's the link:
subject: Redirecting to an external payment website
It's not a secret anymore!