fix(connector): make webhook source verification mandatory for adyen (#2360)

This commit is contained in:
Hrithikesh
2023-09-26 12:30:51 +05:30
committed by GitHub
parent d8c384573e
commit 3d7e22a4f1
3 changed files with 11 additions and 0 deletions

View File

@ -895,6 +895,10 @@ pub async fn webhooks_core<W: types::OutgoingWebhookType>(
merchant_account.merchant_id.clone(),
)],
);
} else if connector.is_webhook_source_verification_mandatory() {
// if webhook consumption is mandatory for connector, fail webhook
// so that merchant can retrigger it after updating merchant_secret
return Err(errors::ApiErrorResponse::WebhookAuthenticationFailed.into());
}
logger::info!(source_verified=?source_verified);