Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation
Rust adyenbeginner-friendlyfeaturedfinancefintechhacktoberfesthigh-performanceopen-sourceorchestrationpaymentpayment-gatewaypayment-integrationpayment-processingpaymentspayments-platformrestful-apirustsdkstripeworks-with-react
fix(connector): [CYBERSOURCE] Add extra field for Cybersource MIT payment for acquirer CMCIC (#9265)
Debarati Ghatakb45ddc9abb20
diff --git a/crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs b/crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rsindex e39bc64c3f..c877832521 100644--- a/crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs+++ b/crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs@@ -562,11 +562,17 @@ pub struct MandatePaymentTokenizedCard {transaction_type: TransactionType,}+#[derive(Debug, Serialize)]+#[serde(rename_all = "camelCase")]+pub struct MandateCard {+ type_selection_indicator: Option<String>,+}#[derive(Debug, Serialize)]#[serde(rename_all = "camelCase")]pub struct MandatePaymentInformation {payment_instrument: CybersoucrePaymentInstrument,tokenized_card: MandatePaymentTokenizedCard,+ card: Option<MandateCard>,}#[derive(Debug, Serialize)]@@ -2555,6 +2561,15 @@ impl TryFrom<(&CybersourceRouterData<&PaymentsAuthorizeRouterData>, String)>let payment_instrument = CybersoucrePaymentInstrument {id: connector_mandate_id.into(),};+ let mandate_card_information = match item.router_data.request.payment_method_type {+ Some(enums::PaymentMethodType::Credit) | Some(enums::PaymentMethodType::Debit) => {+ Some(MandateCard {+ type_selection_indicator: Some("1".to_owned()),+ })+ }+ _ => None,+ };+let bill_to = item.router_data.get_optional_billing_email()@@ -2567,6 +2582,7 @@ impl TryFrom<(&CybersourceRouterData<&PaymentsAuthorizeRouterData>, String)>tokenized_card: MandatePaymentTokenizedCard {transaction_type: TransactionType::StoredCredentials,},+ card: mandate_card_information,}));let client_reference_information = ClientReferenceInformation::from(item);let merchant_defined_information = item