feat(webhooks): Webhook source verification (#2069)

This commit is contained in:
Sangamesh Kulkarni
2023-09-01 14:50:33 +05:30
committed by GitHub
parent f8410b5b2a
commit 8b22f38dd6
14 changed files with 145 additions and 41 deletions

View File

@ -641,6 +641,8 @@ pub struct MerchantConnectorCreate {
pub struct MerchantConnectorWebhookDetails {
#[schema(value_type = String, example = "12345678900987654321")]
pub merchant_secret: Secret<String>,
#[schema(value_type = String, example = "12345678900987654321")]
pub additional_secret: Option<Secret<String>>,
}
/// Response of creating a new Merchant Connector for the merchant account."

View File

@ -2474,6 +2474,8 @@ pub struct ApplepaySessionTokenResponse {
pub connector_reference_id: Option<String>,
/// The public key id is to invoke third party sdk
pub connector_sdk_public_key: Option<String>,
/// The connector merchant id
pub connector_merchant_id: Option<String>,
}
#[derive(Debug, Eq, PartialEq, serde::Serialize, Clone, ToSchema)]

View File

@ -114,3 +114,8 @@ pub enum OutgoingWebhookContent {
#[schema(value_type = DisputeResponse)]
DisputeDetails(Box<disputes::DisputeResponse>),
}
pub struct ConnectorWebhookSecrets {
pub secret: Vec<u8>,
pub additional_secret: Option<masking::Secret<String>>,
}