mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-01 19:42:27 +08:00
fix(router): store customer_acceptance in payment_attempt, use it in confirm flow for delayed authorizations like external 3ds flow (#5308)
This commit is contained in:
committed by
GitHub
parent
61b3aef661
commit
0f70473a3a
@ -418,6 +418,7 @@ impl<T: DatabaseStore> PaymentAttemptInterface for KVRouterStore<T> {
|
||||
charge_id: payment_attempt.charge_id.clone(),
|
||||
client_source: payment_attempt.client_source.clone(),
|
||||
client_version: payment_attempt.client_version.clone(),
|
||||
customer_acceptance: payment_attempt.customer_acceptance.clone(),
|
||||
};
|
||||
|
||||
let field = format!("pa_{}", created_attempt.attempt_id);
|
||||
@ -1202,6 +1203,7 @@ impl DataModelExt for PaymentAttempt {
|
||||
charge_id: self.charge_id,
|
||||
client_source: self.client_source,
|
||||
client_version: self.client_version,
|
||||
customer_acceptance: self.customer_acceptance,
|
||||
}
|
||||
}
|
||||
|
||||
@ -1268,6 +1270,7 @@ impl DataModelExt for PaymentAttempt {
|
||||
charge_id: storage_model.charge_id,
|
||||
client_source: storage_model.client_source,
|
||||
client_version: storage_model.client_version,
|
||||
customer_acceptance: storage_model.customer_acceptance,
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1339,6 +1342,7 @@ impl DataModelExt for PaymentAttemptNew {
|
||||
charge_id: self.charge_id,
|
||||
client_source: self.client_source,
|
||||
client_version: self.client_version,
|
||||
customer_acceptance: self.customer_acceptance,
|
||||
}
|
||||
}
|
||||
|
||||
@ -1404,6 +1408,7 @@ impl DataModelExt for PaymentAttemptNew {
|
||||
charge_id: storage_model.charge_id,
|
||||
client_source: storage_model.client_source,
|
||||
client_version: storage_model.client_version,
|
||||
customer_acceptance: storage_model.customer_acceptance,
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1528,6 +1533,7 @@ impl DataModelExt for PaymentAttemptUpdate {
|
||||
payment_method_billing_address_id,
|
||||
client_source,
|
||||
client_version,
|
||||
customer_acceptance,
|
||||
} => DieselPaymentAttemptUpdate::ConfirmUpdate {
|
||||
amount: amount.get_amount_as_i64(),
|
||||
currency,
|
||||
@ -1560,6 +1566,7 @@ impl DataModelExt for PaymentAttemptUpdate {
|
||||
payment_method_billing_address_id,
|
||||
client_source,
|
||||
client_version,
|
||||
customer_acceptance,
|
||||
},
|
||||
Self::VoidUpdate {
|
||||
status,
|
||||
@ -1863,6 +1870,7 @@ impl DataModelExt for PaymentAttemptUpdate {
|
||||
payment_method_billing_address_id,
|
||||
client_source,
|
||||
client_version,
|
||||
customer_acceptance,
|
||||
} => Self::ConfirmUpdate {
|
||||
amount: MinorUnit::new(amount),
|
||||
currency,
|
||||
@ -1893,6 +1901,7 @@ impl DataModelExt for PaymentAttemptUpdate {
|
||||
payment_method_billing_address_id,
|
||||
client_source,
|
||||
client_version,
|
||||
customer_acceptance,
|
||||
},
|
||||
DieselPaymentAttemptUpdate::VoidUpdate {
|
||||
status,
|
||||
|
||||
Reference in New Issue
Block a user