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] Fix transaction_type for Googlepay payments (#9071)
Debarati Ghatak47f68859b3c4
diff --git a/crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs b/crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rsindex 42bc6f9287..72b596f1d4 100644--- a/crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs+++ b/crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs@@ -271,6 +271,9 @@ impl TryFrom<&SetupMandateRouterData> for CybersourceZeroMandateRequest {),descriptor: None,},+ tokenized_card: GooglePayTokenizedCard {+ transaction_type: TransactionType::InApp,+ },},)),Some(PaymentSolution::GooglePay),@@ -552,10 +555,17 @@ pub struct ApplePayPaymentInformation {tokenized_card: TokenizedCard,}+#[derive(Debug, Serialize)]+#[serde(rename_all = "camelCase")]+pub struct MandatePaymentTokenizedCard {+ transaction_type: TransactionType,+}+#[derive(Debug, Serialize)]#[serde(rename_all = "camelCase")]pub struct MandatePaymentInformation {payment_instrument: CybersoucrePaymentInstrument,+ tokenized_card: MandatePaymentTokenizedCard,}#[derive(Debug, Serialize)]@@ -574,6 +584,13 @@ pub const FLUID_DATA_DESCRIPTOR_FOR_SAMSUNG_PAY: &str = "FID=COMMON.SAMSUNG.INAP#[serde(rename_all = "camelCase")]pub struct GooglePayTokenPaymentInformation {fluid_data: FluidData,+ tokenized_card: GooglePayTokenizedCard,+}++#[derive(Debug, Serialize)]+#[serde(rename_all = "camelCase")]+pub struct GooglePayTokenizedCard {+ transaction_type: TransactionType,}#[derive(Debug, Serialize)]@@ -2064,6 +2081,9 @@ impl),descriptor: None,},+ tokenized_card: GooglePayTokenizedCard {+ transaction_type: TransactionType::InApp,+ },}));let processing_information =ProcessingInformation::try_from((item, Some(PaymentSolution::GooglePay), None))?;@@ -2542,6 +2562,9 @@ impl TryFrom<(&CybersourceRouterData<&PaymentsAuthorizeRouterData>, String)>let payment_information =PaymentInformation::MandatePayment(Box::new(MandatePaymentInformation {payment_instrument,+ tokenized_card: MandatePaymentTokenizedCard {+ transaction_type: TransactionType::StoredCredentials,+ },}));let client_reference_information = ClientReferenceInformation::from(item);let merchant_defined_information = item