mirror of
https://github.com/juspay/hyperswitch.git
synced 2026-03-13 09:02:06 +08:00
fix(connectors): [Stripe] update overcapture handling and add CLF currency to db (#9880)
This commit is contained in:
@@ -2629,8 +2629,16 @@ impl StripeChargeEnum {
|
||||
match payment_method_details {
|
||||
StripePaymentMethodDetailsResponse::Card { card } => card
|
||||
.overcapture
|
||||
.as_ref()
|
||||
.and_then(|overcapture| overcapture.maximum_amount_capturable),
|
||||
.clone()
|
||||
.filter(|overcapture| {
|
||||
matches!(
|
||||
overcapture.status,
|
||||
Some(StripeOvercaptureStatus::Available)
|
||||
)
|
||||
})
|
||||
.and_then(|overcapture_data| {
|
||||
overcapture_data.maximum_amount_capturable
|
||||
}),
|
||||
_ => None,
|
||||
}
|
||||
} else {
|
||||
|
||||
2
migrations/2025-10-16-121924_add_clf_currency/down.sql
Normal file
2
migrations/2025-10-16-121924_add_clf_currency/down.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
-- This file should undo anything in `up.sql`
|
||||
SELECT 1;
|
||||
2
migrations/2025-10-16-121924_add_clf_currency/up.sql
Normal file
2
migrations/2025-10-16-121924_add_clf_currency/up.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
-- Your SQL goes here
|
||||
ALTER TYPE "Currency" ADD VALUE IF NOT EXISTS 'CLF' AFTER 'CHF';
|
||||
Reference in New Issue
Block a user