fix(payment_method): add validation for proxy card details (#9136)

This commit is contained in:
Sakil Mostak
2025-09-01 20:45:48 +05:30
committed by GitHub
parent 97ae32035e
commit ccdae87789

View File

@ -190,7 +190,10 @@ impl PaymentMethodIntentConfirm {
) -> bool { ) -> bool {
match payment_method_type { match payment_method_type {
api_enums::PaymentMethod::Card => { api_enums::PaymentMethod::Card => {
matches!(payment_method_data, PaymentMethodCreateData::Card(_)) matches!(
payment_method_data,
PaymentMethodCreateData::Card(_) | PaymentMethodCreateData::ProxyCard(_)
)
} }
_ => false, _ => false,
} }
@ -437,7 +440,10 @@ impl PaymentMethodCreate {
) -> bool { ) -> bool {
match payment_method_type { match payment_method_type {
api_enums::PaymentMethod::Card => { api_enums::PaymentMethod::Card => {
matches!(payment_method_data, PaymentMethodCreateData::Card(_)) matches!(
payment_method_data,
PaymentMethodCreateData::Card(_) | PaymentMethodCreateData::ProxyCard(_)
)
} }
_ => false, _ => false,
} }