dlukic | Posts: 46

Receiving callback from e-signlive

0 votes
I have registered http://xyz.com/dir/api/CallbackLog/Log as callback Url on account page. I have also created API controller method public static void Log(CallbackLogModel model) { ......... } where model is JSON model I expect to be posted to the specified url. Also based on your documentation I expect that JSON will have following structure. public class CallbackLogModel { public string name { get; set; } public string sessionUser { get; set; } public string packageId { get; set; } public string message { get; set; } public string documentId { get; set; } public DateTime? Created { get; set; } } Callback never goes trough to controller log method. What am I doing wrong?

dlukic | Posts: 46

Reply to: Receiving callback from e-signlive

0 votes
Sorry i made a mistake - copied my Service method instead contrller one. Method signature is following: [HttpPost] public void Log(CallbackLogModel jsonModel) { ..................................... }

harishaidary | Posts: 1812

Reply to: Receiving callback from e-signlive

0 votes
Hey, Can you try whitelisting these IPs: 54.85.128.97 (Production) and 54.84.89.182 (Sandbox). Also, can try doing a simple test by sending a POST request to the callback URL using an appropriate tool (POSTMAN for example) to see if the callbacks are reaching your listener?

dlukic | Posts: 46

Reply to: Receiving callback from e-signlive

0 votes
Hi Haris, I have attached postman request. I have tested this way and it works. Thing is not sure if I can require whitelisting ip(s) above since our service provider might refuse that request. I will ask. Anyway that shouldn't be a case since you making a request trough http (port 80 or 8080) or 443... Right? I was thinking that actual json is not formated well or my class is not formated. Please take a look at postman.png and let me know

Attachments
postman.png57.43 KB
harishaidary | Posts: 1812

Reply to: Receiving callback from e-signlive

0 votes
I wouldn't think there would be any problem with the formatting of the json. Looking at your screenshot, can you try sending a json to see if your listener gets anything? Have a look at my attachment.

Attachments
Capture.png19.54 KB
dlukic | Posts: 46

Reply to: Receiving callback from e-signlive

0 votes
I have tried with postman from my box... Works ok. i can see post coming from silanis is received by global handler. Its just not being routed to controller method. that is why i tought that something is wrong with json. is it being sent as a string? i mean serialized?

harishaidary | Posts: 1812

Reply to: Receiving callback from e-signlive

0 votes
Yes, the json sent by eSignLive is indeed serialized. If you are seeing the callback but it's going wrong somewhere, would you be able to post your error code?

dlukic | Posts: 46

Reply to: Receiving callback from e-signlive

0 votes
there is no errors. just your post is not being routed properly. btw.. what sinature my controller method should have then: private void logModel(CallbackLogModel jsonModel) or public void Log(string jsonModel) Also, is it ok to assume that your request Content-Type is : application/json; charset=UTF-8 ?

harishaidary | Posts: 1812

Reply to: Receiving callback from e-signlive

0 votes
Looking at your model, your controller should be public void logModel(CallbackLogModel jsonModel). And yes, the content-type is indeed application/json. Below is a screenshot of what eSignLive sends when you register for callbacks. As you can see, there shouldn't be any issue with the json sent by eSignLive. If you're saying that it works fine with postman, then I'm leaning towards the possibility that your callback endpoint is not receiving the json due to the eSignLive outbound IPs not being whitelisted.

Attachments
console.png17.08 KB
dlukic | Posts: 46

Reply to: Receiving callback from e-signlive

0 votes
I tend to disagree about ip not being white listed. I think my global hanlder will never get the request if that is so. I think the problem is that i don't have ipAddress in the model. will check and let you know

Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off