mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 12:06:56 +08:00
feat(core): accept payment_confirm_source header in capture call and store in payment_intent (#2116)
This commit is contained in:
@ -88,6 +88,7 @@ impl<T: DatabaseStore> PaymentIntentInterface for KVRouterStore<T> {
|
||||
attempt_count: new.attempt_count,
|
||||
profile_id: new.profile_id.clone(),
|
||||
merchant_decision: new.merchant_decision.clone(),
|
||||
payment_confirm_source: new.payment_confirm_source,
|
||||
};
|
||||
|
||||
match self
|
||||
@ -751,6 +752,7 @@ impl PaymentIntentInterface for MockDb {
|
||||
attempt_count: new.attempt_count,
|
||||
profile_id: new.profile_id,
|
||||
merchant_decision: new.merchant_decision,
|
||||
payment_confirm_source: new.payment_confirm_source,
|
||||
};
|
||||
payment_intents.push(payment_intent.clone());
|
||||
Ok(payment_intent)
|
||||
@ -829,6 +831,7 @@ impl DataModelExt for PaymentIntentNew {
|
||||
attempt_count: self.attempt_count,
|
||||
profile_id: self.profile_id,
|
||||
merchant_decision: self.merchant_decision,
|
||||
payment_confirm_source: self.payment_confirm_source,
|
||||
}
|
||||
}
|
||||
|
||||
@ -865,6 +868,7 @@ impl DataModelExt for PaymentIntentNew {
|
||||
attempt_count: storage_model.attempt_count,
|
||||
profile_id: storage_model.profile_id,
|
||||
merchant_decision: storage_model.merchant_decision,
|
||||
payment_confirm_source: storage_model.payment_confirm_source,
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -906,6 +910,7 @@ impl DataModelExt for PaymentIntent {
|
||||
attempt_count: self.attempt_count,
|
||||
profile_id: self.profile_id,
|
||||
merchant_decision: self.merchant_decision,
|
||||
payment_confirm_source: self.payment_confirm_source,
|
||||
}
|
||||
}
|
||||
|
||||
@ -943,6 +948,7 @@ impl DataModelExt for PaymentIntent {
|
||||
attempt_count: storage_model.attempt_count,
|
||||
profile_id: storage_model.profile_id,
|
||||
merchant_decision: storage_model.merchant_decision,
|
||||
payment_confirm_source: storage_model.payment_confirm_source,
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1003,6 +1009,7 @@ impl DataModelExt for PaymentIntentUpdate {
|
||||
statement_descriptor_suffix,
|
||||
order_details,
|
||||
metadata,
|
||||
payment_confirm_source,
|
||||
} => DieselPaymentIntentUpdate::Update {
|
||||
amount,
|
||||
currency,
|
||||
@ -1019,6 +1026,7 @@ impl DataModelExt for PaymentIntentUpdate {
|
||||
statement_descriptor_suffix,
|
||||
order_details,
|
||||
metadata,
|
||||
payment_confirm_source,
|
||||
},
|
||||
Self::PaymentAttemptAndAttemptCountUpdate {
|
||||
active_attempt_id,
|
||||
@ -1102,6 +1110,7 @@ impl DataModelExt for PaymentIntentUpdate {
|
||||
statement_descriptor_suffix,
|
||||
order_details,
|
||||
metadata,
|
||||
payment_confirm_source,
|
||||
} => Self::Update {
|
||||
amount,
|
||||
currency,
|
||||
@ -1118,6 +1127,7 @@ impl DataModelExt for PaymentIntentUpdate {
|
||||
statement_descriptor_suffix,
|
||||
order_details,
|
||||
metadata,
|
||||
payment_confirm_source,
|
||||
},
|
||||
DieselPaymentIntentUpdate::PaymentAttemptAndAttemptCountUpdate {
|
||||
active_attempt_id,
|
||||
|
||||
Reference in New Issue
Block a user