mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-27 19:46:48 +08:00
feat(payments): propagate additional payment method data for apple pay during MIT (#7170)
This commit is contained in:
@ -1181,6 +1181,22 @@ impl PaymentCreate {
|
||||
)))
|
||||
}
|
||||
PaymentMethodsData::WalletDetails(wallet) => match payment_method_type {
|
||||
Some(enums::PaymentMethodType::ApplePay) => {
|
||||
Some(api_models::payments::AdditionalPaymentData::Wallet {
|
||||
apple_pay: api::payments::ApplepayPaymentMethod::try_from(
|
||||
wallet,
|
||||
)
|
||||
.inspect_err(|err| {
|
||||
logger::error!(
|
||||
"Unable to transform PaymentMethodDataWalletInfo to ApplepayPaymentMethod: {:?}",
|
||||
err
|
||||
)
|
||||
})
|
||||
.ok(),
|
||||
google_pay: None,
|
||||
samsung_pay: None,
|
||||
})
|
||||
}
|
||||
Some(enums::PaymentMethodType::GooglePay) => {
|
||||
Some(api_models::payments::AdditionalPaymentData::Wallet {
|
||||
apple_pay: None,
|
||||
|
||||
@ -259,6 +259,12 @@ where
|
||||
(Some(card), _) => Some(PaymentMethodsData::Card(
|
||||
CardDetailsPaymentMethod::from((card.clone(), co_badged_card_data)),
|
||||
)),
|
||||
(
|
||||
_,
|
||||
domain::PaymentMethodData::Wallet(domain::WalletData::ApplePay(applepay)),
|
||||
) => Some(PaymentMethodsData::WalletDetails(
|
||||
PaymentMethodDataWalletInfo::from(applepay),
|
||||
)),
|
||||
(
|
||||
_,
|
||||
domain::PaymentMethodData::Wallet(domain::WalletData::GooglePay(googlepay)),
|
||||
|
||||
@ -13,8 +13,8 @@ pub use api_models::{
|
||||
ConnectorFeatureMatrixResponse, FeatureMatrixListResponse, FeatureMatrixRequest,
|
||||
},
|
||||
payments::{
|
||||
Address, AddressDetails, Amount, AuthenticationForStartResponse, Card, CryptoData,
|
||||
CustomerDetails, CustomerDetailsResponse, HyperswitchVaultSessionDetails,
|
||||
Address, AddressDetails, Amount, ApplepayPaymentMethod, AuthenticationForStartResponse,
|
||||
Card, CryptoData, CustomerDetails, CustomerDetailsResponse, HyperswitchVaultSessionDetails,
|
||||
MandateAmountData, MandateData, MandateTransactionType, MandateType,
|
||||
MandateValidationFields, NextActionType, OpenBankingSessionToken, PayLaterData,
|
||||
PaymentIdType, PaymentListConstraints, PaymentListFilters, PaymentListFiltersV2,
|
||||
|
||||
Reference in New Issue
Block a user