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 %>   <p><%= submit_tag "Checkout with Paypal" %></p> <% 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("Digital Wallets, Money Management, and More | PayPal US | PayPal US? cmd=_s-xclick&encrypted=" + @order.paypal_encrypted)

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

JB

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

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