I am invoking an API and I have done the crate_order
call. When a user is done with their payment, the API sends a Payment callBack data in POST and uses the Content-Type application/x-www-form-urlencoded
.
I am not sure how to catch that POST data in C# and save the data in an object so I can return.
The call_back URL is my CgCallback
method: example.com/CgCallback
.
This method looks like:
public CgCallback incomingData()
{
CgCallback resultCgOrder = new CgCallback();
resultCgOrder.Id = Request.Form["id"];
resultCgOrder.OrderId = Request.Form["order_id"];
return resultCgOrder;
}
Unfortunately giving this error:
The name 'Request' does not exist in the current context