mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 04:04:55 +08:00
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:
@ -271,6 +271,9 @@ impl TryFrom<&SetupMandateRouterData> for CybersourceZeroMandateRequest {
|
|||||||
),
|
),
|
||||||
descriptor: None,
|
descriptor: None,
|
||||||
},
|
},
|
||||||
|
tokenized_card: GooglePayTokenizedCard {
|
||||||
|
transaction_type: TransactionType::InApp,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
)),
|
)),
|
||||||
Some(PaymentSolution::GooglePay),
|
Some(PaymentSolution::GooglePay),
|
||||||
@ -552,10 +555,17 @@ pub struct ApplePayPaymentInformation {
|
|||||||
tokenized_card: TokenizedCard,
|
tokenized_card: TokenizedCard,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Serialize)]
|
||||||
|
#[serde(rename_all = "camelCase")]
|
||||||
|
pub struct MandatePaymentTokenizedCard {
|
||||||
|
transaction_type: TransactionType,
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Debug, Serialize)]
|
#[derive(Debug, Serialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct MandatePaymentInformation {
|
pub struct MandatePaymentInformation {
|
||||||
payment_instrument: CybersoucrePaymentInstrument,
|
payment_instrument: CybersoucrePaymentInstrument,
|
||||||
|
tokenized_card: MandatePaymentTokenizedCard,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Serialize)]
|
#[derive(Debug, Serialize)]
|
||||||
@ -574,6 +584,13 @@ pub const FLUID_DATA_DESCRIPTOR_FOR_SAMSUNG_PAY: &str = "FID=COMMON.SAMSUNG.INAP
|
|||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct GooglePayTokenPaymentInformation {
|
pub struct GooglePayTokenPaymentInformation {
|
||||||
fluid_data: FluidData,
|
fluid_data: FluidData,
|
||||||
|
tokenized_card: GooglePayTokenizedCard,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Serialize)]
|
||||||
|
#[serde(rename_all = "camelCase")]
|
||||||
|
pub struct GooglePayTokenizedCard {
|
||||||
|
transaction_type: TransactionType,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Serialize)]
|
#[derive(Debug, Serialize)]
|
||||||
@ -2064,6 +2081,9 @@ impl
|
|||||||
),
|
),
|
||||||
descriptor: None,
|
descriptor: None,
|
||||||
},
|
},
|
||||||
|
tokenized_card: GooglePayTokenizedCard {
|
||||||
|
transaction_type: TransactionType::InApp,
|
||||||
|
},
|
||||||
}));
|
}));
|
||||||
let processing_information =
|
let processing_information =
|
||||||
ProcessingInformation::try_from((item, Some(PaymentSolution::GooglePay), None))?;
|
ProcessingInformation::try_from((item, Some(PaymentSolution::GooglePay), None))?;
|
||||||
@ -2542,6 +2562,9 @@ impl TryFrom<(&CybersourceRouterData<&PaymentsAuthorizeRouterData>, String)>
|
|||||||
let payment_information =
|
let payment_information =
|
||||||
PaymentInformation::MandatePayment(Box::new(MandatePaymentInformation {
|
PaymentInformation::MandatePayment(Box::new(MandatePaymentInformation {
|
||||||
payment_instrument,
|
payment_instrument,
|
||||||
|
tokenized_card: MandatePaymentTokenizedCard {
|
||||||
|
transaction_type: TransactionType::StoredCredentials,
|
||||||
|
},
|
||||||
}));
|
}));
|
||||||
let client_reference_information = ClientReferenceInformation::from(item);
|
let client_reference_information = ClientReferenceInformation::from(item);
|
||||||
let merchant_defined_information = item
|
let merchant_defined_information = item
|
||||||
|
|||||||
Reference in New Issue
Block a user