question

jlo09 avatar image
jlo09 asked David Marginian Deactivated commented

Hosted Checkout - Payment Webhook

Hello, I am implementing the Hosted Checkout on my website. I have successfully authenticated and received a checkout session. Once I complete the payment, I'm getting a webhook notification and receive the following data:

Array ( [type] => PAYMENT [id] => PJGEHg3B4Z5HR [merchantId] => MYMERCHANTID [created] => 1649263620.268 [status] => APPROVED [message] => Approved for 4279 [checkoutSessionId] => 5224d174-35bc-46d5-9893-1Da5f75ece68 )

What I'm trying to do now is to verify the authenticity of the Webhook message. I saw there are instructions here: Clover Signature

My problem is that I am not receiving a "Clover-Signature" header in the webhook notification. Now, if I read careful, the documentation says, "A message for a Webhook notification may also include a header called Clover-Signature". So in the case the header is not present, are there any guidelines on how to verify the authenticity of the Webhook message?


Thanks in advance!

PaymentsecommerceWebhooks
10 |2000

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

1 Answer

·
David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated commented

Hmm, there certainly should be a Clover-Signature header, I just tested this recently and the header was present.

2 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.

jlo09 avatar image jlo09 commented ·

I thought there would be one, I just printed the entire post using the following:

$json = json_decode(file_get_contents("php://input"), true);
print_r($json);

The above array was printed.

0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ jlo09 commented ·
I don't know PHP but that sure seems like you are just reading the response body, the signature is a header.
0 Likes 0 ·

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