mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-27 19:46:48 +08:00
feat(router): Add payment link support (#2105)
Co-authored-by: Sahkal Poddar <sahkal.poddar@juspay.in> Co-authored-by: Kashif <46213975+kashif-m@users.noreply.github.com> Co-authored-by: Kashif <mohammed.kashif@juspay.in> Co-authored-by: Bernard Eugine <114725419+bernard-eugine@users.noreply.github.com>
This commit is contained in:
@ -40,6 +40,7 @@ pub struct MockDb {
|
||||
pub merchant_key_store: Arc<Mutex<Vec<crate::store::merchant_key_store::MerchantKeyStore>>>,
|
||||
pub business_profiles: Arc<Mutex<Vec<crate::store::business_profile::BusinessProfile>>>,
|
||||
pub reverse_lookups: Arc<Mutex<Vec<store::ReverseLookup>>>,
|
||||
pub payment_link: Arc<Mutex<Vec<store::payment_link::PaymentLink>>>,
|
||||
}
|
||||
|
||||
impl MockDb {
|
||||
@ -72,6 +73,7 @@ impl MockDb {
|
||||
merchant_key_store: Default::default(),
|
||||
business_profiles: Default::default(),
|
||||
reverse_lookups: Default::default(),
|
||||
payment_link: Default::default(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@ -105,6 +105,7 @@ impl PaymentIntentInterface for MockDb {
|
||||
attempt_count: new.attempt_count,
|
||||
profile_id: new.profile_id,
|
||||
merchant_decision: new.merchant_decision,
|
||||
payment_link_id: new.payment_link_id,
|
||||
payment_confirm_source: new.payment_confirm_source,
|
||||
};
|
||||
payment_intents.push(payment_intent.clone());
|
||||
|
||||
@ -90,6 +90,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_link_id: new.payment_link_id.clone(),
|
||||
payment_confirm_source: new.payment_confirm_source,
|
||||
};
|
||||
|
||||
@ -697,6 +698,7 @@ impl DataModelExt for PaymentIntentNew {
|
||||
attempt_count: self.attempt_count,
|
||||
profile_id: self.profile_id,
|
||||
merchant_decision: self.merchant_decision,
|
||||
payment_link_id: self.payment_link_id,
|
||||
payment_confirm_source: self.payment_confirm_source,
|
||||
}
|
||||
}
|
||||
@ -734,6 +736,7 @@ impl DataModelExt for PaymentIntentNew {
|
||||
attempt_count: storage_model.attempt_count,
|
||||
profile_id: storage_model.profile_id,
|
||||
merchant_decision: storage_model.merchant_decision,
|
||||
payment_link_id: storage_model.payment_link_id,
|
||||
payment_confirm_source: storage_model.payment_confirm_source,
|
||||
}
|
||||
}
|
||||
@ -766,9 +769,9 @@ impl DataModelExt for PaymentIntent {
|
||||
setup_future_usage: self.setup_future_usage,
|
||||
off_session: self.off_session,
|
||||
client_secret: self.client_secret,
|
||||
active_attempt_id: self.active_attempt_id,
|
||||
business_country: self.business_country,
|
||||
business_label: self.business_label,
|
||||
active_attempt_id: self.active_attempt_id,
|
||||
order_details: self.order_details,
|
||||
allowed_payment_method_types: self.allowed_payment_method_types,
|
||||
connector_metadata: self.connector_metadata,
|
||||
@ -776,6 +779,7 @@ impl DataModelExt for PaymentIntent {
|
||||
attempt_count: self.attempt_count,
|
||||
profile_id: self.profile_id,
|
||||
merchant_decision: self.merchant_decision,
|
||||
payment_link_id: self.payment_link_id,
|
||||
payment_confirm_source: self.payment_confirm_source,
|
||||
}
|
||||
}
|
||||
@ -814,6 +818,7 @@ impl DataModelExt for PaymentIntent {
|
||||
attempt_count: storage_model.attempt_count,
|
||||
profile_id: storage_model.profile_id,
|
||||
merchant_decision: storage_model.merchant_decision,
|
||||
payment_link_id: storage_model.payment_link_id,
|
||||
payment_confirm_source: storage_model.payment_confirm_source,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user