mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-27 19:46:48 +08:00
feat: PG Agnostic mandate using network_txns_id (Adyen, Authorizedotnet, Stripe) (#855)
Co-authored-by: Arun Raj M <jarnura47@gmail.com>
This commit is contained in:
@ -302,14 +302,20 @@ pub enum MandateTxnType {
|
||||
#[derive(Default, Eq, PartialEq, Debug, serde::Deserialize, serde::Serialize, Clone)]
|
||||
pub struct MandateIds {
|
||||
pub mandate_id: String,
|
||||
pub connector_mandate_id: Option<String>,
|
||||
pub mandate_reference_id: Option<MandateReferenceId>,
|
||||
}
|
||||
|
||||
#[derive(Eq, PartialEq, Debug, serde::Deserialize, serde::Serialize, Clone)]
|
||||
pub enum MandateReferenceId {
|
||||
ConnectorMandateId(String), // mandate_id send by connector
|
||||
NetworkMandateId(String), // network_txns_id send by Issuer to connector, Used for PG agnostic mandate txns
|
||||
}
|
||||
|
||||
impl MandateIds {
|
||||
pub fn new(mandate_id: String) -> Self {
|
||||
Self {
|
||||
mandate_id,
|
||||
connector_mandate_id: None,
|
||||
mandate_reference_id: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user