fix(connector): [Stripe] fix cashapp webhooks response deserialization failure (#5690)

Co-authored-by: Chikke Srujan <chikke.srujan@Chikke-Srujan-N7WRTY72X7.local>
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
chikke srujan
2024-10-08 14:56:22 +05:30
committed by GitHub
parent d61ebef149
commit 2ccce01bf4

View File

@ -2208,6 +2208,12 @@ pub struct StripeBankRedirectDetails {
attached_payment_method: Option<Secret<String>>,
}
#[derive(Deserialize, Clone, Debug, PartialEq, Eq, Serialize)]
pub struct StripeCashappDetails {
buyer_id: Option<String>,
cashtag: Option<String>,
}
impl Deref for PaymentIntentSyncResponse {
type Target = PaymentIntentResponse;
@ -2247,6 +2253,9 @@ pub enum StripePaymentMethodDetailsResponse {
Card {
card: StripeAdditionalCardDetails,
},
Cashapp {
cashapp: StripeCashappDetails,
},
Klarna,
Affirm,
AfterpayClearpay,
@ -2304,7 +2313,8 @@ impl StripePaymentMethodDetailsResponse {
| Self::Bacs
| Self::Wechatpay
| Self::Alipay
| Self::CustomerBalance => None,
| Self::CustomerBalance
| Self::Cashapp { .. } => None,
}
}
}
@ -2619,6 +2629,7 @@ impl<F, T>
| Some(StripePaymentMethodDetailsResponse::Wechatpay)
| Some(StripePaymentMethodDetailsResponse::Alipay)
| Some(StripePaymentMethodDetailsResponse::CustomerBalance)
| Some(StripePaymentMethodDetailsResponse::Cashapp { .. })
| None => payment_method_id.expose(),
}
}