Skip to content

Commit

Permalink
Merged in bank/changes (pull request #147)
Browse files Browse the repository at this point in the history
Bank Changes Added

* Bank Changes Added


Approved-by: Praful Koppalkar
  • Loading branch information
Bopanna M J committed Feb 28, 2023
1 parent e829de6 commit ce149e9
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/PaymentElementRenderer.res
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ let make = (~paymentType: CardTheme.mode, ~cardProps, ~expiryProps, ~cvcProps, ~
"klarna",
"affirm",
"afterpay_clearpay",
"sofort",
"giropay",
"ideal",
"eps",
"google_pay",
"apple_pay",
"paypal",
Expand Down
2 changes: 0 additions & 2 deletions src/Payments/Sofort.res
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ let make = (~countryProps) => {
~confirmParam=confirm.confirmParams,
~handleUserError=false,
)
} else {
postFailedSubmitResponse(~errortype="Unkown error", ~message="")
}
}, [country])
submitPaymentData(submitCallback)
Expand Down
3 changes: 2 additions & 1 deletion src/Types/PaymentMethodListType.res
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
type paymentMethod = Cards | Wallets | PayLater | NONE
type paymentMethod = Cards | Wallets | PayLater | BankRedirect | NONE

type cardType = Credit | Debit
type paymentMethodType =
Expand Down Expand Up @@ -38,6 +38,7 @@ let getMethod = str => {
| "card" => Cards
| "wallet" => Wallets
| "pay_later" => PayLater
| "bank_redirect" => BankRedirect
| _ => NONE
}
}
Expand Down
5 changes: 5 additions & 0 deletions src/Utilities/PaymentUtils.res
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ let paymentListLookup = (arr: array<PaymentMethodListType.methods>, ~order) => {
method.payment_method_types
->Js.Array2.map(item => otherPaymentList->Js.Array2.push(item.payment_method_type))
->ignore
| BankRedirect =>
method.payment_method_types
->Js.Array2.map(item => otherPaymentList->Js.Array2.push(item.payment_method_type))
->ignore
| NONE => ()
}
(otherPaymentList, walletsList)
Expand Down Expand Up @@ -87,6 +91,7 @@ let getConnectors = (list: PaymentMethodListType.list, method: connectorType) =>
| PayLater => "pay_later"
| Wallets => "wallet"
| Cards => "card"
| BankRedirect => "bank_redirect"
| NONE => ""
}
}
Expand Down
4 changes: 4 additions & 0 deletions src/orca-loader/HyperLoader.res
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,10 @@ module Elements = {
| Some(val) => localOptions->Js.Dict.set("appearance", val)
| None => ()
}
switch newOptionsDict->Js.Dict.get("clientSecret") {
| Some(val) => localOptions->Js.Dict.set("clientSecret", val)
| None => ()
}

iframeRef->Js.Array2.forEach(iframe => {
let message =
Expand Down

0 comments on commit ce149e9

Please sign in to comment.