public void ReceiveIPN(IPNBindingModel model)
    {
        if (!_validator.ValidateIPN(model.RawRequest))
        {
            throw new Exception("Error validating payment");
        }

        switch (model.PaymentStatus)
        {
        case "Completed":
            //Business Logic
            break;
        }
    }
     public bool BindModel(HttpActionContext actionContext, ModelBindingContext bindingContext)
     {
         if (bindingContext.ModelType != typeof(IPNBindingModel))
         {
            return false;
         }
     var postedRaw = actionContext.Request.Content.ReadAsStringAsync().Result;
     
     Dictionary postedData = ParsePaypalIPN(postedRaw);
     IPNBindingModel ipn = new IPNBindingModel
     {
         PaymentStatus = postedData["payment_status"],
         RawRequest = postedRaw,
         CustomField = postedData["custom"]
     };
     bindingContext.Model = ipn;
     return true;
 }