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:
Manoj Ghorela
2023-05-03 15:48:51 +05:30
committed by GitHub
parent 9240e16ae4
commit ed99655ebc
72 changed files with 1129 additions and 101 deletions

View File

@ -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,
}
}
}