I currently have a small HTML form for a third party payment service, which comprises a flashy submit button and some hidden fields. These hidden field values are specific to the payment service, but the I wish to display the submit button as just one of many payment service options on a view based on a base class payment model, so I don’t want to have specifics in my base payment model. Ideally I would like the submit button to call into an action in a service specific controller, and this action will gather service specific data, and submit a post request to the service’s remote site, just as if I had clicked the submit button on the html form for that service. How can I achieve this?
Share
If you want the form to be posted from the user’s browser, you’re going to have to use some client-side script either on a timer or on the Ready() event.
Can you do it server-side using HttpWebRequest?