Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

fix: merchant_connector_id null in KV flow (#2810)

Kartikeya Hegdee566a4eff227
diff --git a/crates/diesel_models/src/payment_attempt.rs b/crates/diesel_models/src/payment_attempt.rs
index bb8f2b60bb..f77e75491d 100644
--- a/crates/diesel_models/src/payment_attempt.rs
+++ b/crates/diesel_models/src/payment_attempt.rs
@@ -359,7 +359,9 @@ impl PaymentAttemptUpdate {
.amount_capturable
.unwrap_or(source.amount_capturable),
updated_by: pa_update.updated_by,
- merchant_connector_id: pa_update.merchant_connector_id,
+ merchant_connector_id: pa_update
+ .merchant_connector_id
+ .or(source.merchant_connector_id),
authentication_data: pa_update.authentication_data.or(source.authentication_data),
encoded_data: pa_update.encoded_data.or(source.encoded_data),
unified_code: pa_update.unified_code.unwrap_or(source.unified_code),