This commit is contained in:
DariusIII
2023-12-17 17:55:51 +01:00
parent 9825cc4ec5
commit cb74bed0bc
2 changed files with 8 additions and 7 deletions
@@ -113,8 +113,9 @@ class BtcPaymentController extends BasePageController
public static function verify_webhook($data, $hmac_header): bool
{
# Calculate HMAC
// Calculate HMAC
$calculated_hmac = base64_encode(hash_hmac('sha256', $data, config('nntmux.btcpay_webhook_secret'), true));
return hash_equals($hmac_header, $calculated_hmac);
}
}