mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 04:04:55 +08:00
fix(payment_method): add validation for proxy card details (#9136)
This commit is contained in:
@ -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,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user