Skip to content

Commit

Permalink
fix(connector): [Stripe] fix cashapp webhooks response deserializatio…
Browse files Browse the repository at this point in the history
…n 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>
  • Loading branch information
3 people authored Oct 8, 2024
1 parent d61ebef commit 2ccce01
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion crates/router/src/connector/stripe/transformers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -2247,6 +2253,9 @@ pub enum StripePaymentMethodDetailsResponse {
Card {
card: StripeAdditionalCardDetails,
},
Cashapp {
cashapp: StripeCashappDetails,
},
Klarna,
Affirm,
AfterpayClearpay,
Expand Down Expand Up @@ -2304,7 +2313,8 @@ impl StripePaymentMethodDetailsResponse {
| Self::Bacs
| Self::Wechatpay
| Self::Alipay
| Self::CustomerBalance => None,
| Self::CustomerBalance
| Self::Cashapp { .. } => None,
}
}
}
Expand Down Expand Up @@ -2619,6 +2629,7 @@ impl<F, T>
| Some(StripePaymentMethodDetailsResponse::Wechatpay)
| Some(StripePaymentMethodDetailsResponse::Alipay)
| Some(StripePaymentMethodDetailsResponse::CustomerBalance)
| Some(StripePaymentMethodDetailsResponse::Cashapp { .. })
| None => payment_method_id.expose(),
}
}
Expand Down

0 comments on commit 2ccce01

Please sign in to comment.