@juspay-tech/react-native-hyperswitch 1.3.4 → 1.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/android/build.gradle +22 -1
  2. package/android/src/main/assets/hyperswitch.bundle +590 -590
  3. package/android/src/main/java/com/hyperswitchsdkreactnative/modules/NativeLog.kt +107 -0
  4. package/android/src/main/java/com/hyperswitchsdkreactnative/modules/ReactNativeHyperswitchModule.kt +318 -117
  5. package/android/src/main/java/io/hyperswitch/paymentsession/ExitHeadlessCallBackManager.kt +4 -2
  6. package/android/src/main/java/io/hyperswitch/paymentsession/PaymentSessionHandlerImpl.kt +20 -4
  7. package/android/src/main/java/io/hyperswitch/paymentsession/PaymentSessionReactLauncher.kt +104 -9
  8. package/android/src/main/java/io/hyperswitch/paymentsheet/PaymentResult.kt +7 -1
  9. package/android/src/main/java/io/hyperswitch/react/HyperModule.kt +13 -0
  10. package/android/src/main/java/io/hyperswitch/view/PaymentWidgetView.kt +27 -4
  11. package/android/src/rn79/assets/hyperswitch.bundle +590 -590
  12. package/android/src/rn79/java/io/hyperswitch/react/HyperFragment.kt +20 -0
  13. package/android/src/rn81/java/io/hyperswitch/react/HyperFragment.kt +20 -0
  14. package/ios/Modules/ReactNative/NativeHyperswitchModuleImpl.swift +3 -1
  15. package/ios/hyperswitchSDK/Core/ApplePay/ApplePayHandler.swift +49 -38
  16. package/ios/hyperswitchSDK/Core/HyperPaymentSheet/PaymentSheetView+UIKit.swift +1 -5
  17. package/ios/hyperswitchSDK/Core/NativeModule/HyperModuleImpl.swift +49 -34
  18. package/ios/hyperswitchSDK/Core/NativeModule/RNHeadlessManager.swift +2 -12
  19. package/ios/hyperswitchSDK/Core/Resources/hyperswitch-rn82plus.bundle +590 -590
  20. package/ios/hyperswitchSDK/Core/Resources/hyperswitch.bundle +590 -590
  21. package/ios/hyperswitchSDK/Shared/Environment.swift +49 -3
  22. package/ios/hyperswitchSDK/Shared/HyperswitchEnvironment.swift +1 -0
  23. package/ios/hyperswitchSDK/Shared/NativeLogger/LogBuilder.swift +15 -0
  24. package/ios/hyperswitchSDK/Shared/NativeLogger/LogManager.swift +10 -2
  25. package/ios/hyperswitchSDK/Shared/NativeLogger/LogPayload.swift +1 -0
  26. package/ios/hyperswitchSDK/Shared/NativeLogger/NativeLog.swift +101 -0
  27. package/ios/hyperswitchSDK/Shared/PaymentSession.swift +8 -1
  28. package/lib/commonjs/index.bundle.js +2 -2
  29. package/lib/commonjs/index.bundle.js.map +1 -1
  30. package/lib/module/index.bundle.js +2 -2
  31. package/lib/module/index.bundle.js.map +1 -1
  32. package/lib/typescript/src/context/HyperElements.d.ts.map +1 -1
  33. package/lib/typescript/src/index.d.ts.map +1 -1
  34. package/lib/typescript/src/native/NativeResponseMapper.d.ts +2 -1
  35. package/lib/typescript/src/native/NativeResponseMapper.d.ts.map +1 -1
  36. package/lib/typescript/src/session/SavedPaymentMethods.d.ts.map +1 -1
  37. package/lib/typescript/src/session/presentPaymentSheet.d.ts +0 -12
  38. package/lib/typescript/src/session/presentPaymentSheet.d.ts.map +1 -1
  39. package/lib/typescript/src/views/PaymentElement.d.ts.map +1 -1
  40. package/package.json +1 -1
  41. package/src/context/HyperElements.tsx +7 -6
  42. package/src/index.ts +9 -1
  43. package/src/native/NativeResponseMapper.ts +20 -4
  44. package/src/session/SavedPaymentMethods.ts +10 -2
  45. package/src/session/presentPaymentSheet.ts +7 -1
  46. package/src/views/PaymentElement.tsx +17 -8
@@ -65,6 +65,27 @@ def REACT_NATIVE_VERSION = reactNativeProperties.getProperty("VERSION_NAME")
65
65
  def REACT_NATIVE_MINOR_VERSION = REACT_NATIVE_VERSION.startsWith("0.0.0-") ? 1000 : REACT_NATIVE_VERSION.split("\\.")[1].toInteger()
66
66
  def REACT_NATIVE_VERSION_NAME = "rn${REACT_NATIVE_MINOR_VERSION}"
67
67
 
68
+ def packageJsonFile = file("../package.json")
69
+ if (!packageJsonFile.exists()) {
70
+ throw new GradleException(
71
+ "[@juspay-tech/react-native-hyperswitch] package.json not found at ${packageJsonFile.absolutePath}; unable to determine the SDK version"
72
+ )
73
+ }
74
+ def packageJson
75
+ try {
76
+ packageJson = new groovy.json.JsonSlurper().parseText(packageJsonFile.text)
77
+ } catch (Exception e) {
78
+ throw new GradleException(
79
+ "[@juspay-tech/react-native-hyperswitch] Failed to parse ${packageJsonFile.absolutePath}: ${e.message}", e
80
+ )
81
+ }
82
+ if (!packageJson.version) {
83
+ throw new GradleException(
84
+ "[@juspay-tech/react-native-hyperswitch] 'version' not found in ${packageJsonFile.absolutePath}"
85
+ )
86
+ }
87
+ version = packageJson.version
88
+
68
89
  //print("${REACT_NATIVE_VERSION_NAME}")
69
90
  android {
70
91
  namespace "com.hyperswitchsdkreactnative"
@@ -158,6 +179,6 @@ dependencies {
158
179
  implementation 'org.greenrobot:eventbus:3.1.0'
159
180
  // implementation "io.hyperswitch:hyperswitch-sdk-android-airborne:1.0.0"
160
181
  implementation "io.hyperswitch:hyperswitch-sdk-android-common:1.0.1"
161
- implementation "io.hyperswitch:hyperswitch-sdk-android-logger:1.0.0"
182
+ implementation "io.hyperswitch:hyperswitch-sdk-android-logger:1.0.7"
162
183
  implementation 'io.hyperswitch:hyperswitch-sdk-android-webview-utils:1.0.6'
163
184
  }