Redirect_to paypal with encrypted attributes via controller

Hi,

I have a form below which submits fine to paypal with the encrypted
parameters,

<%= form_tag APP_CONFIG[:paypal_url] do %>
<%= hidden_field_tag :cmd, “_s-xclick” %>
<%= hidden_field_tag :encrypted, @order.paypal_encrypted %>

<%= submit_tag "Checkout with Paypal" %>

<% end %>

If I try to send the form direct from the controller it doesnt work,
ive tried various combinations, see below:

redirect_to(“https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_s-
xclick&encrypted=” + @order.paypal_encrypted)
and
redirect_to URI.encode(“https://www.sandbox.paypal.com/cgi-bin/webscr?
cmd=_s-xclick&encrypted=” + @order.paypal_encrypted)

Is this even possible and anyone know whats the best way to do it?

JB

Thanks for the reply, i had looked at this option as an alternative
and will press ahead. Its very unlikely a user will have js disabled
but if they do then i can show the form and then let them post
manually.

cheers,

JB

On 22 November 2011 13:23, johnnybutler7 [email protected]
wrote:

I have a form below which submits fine to paypal with the encrypted
parameters,

If I try to send the form direct from the controller it doesnt work,
ive tried various combinations, see below:

You would probably need to make your redirects into POSTs somehow, not
GETs.