Skip to content

Commit

Permalink
fix: moved defaultView prop from hyperParams to configuration object
Browse files Browse the repository at this point in the history
  • Loading branch information
Shivam25092001 committed Feb 14, 2025
1 parent 7c1c2f8 commit a1e2db3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion android
Submodule android updated 47 files
+19 −0 .github/workflows/client-core-dispatch.yml
+890 −866 app/src/main/assets/hyperswitch.bundle
+8 −0 app/src/main/java/io/hyperswitch/react/HyperModule.kt
+4 −2 app/src/main/java/io/hyperswitch/react/Utils.kt
+53 −5 app/src/main/java/io/hyperswitch/view/GooglePayButtonView.kt
+16 −0 app/src/main/res/values/theme.xml
+113 −43 build-lib.sh
+6 −0 build.gradle
+40 −3 demo-app/build.gradle
+5 −12 demo-app/src/main/AndroidManifest.xml
+54 −13 demo-app/src/main/java/io/hyperswitch/demoapp/MainActivity.kt
+61 −71 demo-app/src/main/res/layout/main_activity.xml
+0 −6 demo-app/src/main/res/values/colors.xml
+0 −4 demo-app/src/main/res/values/strings.xml
+12 −4 demo-app/src/main/res/values/styles.xml
+2 −2 gradle.properties
+1 −1 hyperswitch-gradle-plugin/build.gradle
+1 −4 hyperswitch-gradle-plugin/src/main/groovy/io/hyperswitch/HyperPlugin.groovy
+1 −32 hyperswitch-sdk-android-lite/build.gradle
+0 −0 hyperswitch-sdk-android-lite/consumer-rules.pro
+1 −2 hyperswitch-sdk-android-lite/src/main/AndroidManifest.xml
+1 −1 hyperswitch-sdk-android-lite/src/main/java/io/hyperswitch/PaymentConfiguration.kt
+23 −0 hyperswitch-sdk-android-lite/src/main/java/io/hyperswitch/lite/WebViewFragment.kt
+2 −2 ...h-sdk-android-lite/src/main/java/io/hyperswitch/payments/expresscheckoutlauncher/ExpressCheckoutLauncher.kt
+2 −2 ...-lite/src/main/java/io/hyperswitch/payments/expresscheckoutlauncher/ExpressCheckoutPaymentMethodLauncher.kt
+8 −11 hyperswitch-sdk-android-lite/src/main/java/io/hyperswitch/payments/googlepaylauncher/GooglePayActivity.kt
+2 −2 hyperswitch-sdk-android-lite/src/main/java/io/hyperswitch/payments/googlepaylauncher/GooglePayLauncher.kt
+2 −2 ...-sdk-android-lite/src/main/java/io/hyperswitch/payments/googlepaylauncher/GooglePayPaymentMethodLauncher.kt
+14 −7 hyperswitch-sdk-android-lite/src/main/java/io/hyperswitch/payments/googlepaylauncher/GooglePayViewModel.kt
+2 −2 hyperswitch-sdk-android-lite/src/main/java/io/hyperswitch/payments/paymentlauncher/PaymentLauncher.kt
+4 −2 hyperswitch-sdk-android-lite/src/main/java/io/hyperswitch/payments/paymentlauncher/PaymentResult.kt
+2 −2 hyperswitch-sdk-android-lite/src/main/java/io/hyperswitch/payments/paypallauncher/PayPalLauncher.kt
+2 −2 ...switch-sdk-android-lite/src/main/java/io/hyperswitch/payments/paypallauncher/PayPalPaymentMethodLauncher.kt
+0 −62 hyperswitch-sdk-android-lite/src/main/java/io/hyperswitch/payments/view/GooglePayButtonView.kt
+7 −0 hyperswitch-sdk-android-lite/src/main/java/io/hyperswitch/paymentsession/LaunchOptions.kt
+0 −29 hyperswitch-sdk-android-lite/src/main/java/io/hyperswitch/paymentsheet/AddressElementActivityContract.kt
+21 −20 hyperswitch-sdk-android-lite/src/main/java/io/hyperswitch/paymentsheet/AddressLauncher.kt
+2 −2 hyperswitch-sdk-android-lite/src/main/java/io/hyperswitch/paymentsheet/DefaultFlowController.kt
+10 −40 hyperswitch-sdk-android-lite/src/main/java/io/hyperswitch/paymentsheet/DefaultPaymentSheetLauncher.kt
+4 −4 hyperswitch-sdk-android-lite/src/main/java/io/hyperswitch/paymentsheet/FlowControllerFactory.kt
+1 −1 hyperswitch-sdk-android-lite/src/main/java/io/hyperswitch/paymentsheet/PaymentOption.kt
+12 −8 hyperswitch-sdk-android-lite/src/main/java/io/hyperswitch/paymentsheet/PaymentSheet.kt
+8 −9 hyperswitch-sdk-android-lite/src/main/java/io/hyperswitch/paymentsheet/PaymentSheetContract.kt
+3 −6 hyperswitch-sdk-android-lite/src/main/res/values/theme.xml
+0 −89 libraryCreation.patch
+0 −1 maven/public/icons/samsung_pay.svg
+1 −1 settings.gradle
2 changes: 1 addition & 1 deletion ios
Submodule ios updated 32 files
+2 −2 hyperswitch-sdk-ios.podspec
+115 −93 hyperswitch.xcodeproj/project.pbxproj
+34 −33 hyperswitch/HyperViewModel.swift
+133 −0 hyperswitch/PMMViewController.swift
+14 −7 hyperswitch/SwiftUIView.swift
+6 −19 hyperswitch/ViewController.swift
+1 −8 hyperswitchAppClip/AppDelegate.swift
+38 −0 hyperswitchAppClip/ContentView.swift
+81 −0 hyperswitchAppClip/SwiftUIView.swift
+18 −0 hyperswitchAppClip/hyperClip.swift
+5 −12 hyperswitchSDK/Core/HyperExpressCheckout/ExpressCheckoutLauncher.swift
+0 −93 hyperswitchSDK/Core/HyperPaymentMethodManagement/PaymentMethodManagement.swift
+94 −0 hyperswitchSDK/Core/HyperPaymentMethodManagement/PaymentMethodManagementWidget.swift
+1 −24 hyperswitchSDK/Core/HyperPaymentSheet/PaymentSheetView+SwiftUI.swift
+4 −20 hyperswitchSDK/Core/HyperPaymentSheet/PaymentSheetView.swift
+0 −5 hyperswitchSDK/Core/HyperSession/PaymentSession+UIKit.swift
+3 −7 hyperswitchSDK/Core/NativeModule/HyperHeadless.swift
+11 −0 hyperswitchSDK/Core/NativeModule/HyperModule.m
+5 −0 hyperswitchSDK/Core/NativeModule/HyperModule.swift
+1 −1 hyperswitchSDK/Core/Resources/CodePush.plist
+1,015 −989 hyperswitchSDK/Core/Resources/hyperswitch.bundle
+0 −0 hyperswitchSDK/CoreLite/ApplePayHandlerLite.swift
+1 −1 hyperswitchSDK/CoreLite/PaymentSession+Lite.swift
+4 −11 hyperswitchSDK/CoreLite/PaymentSheetView+Lite.swift
+48 −0 hyperswitchSDK/CoreLite/SwiftUI+Lite.swift
+0 −0 hyperswitchSDK/CoreLite/WebViewController.swift
+35 −0 hyperswitchSDK/Shared/HyperParams.swift
+2 −1 hyperswitchSDK/Shared/PaymentSession.swift
+1 −3 hyperswitchSDK/Shared/PaymentSheet.swift
+4 −0 hyperswitchSDK/Shared/PaymentSheetConfiguration.swift
+0 −11 hyperswitchSDK/Shared/SwiftUIManager.swift
+1 −1 hyperswitchSDK/Shared/Version.swift
2 changes: 1 addition & 1 deletion src/routes/ParentPaymentSheet.res
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ let make = () => {
{switch (allApiData.savedPaymentMethods, allApiData.additionalPMLData.paymentType, canLoadSDK) {
| (_, _, false) => <SdkLoadingScreen />
| (Loading, _, _) =>
nativeProp.hyperParams.defaultView
nativeProp.configuration.defaultView
? <PaymentSheet setConfirmButtonDataRef />
: <SdkLoadingScreen />
| (Some(data), _, _) =>
Expand Down
4 changes: 2 additions & 2 deletions src/types/SdkTypes.res
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ type configurationType = {
displaySavedPaymentMethodsCheckbox: bool,
displaySavedPaymentMethods: bool,
placeholder: placeholder,
defaultView: bool,
netceteraSDKApiKey: option<string>,
displayDefaultSavedPaymentIcon: bool,
enablePartialLoading: bool,
Expand Down Expand Up @@ -301,7 +302,6 @@ type hyperParams = {
disableBranding: bool,
ip: option<string>,
userAgent: option<string>,
defaultView: bool,
launchTime?: float,
sdkVersion: string,
device_model: option<string>,
Expand Down Expand Up @@ -901,6 +901,7 @@ let parseConfigurationDict = (configObj, from) => {
true,
),
displaySavedPaymentMethods: getBool(configObj, "displaySavedPaymentMethods", true),
defaultView: getBool(configObj, "defaultView", false),
netceteraSDKApiKey: getOptionString(configObj, "netceteraSDKApiKey"),
placeholder: {
cardNumber: getString(placeholderDict, "cardNumber", "1234 1234 1234 1234"),
Expand Down Expand Up @@ -960,7 +961,6 @@ let nativeJsonToRecord = (jsonFromNative, rootTag) => {
disableBranding: getBool(hyperParams, "disableBranding", true),
ip: getOptionString(hyperParams, "ip"),
userAgent: getOptionString(hyperParams, "user-agent"),
defaultView: getBool(hyperParams, "defaultView", false),
confirm: getBool(hyperParams, "confirm", false),
launchTime: ?getOptionFloat(hyperParams, "launchTime"),
sdkVersion: getString(hyperParams, "sdkVersion", ""),
Expand Down

0 comments on commit a1e2db3

Please sign in to comment.