question

mjohnsonsa avatar image
mjohnsonsa asked David Marginian Deactivated answered

"Unable to reach Callback URL" setting up webhook in sandbox...

I have tried for weeks now to get resolution to the problem of getting "Unable to reach Callback URL" when setting up a webhook in my sandbox developer account. The problem is explained in detail here with screenshots: https://community.clover.com/questions/16392/unable-to-configure-webhook-url-for-clover-sandbox.html.

The URL of the callback uses a valid SSL Certificate and returns 200 SUCCESS. It works fine in production but I cannot test with my dev kit unless I can get the webhook set up in my sandbox developer account. I see similar questions in the community dating back for years with no resolution and I feel like clover has NO developer support but instead keeps redirecting everything to the "Community". I am extremely frustrated, I just need to test a webhook using my dev kit. How can I accomplish this???

SandboxWebhooks
4 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Frank Faustino avatar image Frank Faustino ♦♦ commented ·

Hi, @mjohnsonsa.

I did some digging through our server logs and found where the webhook verification instances were failing. It appears to be an issue establishing a trusted connection over SSL: https://gist.github.com/frankfaustino/dfe6cc1f0df3a70f0ea61ee268826261

Can you please provide a minimum, reproducible example of your server's webhook callback handler?

I'll continue investigating further in case it's an issue on our end.

0 Likes 0 ·
mjohnsonsa avatar image mjohnsonsa Frank Faustino ♦♦ commented ·

@Frank Faustino

Here is the servers webhook handler... hopefully you can figure this out. It works fine in production but I need it to work in Sandbox.

<?php
// header("Access-Control-Allow-Origin: *");
// header("Content-Type: application/json; charset=UTF-8");
header("HTTP/1.1 200 SUCCESS");//We won't work if we don't return a 200 SUCCESS
response
// header('Content-Type: application/json; charset=utf-8');
// header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
// header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
$content = json_decode(file_get_contents('php://input') , true);

if ($content['verificationCode'] != null) {
        //TODO: when the verification code is in the JSON Body Object, we'll nee
d to log this somehow
        //so we can read it and post it on the developer dashboard accordinly.
        //print_r(json_encode($content));
        file_put_contents('file.txt', $content, FILE_APPEND);
        //header('HTTP/1.1 200 SUCCESS');
        echo 'SUCCESS, check txt file for appended text';
}else{
        //var_dump($content);
        //print_r(json_encode('{\"no\":\"value\"}'));
        //header('HTTP/1.1 200 SUCCESS');
        echo 'The request would have been received and processed by the PHP file
';
        //phpinfo();
}

exit;

0 Likes 0 ·
mjohnsonsa avatar image mjohnsonsa Frank Faustino ♦♦ commented ·

Frank, did you ever check into why this was failing after I provided you the servers webhook callback handler you requested?

0 Likes 0 ·
mjohnsonsa avatar image mjohnsonsa commented ·
I really need some help with this, does clover not offer any kind of support to developers?
0 Likes 0 ·
David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated commented
An internal issue was created for this 3 days ago and we are looking into it.
4 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

mjohnsonsa avatar image mjohnsonsa commented ·

Can you reply back to this thread once you figure it out so I will be notified? Only option if using a webhook at this point is to use our production account for testing.

0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ mjohnsonsa commented ·

Yes, I am watching the issue and will report back when I see an update.

0 Likes 0 ·
mjohnsonsa avatar image mjohnsonsa David Marginian ♦♦ commented ·

David, any word on this? we are running out of time. I thought we had plenty of time when I originally posted this problem in June but now we are needing to wrap up our POS integration with Clover or abandon it altogether. Please advise.

0 Likes 0 ·
Show more comments
David Marginian avatar image
David Marginian Deactivated answered
This should now be resolved, please try it and let me know.
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community