I am implementing a new payment system. This new payment system is a 3rd party that requires a POST request sent a long with some information that will then open a payment screen provided by the third party. After the payment is made they will send a Post-Back so we can know that user made a payment. As of now I am more worried about getting a POST and re-direct to go through.
Basically I need to redirect the user using a POST request that also contains some information. This action needs to happen after a button click.
I have tried using .redirect() however this is a GET request so the payment site doesn't expect it.
I found this on Stack Overflow and have implemented A, B, and C and there was no luck. The page will refresh like it's trying to do something but never re-directs the user.
As of now this is how it's trying to handle the action:
string SomeServer = "serverWeAreGoingTo";
var values = new Dictionary<string, string>
{
{ "param1", "00" },
{ "param2", "01" }
};
newTestMethod(SomeServer, values);
public async void newTestMethod(string helper, Dictionary<string, string> data)
{
var content = new FormUrlEncodedContent(data);
var response = await client.PostAsync(helper, content);
var responseString = await response.Content.ReadAsStringAsync();
}