Handle webhook from squareup hook on Laravel

I have an issue when handling webhook from squareup on laravel 8!

  • When handle hook with type=payment.created => success
  • When handle hook with type=payment.updated=> failed cause of “The signature is invalid”.
    ==> I think, if validate signature then all webhook type can access to my server.
    I referred for signature: Square API Webhooks: Validate Notifications
    Thank you for helping me!

Hi @dvhuy160795, I’m not sure I fully understand the issue. Are you saying that the payment.created webhooks are being successfully validated but payment.updated events aren’t? Are you doing anything different with the validation?

Yep, just as you think!
This is my code: