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

fix: Currency change #250

Merged
merged 10 commits into from
Jan 12, 2024
6 changes: 3 additions & 3 deletions src/screens/HyperSwitch/SDKPayment/SDKPaymentUtils.res
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
let initialValueForForm: HSwitchSettingTypes.profileEntity => SDKPaymentTypes.paymentType = defaultBusinessProfile => {
{
amount: 10000,
currency: "USD",
currency: "United States-USD",
profile_id: defaultBusinessProfile.profile_id,
description: "Default value",
customer_id: "hyperswitch_sdk_demo_id",
Expand Down Expand Up @@ -91,15 +91,15 @@ let getTypedValueForPayment: Js.Json.t => SDKPaymentTypes.paymentType = values =
mandate_type: {
multi_use: {
amount: 10000,
currency: dictOfValues->getString("currency", "USD"),
currency: dictOfValues->getString("currency", "United States-USD")->getCurrencyValue,
},
},
}
let amount = dictOfValues->getInt("amount", 100)

{
amount,
currency: dictOfValues->getString("currency", "USD"),
currency: dictOfValues->getString("currency", "United States-USD"),
profile_id: dictOfValues->getString("profile_id", ""),
customer_id: dictOfValues->getString("customer_id", ""),
description: dictOfValues->getString("description", "Default value"),
Expand Down
Loading