This is for a .net 4.5 web app. I initially setup our webhook using the Web.config file of our Application (which worked great!) but we need to be able to set the Config information using a database and it's not a great idea to update the web.config file at runtime. According to the Paypal SDK I should be able to do this to set my config files: Dictionary<string, string> config = new Dictionary<string, string>(); config.Add("mode", "sandbox"); config.Add("clientId", "jb-us-seller_api1.paypal.com"); config.Add("clientSecret", "..."); config.Add("WebhookId", "...");
PayPalAPIInterfaceServiceService s = new PayPalAPIInterfaceServiceService(config); I've tried running this code both before and after initializing the webhook: public static class WebApiConfig
{
public static void Register(HttpConfiguration config)
{
// Web API configuration and services
// Web API routes config.MapHttpAttributeRoutes(); config.Routes.MapHttpRoute( name: "DefaultApi", routeTemplate: "api/{controller}/{id}", defaults: new { id = RouteParameter.Optional }
);
// Initialize PayPal WebHook receiver config.InitializeReceivePaypalWebHooks();
}
}` But I still get the error message "clientId' is missing and my handler doesn't fire. Any help would be appreciated!
... View more