feat(connector): [trustpay] introduce instant bank_transfer, finland and poland (#7925)

Co-authored-by: PiX <69745008+pixincreate@users.noreply.github.com>
This commit is contained in:
Swangi Kumari
2025-06-13 12:03:32 +05:30
committed by GitHub
parent c72d365fde
commit 61c2e2c75f
53 changed files with 600 additions and 141 deletions

View File

@ -3238,6 +3238,56 @@ fn get_bank_transfer_required_fields() -> HashMap<enums::PaymentMethodType, Conn
),
)]),
),
(
enums::PaymentMethodType::InstantBankTransferFinland,
connectors(vec![(
Connector::Trustpay,
fields(
vec![],
vec![],
vec![
RequiredField::Email,
RequiredField::BillingFirstName(
"billing_first_name",
FieldType::UserBillingName,
),
RequiredField::BillingLastName(
"billing_last_name",
FieldType::UserBillingName,
),
RequiredField::BillingAddressLine1,
RequiredField::BillingAddressCity,
RequiredField::BillingAddressZip,
RequiredField::BillingAddressCountries(vec!["FI"]),
],
),
)]),
),
(
enums::PaymentMethodType::InstantBankTransferPoland,
connectors(vec![(
Connector::Trustpay,
fields(
vec![],
vec![],
vec![
RequiredField::Email,
RequiredField::BillingFirstName(
"billing_first_name",
FieldType::UserBillingName,
),
RequiredField::BillingLastName(
"billing_last_name",
FieldType::UserBillingName,
),
RequiredField::BillingAddressLine1,
RequiredField::BillingAddressCity,
RequiredField::BillingAddressZip,
RequiredField::BillingAddressCountries(vec!["PL"]),
],
),
)]),
),
(
enums::PaymentMethodType::Bacs,
connectors(vec![(

View File

@ -163,6 +163,8 @@ pub fn validate_payment_method_type_against_payment_method(
| api_enums::PaymentMethodType::MandiriVa
| api_enums::PaymentMethodType::LocalBankTransfer
| api_enums::PaymentMethodType::InstantBankTransfer
| api_enums::PaymentMethodType::InstantBankTransferFinland
| api_enums::PaymentMethodType::InstantBankTransferPoland
),
api_enums::PaymentMethod::BankDebit => matches!(
payment_method_type,