mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 09:07:09 +08:00
feat(router): Add attempts_group DB changes for split payments (v2) (#9466)
This commit is contained in:
@ -153,6 +153,7 @@ pub struct KafkaPaymentAttempt<'a> {
|
||||
pub payment_id: &'a id_type::GlobalPaymentId,
|
||||
pub merchant_id: &'a id_type::MerchantId,
|
||||
pub attempt_id: &'a id_type::GlobalAttemptId,
|
||||
pub attempts_group_id: Option<&'a String>,
|
||||
pub status: storage_enums::AttemptStatus,
|
||||
pub amount: MinorUnit,
|
||||
pub connector: Option<&'a String>,
|
||||
@ -232,6 +233,7 @@ impl<'a> KafkaPaymentAttempt<'a> {
|
||||
let PaymentAttempt {
|
||||
payment_id,
|
||||
merchant_id,
|
||||
attempts_group_id,
|
||||
amount_details,
|
||||
status,
|
||||
connector,
|
||||
@ -291,6 +293,7 @@ impl<'a> KafkaPaymentAttempt<'a> {
|
||||
payment_id,
|
||||
merchant_id,
|
||||
attempt_id: id,
|
||||
attempts_group_id: attempts_group_id.as_ref(),
|
||||
status: *status,
|
||||
amount: amount_details.get_net_amount(),
|
||||
connector: connector.as_ref(),
|
||||
|
||||
@ -155,6 +155,7 @@ pub struct KafkaPaymentAttemptEvent<'a> {
|
||||
pub payment_id: &'a id_type::GlobalPaymentId,
|
||||
pub merchant_id: &'a id_type::MerchantId,
|
||||
pub attempt_id: &'a id_type::GlobalAttemptId,
|
||||
pub attempts_group_id: Option<&'a String>,
|
||||
pub status: storage_enums::AttemptStatus,
|
||||
pub amount: MinorUnit,
|
||||
pub connector: Option<&'a String>,
|
||||
@ -234,6 +235,7 @@ impl<'a> KafkaPaymentAttemptEvent<'a> {
|
||||
let PaymentAttempt {
|
||||
payment_id,
|
||||
merchant_id,
|
||||
attempts_group_id,
|
||||
amount_details,
|
||||
status,
|
||||
connector,
|
||||
@ -293,6 +295,7 @@ impl<'a> KafkaPaymentAttemptEvent<'a> {
|
||||
payment_id,
|
||||
merchant_id,
|
||||
attempt_id: id,
|
||||
attempts_group_id: attempts_group_id.as_ref(),
|
||||
status: *status,
|
||||
amount: amount_details.get_net_amount(),
|
||||
connector: connector.as_ref(),
|
||||
|
||||
@ -130,6 +130,8 @@ pub struct KafkaPaymentIntent<'a> {
|
||||
pub setup_future_usage: storage_enums::FutureUsage,
|
||||
pub off_session: bool,
|
||||
pub active_attempt_id: Option<&'a id_type::GlobalAttemptId>,
|
||||
pub active_attempt_id_type: common_enums::ActiveAttemptIDType,
|
||||
pub active_attempts_group_id: Option<&'a String>,
|
||||
pub attempt_count: i16,
|
||||
pub profile_id: &'a id_type::ProfileId,
|
||||
pub customer_email: Option<HashedString<pii::EmailStrategy>>,
|
||||
@ -200,6 +202,8 @@ impl<'a> KafkaPaymentIntent<'a> {
|
||||
last_synced,
|
||||
setup_future_usage,
|
||||
active_attempt_id,
|
||||
active_attempt_id_type,
|
||||
active_attempts_group_id,
|
||||
order_details,
|
||||
allowed_payment_method_types,
|
||||
connector_metadata,
|
||||
@ -255,6 +259,8 @@ impl<'a> KafkaPaymentIntent<'a> {
|
||||
setup_future_usage: *setup_future_usage,
|
||||
off_session: setup_future_usage.is_off_session(),
|
||||
active_attempt_id: active_attempt_id.as_ref(),
|
||||
active_attempt_id_type: *active_attempt_id_type,
|
||||
active_attempts_group_id: active_attempts_group_id.as_ref(),
|
||||
attempt_count: *attempt_count,
|
||||
profile_id,
|
||||
customer_email: None,
|
||||
|
||||
@ -83,6 +83,8 @@ pub struct KafkaPaymentIntentEvent<'a> {
|
||||
pub setup_future_usage: storage_enums::FutureUsage,
|
||||
pub off_session: bool,
|
||||
pub active_attempt_id: Option<&'a id_type::GlobalAttemptId>,
|
||||
pub active_attempt_id_type: common_enums::ActiveAttemptIDType,
|
||||
pub active_attempts_group_id: Option<&'a String>,
|
||||
pub attempt_count: i16,
|
||||
pub profile_id: &'a id_type::ProfileId,
|
||||
pub customer_email: Option<HashedString<pii::EmailStrategy>>,
|
||||
@ -212,6 +214,8 @@ impl<'a> KafkaPaymentIntentEvent<'a> {
|
||||
last_synced,
|
||||
setup_future_usage,
|
||||
active_attempt_id,
|
||||
active_attempt_id_type,
|
||||
active_attempts_group_id,
|
||||
order_details,
|
||||
allowed_payment_method_types,
|
||||
connector_metadata,
|
||||
@ -267,6 +271,8 @@ impl<'a> KafkaPaymentIntentEvent<'a> {
|
||||
setup_future_usage: *setup_future_usage,
|
||||
off_session: setup_future_usage.is_off_session(),
|
||||
active_attempt_id: active_attempt_id.as_ref(),
|
||||
active_attempt_id_type: *active_attempt_id_type,
|
||||
active_attempts_group_id: active_attempts_group_id.as_ref(),
|
||||
attempt_count: *attempt_count,
|
||||
profile_id,
|
||||
customer_email: None,
|
||||
|
||||
Reference in New Issue
Block a user