Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add dynamic fields support for multiple bank transfers #788

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions src/Payments/PaymentMethodsRecord.res
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,55 @@ let paymentMethodsFields = [
fields: [InfoElement],
miniIcon: None,
},
{
paymentMethodName: "permata_bank_transfer_transfer",
icon: Some(icon("boleto", ~size=21, ~width=25)),
displayName: "Permata Bank",
fields: [InfoElement],
miniIcon: None,
},
{
paymentMethodName: "bca_bank_transfer_transfer",
icon: Some(icon("boleto", ~size=21, ~width=25)),
displayName: "BCA Bank",
fields: [InfoElement],
miniIcon: None,
},
{
paymentMethodName: "bni_va_transfer",
icon: Some(icon("boleto", ~size=21, ~width=25)),
displayName: "BNI VA",
fields: [InfoElement],
miniIcon: None,
},
{
paymentMethodName: "bri_va_transfer",
icon: Some(icon("boleto", ~size=21, ~width=25)),
displayName: "BRI VA",
fields: [InfoElement],
miniIcon: None,
},
{
paymentMethodName: "cimb_va_transfer",
icon: Some(icon("boleto", ~size=21, ~width=25)),
displayName: "CIMB VA",
fields: [InfoElement],
miniIcon: None,
},
{
paymentMethodName: "danamon_va_transfer",
icon: Some(icon("boleto", ~size=21, ~width=25)),
displayName: "Danamon VA",
fields: [InfoElement],
miniIcon: None,
},
{
paymentMethodName: "mandiri_va_transfer",
icon: Some(icon("boleto", ~size=21, ~width=25)),
displayName: "Mandiri VA",
fields: [InfoElement],
miniIcon: None,
},
{
paymentMethodName: "local_bank_transfer_transfer",
fields: [InfoElement],
Expand Down
7 changes: 7 additions & 0 deletions src/Utilities/DynamicFieldsUtils.res
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ let dynamicFieldsEnabledPaymentMethods = [
"bacs",
"pay_bright",
"multibanco_transfer",
"permata_bank_transfer_transfer",
"bca_bank_transfer_transfer",
"bni_va_transfer",
"bri_va_transfer",
"cimb_va_transfer",
"danamon_va_transfer",
"mandiri_va_transfer",
]

let getName = (item: PaymentMethodsRecord.required_fields, field: RecoilAtomTypes.field) => {
Expand Down
12 changes: 11 additions & 1 deletion src/Utilities/PaymentBody.res
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,17 @@ let appendRedirectPaymentMethods = [
]

let appendBankeDebitMethods = ["sepa"]
let appendBankTransferMethods = ["sepa", "ach", "bacs", "multibanco"]
let appendBankTransferMethods = [
"sepa",
"ach",
"bacs",
"multibanco",
"bni_va",
"bri_va",
"cimb_va",
"danamon_va",
"mandiri_va",
]

let getPaymentMethodSuffix = (~paymentMethodType, ~paymentMethod, ~isQrPaymentMethod) => {
if isQrPaymentMethod {
Expand Down
Loading