feat(address): add payment method billing details (#3812)

This commit is contained in:
Narayan Bhat
2024-03-01 17:37:29 +05:30
committed by GitHub
parent f95beaa189
commit 33f07419ab
90 changed files with 1690 additions and 215 deletions

View File

@ -399,6 +399,9 @@ impl<T: DatabaseStore> PaymentAttemptInterface for KVRouterStore<T> {
unified_code: payment_attempt.unified_code.clone(),
unified_message: payment_attempt.unified_message.clone(),
mandate_data: payment_attempt.mandate_data.clone(),
payment_method_billing_address_id: payment_attempt
.payment_method_billing_address_id
.clone(),
fingerprint_id: payment_attempt.fingerprint_id.clone(),
};
@ -1123,6 +1126,7 @@ impl DataModelExt for PaymentAttempt {
unified_code: self.unified_code,
unified_message: self.unified_message,
mandate_data: self.mandate_data.map(|d| d.to_storage_model()),
payment_method_billing_address_id: self.payment_method_billing_address_id,
fingerprint_id: self.fingerprint_id,
}
}
@ -1182,6 +1186,7 @@ impl DataModelExt for PaymentAttempt {
mandate_data: storage_model
.mandate_data
.map(MandateDetails::from_storage_model),
payment_method_billing_address_id: storage_model.payment_method_billing_address_id,
fingerprint_id: storage_model.fingerprint_id,
}
}
@ -1239,6 +1244,7 @@ impl DataModelExt for PaymentAttemptNew {
unified_code: self.unified_code,
unified_message: self.unified_message,
mandate_data: self.mandate_data.map(|d| d.to_storage_model()),
payment_method_billing_address_id: self.payment_method_billing_address_id,
fingerprint_id: self.fingerprint_id,
}
}
@ -1296,6 +1302,7 @@ impl DataModelExt for PaymentAttemptNew {
mandate_data: storage_model
.mandate_data
.map(MandateDetails::from_storage_model),
payment_method_billing_address_id: storage_model.payment_method_billing_address_id,
fingerprint_id: storage_model.fingerprint_id,
}
}
@ -1400,6 +1407,7 @@ impl DataModelExt for PaymentAttemptUpdate {
fingerprint_id,
updated_by,
merchant_connector_id: connector_id,
payment_method_billing_address_id,
} => DieselPaymentAttemptUpdate::ConfirmUpdate {
amount,
currency,
@ -1422,6 +1430,7 @@ impl DataModelExt for PaymentAttemptUpdate {
fingerprint_id,
updated_by,
merchant_connector_id: connector_id,
payment_method_billing_address_id,
},
Self::VoidUpdate {
status,
@ -1672,6 +1681,7 @@ impl DataModelExt for PaymentAttemptUpdate {
fingerprint_id,
updated_by,
merchant_connector_id: connector_id,
payment_method_billing_address_id,
} => Self::ConfirmUpdate {
amount,
currency,
@ -1694,6 +1704,7 @@ impl DataModelExt for PaymentAttemptUpdate {
fingerprint_id,
updated_by,
merchant_connector_id: connector_id,
payment_method_billing_address_id,
},
DieselPaymentAttemptUpdate::VoidUpdate {
status,