Testing of webhook-api is posting to my IIS web server according to my logs

Hi there,

I am having having an issue with “Send Test Event”. They failing…

According to my logs, Squares servers are able able to post to my API.

        [HttpPost]
        public JsonResult DoSomething([FromBody] JsonElement json)
        {
            System.IO.File.AppendAllText(@"Log.txt", $"{DateTime.Now} - {json.ToString()} {Environment.NewLine}");
            return new JsonResult(json);
        }

I can see the results from my local Log.txt that it’s logging each event after using the “Test Web Hook” from Square SDK portal.

I can my IIS responding with http status of 200.

2021-10-09 22:36:22 192.168.86.36 POST /api/SquareHook - 443 - 44.241.162.61 Square+Connect+v2 - 200 0 64 109

However, I can not get a success response from the “Send Test Event”.

My app id is : sq0idp-77wipGHy9gwNwCqhSLbbIA

Any help is appreciated.

Thanks

-Leon

If you are responding with a 200 within 10 seconds of the event being received the test webhooks shouldn’t be failing.

@Bryan-Square it’s certainly responding under 10 seconds.

I also went and check to make sure my ssl settings are all correct. They appear to be.

you can find the web hook url I am using and test it via the swagger page.

https://sbsservices.dev/swagger/index.html

or postman to post, and the response is status of 200 under 10 seconds.

and I don’t see any cert errors when using postman.

Thanks

-Leon

Mark this as resolved.

I still have no clue what the original issue was.

but I got it to work with Azure Function, & Azure Service bus.

Thanks

-Leon

Glad to hear that you got it working as expected. :slightly_smiling_face: