Reputation: 7715
I have situation like this:
action='/pay'
www.paymentprovider.com/new_payment
The problem is that I want to post and redirect (at the same time) user to this new website www.paymentprovider.com/new_payment
. Currently I am using
Net::HTTP.post_form
Do you know any ways to achieve this?
Upvotes: 1
Views: 1337
Reputation: 652
You cannot do a post and redirect without breaking the internet. :)
If you want to use this workflow, you will need to proxy the request.
As an example:
Since this is all happening locally, the option above would seem to be a waste. If /pay is simply missing some parameters and info could you simply supply them in your view? This way you could have both /pay and /new_payment postback to the same location and use two separate views to handle the initial get request.
Upvotes: 2