I had this code working in ASP.NET MVC 5, but I cannot get it to work in ASP.NET MVC 6 (ASP.NET 5)
Can someone help me?
public EmptyResult PayPalPaymentNotification(PayPalCheckoutInfo payPalCheckoutInfo)
{
PayPalListenerModel model = new PayPalListenerModel();
model._PayPalCheckoutInfo = payPalCheckoutInfo;
byte[] parameters = Request.BinaryRead(Request.ContentLength);
if (parameters != null)
{
model.GetStatus(parameters);
}
return new EmptyResult();
}
Error:
byte[] parameters = Request.BinaryRead(Request.ContentLength);
HttpRequest does not contain a definition for BinaryRead and there is no BinaryRead extension method accepting the first argument of type HttpRequest can be found (are you missing the using directive or assembly?).
I tested such things but did not work:
HttpContext.Request.BinaryRead
Thank.
Edit: Similar quesiton -> Read error in binary format
source
share