mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 00:49:42 +08:00
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:
@ -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(),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user