Generate Label Webhook HMAC Validation

We are having issues with the Generate Label webhook.
Generate requests got through fine, but occassionally the HMAC Signatures do not align (and so we throw an error back to ShipHero)
We have tried everything, bar removing signature validation, to try and resolve this.

It seems there is little information on how ShipHero actually calculates the HMAC signature. Would it be possible to get an example PHP script to check our logic is sound? Is there additional information on the format of the data when ShipHero calculates? i.e. no line breaks? pretty print? etc?

Is there anything that could be causing it to only fail sometimes?

Our PHP calculation script:
$hmac = hash_hmac(‘sha256’, $request->getContent(), $hmacSecret, true);
$hmac = base64_encode($hmac);

Hello,

For issues with webhooks, PAPI Calls, or anything that requires investigation from Shiphero Support, Please submit a ticket.

Thank you

Hi @Austin_Harvey ,

We tried to do this, but were directed to this platform.
Please can you provide an email address that we can use?

Thank you

Support@shiphero.com should take those requests. If you are a third party working with a Shiphero customer please have them CCd on the email.

If you are a Shiphero customer please PM me the ticket number and i will make sure they do not bounce the ticket