fix(connector): [CYBERSOURCE] Fix transaction_type for Googlepay payments (#9071)

Co-authored-by: Debarati Ghatak <debarati.ghatak@Debarati-Ghatak-FW569NC29L.local>
This commit is contained in:
Debarati Ghatak
2025-08-28 17:54:33 +05:30
committed by GitHub
parent 3aa38bac1b
commit 47f68859b3

View File

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