I have simple paypal form to submit and make a payment inside in paypal. Once I saved user data, I want to initiate form submit action.
Here is a half solution - it posts data, but doesn't bring user on paypal checkout window as html form would do. Submitting POST data from the controller in rails to another website
HTML form:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<INPUT TYPE="hidden" NAME="return" value="http://back">
<input type="hidden" name="cmd" value="_cart">
...
<input type="submit" >
</form>
So I need initiate submit button click from the controller with taking user to the same page where data has been posted, same as HTML form basically does.