feat(router): add mandates incoming webhooks flow (#2464)

This commit is contained in:
Sai Harsha Vardhan
2023-10-06 00:38:47 +05:30
committed by GitHub
parent 3f0d927cb8
commit 1cf8b6cf53
19 changed files with 321 additions and 8 deletions

View File

@ -2115,6 +2115,7 @@ pub fn check_if_operation_confirm<Op: std::fmt::Debug>(operations: Op) -> bool {
#[allow(clippy::too_many_arguments)]
pub fn generate_mandate(
merchant_id: String,
payment_id: String,
connector: String,
setup_mandate_details: Option<MandateData>,
customer: &Option<domain::Customer>,
@ -2137,6 +2138,7 @@ pub fn generate_mandate(
.set_mandate_id(mandate_id)
.set_customer_id(cus.customer_id.clone())
.set_merchant_id(merchant_id)
.set_original_payment_id(Some(payment_id))
.set_payment_method_id(payment_method_id)
.set_connector(connector)
.set_mandate_status(storage_enums::MandateStatus::Active)