mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 09:07:09 +08:00
feat(payments): store and propagate additional wallet pm details in payments response (#5869)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -4261,9 +4261,23 @@ pub async fn get_additional_payment_data(
|
||||
network: apple_pay_wallet_data.payment_method.network.clone(),
|
||||
pm_type: apple_pay_wallet_data.payment_method.pm_type.clone(),
|
||||
}),
|
||||
google_pay: None,
|
||||
})
|
||||
}
|
||||
_ => Some(api_models::payments::AdditionalPaymentData::Wallet { apple_pay: None }),
|
||||
domain::WalletData::GooglePay(google_pay_pm_data) => {
|
||||
Some(api_models::payments::AdditionalPaymentData::Wallet {
|
||||
apple_pay: None,
|
||||
google_pay: Some(payment_additional_types::WalletAdditionalDataForCard {
|
||||
last4: google_pay_pm_data.info.card_details.clone(),
|
||||
card_network: google_pay_pm_data.info.card_network.clone(),
|
||||
card_type: google_pay_pm_data.pm_type.clone(),
|
||||
}),
|
||||
})
|
||||
}
|
||||
_ => Some(api_models::payments::AdditionalPaymentData::Wallet {
|
||||
apple_pay: None,
|
||||
google_pay: None,
|
||||
}),
|
||||
},
|
||||
domain::PaymentMethodData::PayLater(_) => {
|
||||
Some(api_models::payments::AdditionalPaymentData::PayLater { klarna_sdk: None })
|
||||
|
||||
Reference in New Issue
Block a user