You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Pablo Scagno <ps...@hotmail.com> on 2008/10/21 23:49:38 UTC
How to submit form to external page sending parameters by post, please Help
Hi, I'm trying to submit a form to Paypal but I don't know how I can do
this.
I have a wicket form with all the fields that I need to submit but when I
redirect the page to paypal I can't send the form fields. I can't put the
parameters in the querystring, I must send them by post.
This is my code to redirect in the button onSubmit() event
....
RedirectPage redirectPage = new
RedirectPage("https://www.sandbox.paypal.com/cgi-bin/webscr");
setResponsePage(redirectPage);
...
Is there any way to send the values?
My form must be wicket because It depends on a model...
Thanks
Pablo
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: How to submit form to external page sending parameters by post, please Help
Posted by Pablo Scagno <ps...@hotmail.com>.
Thanks for your response, I've used the second choice...it was very helpful
Bye
Pablo
--------------------------------------------------
From: "Jeremy Thomerson" <je...@wickettraining.com>
Sent: Tuesday, October 21, 2008 10:51 PM
To: <us...@wicket.apache.org>
Subject: Re: How to submit form to external page sending parameters by post,
please Help
> Perhaps one of the following:
>
> 1. Don't use wicket "Form" - use web markup containers of some sort and
> attribute modifiers to output a form that actually posts directly to the
> paypal site. (In other words - generate a real form with action=
> https://www.sandbox.paypal.com.....)
> 2. OR - if you need to post back into Wicket and then submit the
> information to Paypal - use an HTTP client like Commons to post
> programmatically. (See
> http://www.java2s.com/Code/Java/Apache-Common/HttppostmethodExample.htm
> for
> example)
>
> If you want your user to actually end up at the posted paypal page, as I
> suspect you do from your details below, I definitely think number one is
> what you need.
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
> On Tue, Oct 21, 2008 at 4:49 PM, Pablo Scagno <ps...@hotmail.com> wrote:
>
>> Hi, I'm trying to submit a form to Paypal but I don't know how I can do
>> this.
>> I have a wicket form with all the fields that I need to submit but when I
>> redirect the page to paypal I can't send the form fields. I can't put the
>> parameters in the querystring, I must send them by post.
>> This is my code to redirect in the button onSubmit() event
>> ....
>> RedirectPage redirectPage = new RedirectPage("
>> https://www.sandbox.paypal.com/cgi-bin/webscr");
>> setResponsePage(redirectPage);
>> ...
>>
>> Is there any way to send the values?
>>
>> My form must be wicket because It depends on a model...
>>
>> Thanks
>> Pablo
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: How to submit form to external page sending parameters by post, please Help
Posted by Jeremy Thomerson <je...@wickettraining.com>.
Perhaps one of the following:
1. Don't use wicket "Form" - use web markup containers of some sort and
attribute modifiers to output a form that actually posts directly to the
paypal site. (In other words - generate a real form with action=
https://www.sandbox.paypal.com.....)
2. OR - if you need to post back into Wicket and then submit the
information to Paypal - use an HTTP client like Commons to post
programmatically. (See
http://www.java2s.com/Code/Java/Apache-Common/HttppostmethodExample.htm for
example)
If you want your user to actually end up at the posted paypal page, as I
suspect you do from your details below, I definitely think number one is
what you need.
--
Jeremy Thomerson
http://www.wickettraining.com
On Tue, Oct 21, 2008 at 4:49 PM, Pablo Scagno <ps...@hotmail.com> wrote:
> Hi, I'm trying to submit a form to Paypal but I don't know how I can do
> this.
> I have a wicket form with all the fields that I need to submit but when I
> redirect the page to paypal I can't send the form fields. I can't put the
> parameters in the querystring, I must send them by post.
> This is my code to redirect in the button onSubmit() event
> ....
> RedirectPage redirectPage = new RedirectPage("
> https://www.sandbox.paypal.com/cgi-bin/webscr");
> setResponsePage(redirectPage);
> ...
>
> Is there any way to send the values?
>
> My form must be wicket because It depends on a model...
>
> Thanks
> Pablo
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>