diff --git a/app/models/checkout.rb b/app/models/checkout.rb index 79b1e06..b4f8cd7 100644 --- a/app/models/checkout.rb +++ b/app/models/checkout.rb @@ -58,9 +58,10 @@ def adyen_webhooks(notifications) if validator.valid_notification_hmac?(notification, hmacKey) puts notification["eventCode"] puts notification["merchantReference"] - "[accepted]" + # Send a 202 response with an empty body + [202, {}, ['']] else - # In case of invalid hmac, do not send [accepted] response + # In case of invalid hmac raise "Invalid HMAC Signature" end end