feat: react-native sdk parity with main-sdk - #54
Open
manideepk90 wants to merge 3 commits into
Open
Conversation
manideepk90
force-pushed
the
feat-core-sdk
branch
from
July 3, 2026 08:58
72f5334 to
86705c0
Compare
manideepk90
force-pushed
the
feat-core-sdk
branch
from
July 13, 2026 06:50
a85db5d to
e62ffb2
Compare
manideepk90
commented
Jul 13, 2026
manideepk90
commented
Jul 13, 2026
manideepk90
commented
Jul 13, 2026
manideepk90
commented
Jul 13, 2026
…ypeScript - Deleted obsolete ReasonML files: AppearanceTransformer.res, EventValidator.res, NewArchUtils.res, PaymentSheetEventManager.res, ReactNativeUtils.res, ResponseHandler.res, CvcWidget.res, NativePaymentWidget.res, PaymentWidget.res. - Introduced new TypeScript files: EventValidator.ts, NewArchUtils.ts, ReactNativeUtils.ts, NativePaymentWidget.ts, CVCElementView.tsx, PaymentElement.ts, PaymentElementView.tsx, CvcWidget.ts, NativePaymentWidgetImpl.ts. - Updated CVC and Payment widgets to use new TypeScript components and utility functions. - Enhanced event validation and response handling in the new TypeScript implementations.
manideepk90
force-pushed
the
feat-core-sdk
branch
from
July 13, 2026 10:25
e62ffb2 to
e9d0049
Compare
There was a problem hiding this comment.
Pull request overview
This PR aims to bring the React Native Hyperswitch SDK in line with the main SDK by moving to a TypeScript-based “universal session” contract, updating native module specs/bridges, and introducing a new @juspay-tech/react-hyperswitch package that provides platform-agnostic React bindings.
Changes:
- Replaces large parts of the prior ReScript-based surface area with TypeScript implementations (elements factories, widget registry, new-arch utils, etc.).
- Updates native specs and iOS/Android integrations to match the new configuration/session APIs (including update-intent hooks and event plumbing).
- Adds a new
@juspay-tech/react-hyperswitchpackage + updates the example app and tooling to consume the new universal API.
Reviewed changes
Copilot reviewed 165 out of 170 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/@juspay-tech/react-native-hyperswitch/src/views/PaymentElement.ts | Adds RN PaymentElement handle factory aligned with universal session contract. |
| packages/@juspay-tech/react-native-hyperswitch/src/views/NativePaymentWidgetImpl.ts | New TS implementation for selecting Fabric vs legacy native component. |
| packages/@juspay-tech/react-native-hyperswitch/src/views/NativePaymentWidgetImpl.res | Removes prior ReScript implementation. |
| packages/@juspay-tech/react-native-hyperswitch/src/views/NativePaymentWidget.ts | Re-exports native widget wrapper for TS consumers. |
| packages/@juspay-tech/react-native-hyperswitch/src/views/NativePaymentWidget.res | Removes prior ReScript wrapper. |
| packages/@juspay-tech/react-native-hyperswitch/src/views/CvcWidget.ts | Adds RN CVC widget handle factory aligned with universal session contract. |
| packages/@juspay-tech/react-native-hyperswitch/src/views/CvcWidget.res | Removes prior ReScript implementation. |
| packages/@juspay-tech/react-native-hyperswitch/src/views/CVCElementView.tsx | Adds TSX RN view wrapper for the CVC widget. |
| packages/@juspay-tech/react-native-hyperswitch/src/utils/ResponseHandler.res | Removes prior ReScript response parsing utilities. |
| packages/@juspay-tech/react-native-hyperswitch/src/utils/ReactNativeUtils.ts | Adds TS wrappers for UIManager command dispatch + findNodeHandle. |
| packages/@juspay-tech/react-native-hyperswitch/src/utils/ReactNativeUtils.res | Removes prior ReScript react-native externals. |
| packages/@juspay-tech/react-native-hyperswitch/src/utils/PaymentSheetEventManager.res | Removes prior ReScript event manager (DeviceEventEmitter wiring). |
| packages/@juspay-tech/react-native-hyperswitch/src/utils/NewArchUtils.ts | Adds TS new-architecture detection helpers (TurboModule/Fabric). |
| packages/@juspay-tech/react-native-hyperswitch/src/utils/NewArchUtils.res | Removes prior ReScript new-arch helpers. |
| packages/@juspay-tech/react-native-hyperswitch/src/utils/EventValidator.ts | Adds TS event subscription validation + warning payload helper. |
| packages/@juspay-tech/react-native-hyperswitch/src/utils/EventValidator.res | Removes prior ReScript event validator. |
| packages/@juspay-tech/react-native-hyperswitch/src/utils/AppearanceTransformer.res | Removes prior ReScript appearance transformer for CVC. |
| packages/@juspay-tech/react-native-hyperswitch/src/types/rescript-react-native.d.ts | Removes ReScript React Native type shims. |
| packages/@juspay-tech/react-native-hyperswitch/src/types/NativeModuleTypes.ts | Adds TS native event and native component prop types. |
| packages/@juspay-tech/react-native-hyperswitch/src/types/NativeModuleTypes.res | Removes prior ReScript native type definitions. |
| packages/@juspay-tech/react-native-hyperswitch/src/types/HyperTypes.res | Removes prior ReScript HyperTypes definitions. |
| packages/@juspay-tech/react-native-hyperswitch/src/specs/PaymentWidgetNativeComponent.ts | Updates codegen component spec types (result/payload) and options import. |
| packages/@juspay-tech/react-native-hyperswitch/src/specs/NativeHyperswitchSdkReactNative.ts | Updates TurboModule spec to handle instanceHandle + richer config + updateIntent. |
| packages/@juspay-tech/react-native-hyperswitch/src/specs/NativeHyperswitchSdkNative.ts | Adds new native method surface (onUpdateIntentEvent). |
| packages/@juspay-tech/react-native-hyperswitch/src/specs/GooglePayButtonNativeComponent.android.ts | Removes older Android-specific codegen component. |
| packages/@juspay-tech/react-native-hyperswitch/src/specs/ApplePayViewNativeComponent.ts | Exports NativeProps interface for wider reuse. |
| packages/@juspay-tech/react-native-hyperswitch/src/modules/NativeHyperswitchSdk.ts | Adds TS bridge wrapper + widget-related native module function accessors. |
| packages/@juspay-tech/react-native-hyperswitch/src/modules/NativeHyperswitchSdk.res | Removes prior ReScript native module wrapper. |
| packages/@juspay-tech/react-native-hyperswitch/src/index.tsx | Removes prior ReScript-generated entrypoint exports. |
| packages/@juspay-tech/react-native-hyperswitch/src/index.ts | Adds new TS entrypoint implementing universal session adapter (loadHyper). |
| packages/@juspay-tech/react-native-hyperswitch/src/hooks/useWidget.res | Removes prior ReScript hook implementation. |
| packages/@juspay-tech/react-native-hyperswitch/src/hooks/usePaymentSession.res | Removes prior ReScript session hook implementation. |
| packages/@juspay-tech/react-native-hyperswitch/src/definitions.ts | Adds shared universal contract types for session/elements/widgets. |
| packages/@juspay-tech/react-native-hyperswitch/src/core/HyperElements.res | Removes prior ReScript context provider. |
| packages/@juspay-tech/react-native-hyperswitch/src/context/WidgetRegistry.ts | Adds TS widget registry to map widget IDs to native view IDs + widget actions. |
| packages/@juspay-tech/react-native-hyperswitch/src/context/WidgetRegistry.res | Removes prior ReScript widget registry. |
| packages/@juspay-tech/react-native-hyperswitch/src/context/HyperProvider.res | Removes legacy ReScript provider code. |
| packages/@juspay-tech/react-native-hyperswitch/src/tests/index.test.tsx | Removes placeholder test. |
| packages/@juspay-tech/react-native-hyperswitch/rollup.config.js | Switches bundling entrypoint from index.tsx to index.ts. |
| packages/@juspay-tech/react-native-hyperswitch/rescript.json | Removes ReScript build configuration. |
| packages/@juspay-tech/react-native-hyperswitch/package.json | Updates entrypoints/scripts/deps for TS-based build + workspace example reference. |
| packages/@juspay-tech/react-native-hyperswitch/ios/Views/Native/NativePaymentWidget.m | Exposes update-intent methods in RN extern module declarations. |
| packages/@juspay-tech/react-native-hyperswitch/ios/hyperswitchSDK/Shared/Version.swift | Bumps iOS SDK version constant. |
| packages/@juspay-tech/react-native-hyperswitch/ios/hyperswitchSDK/Shared/SDKParams.swift | Adds SDK params helper (app/device metadata). |
| packages/@juspay-tech/react-native-hyperswitch/ios/hyperswitchSDK/Shared/SavedPaymentMethodsConfiguration.swift | Adds config type for filtering returned saved methods. |
| packages/@juspay-tech/react-native-hyperswitch/ios/hyperswitchSDK/Shared/PaymentSheetAppearance+Codable.swift | Adds codable support for new primary button height field. |
| packages/@juspay-tech/react-native-hyperswitch/ios/hyperswitchSDK/Shared/PaymentSheetAppearance.swift | Refactors appearance structures; adds primary button height. |
| packages/@juspay-tech/react-native-hyperswitch/ios/hyperswitchSDK/Shared/PaymentSheet.swift | Updates PaymentSheet initialization model and internal fields. |
| packages/@juspay-tech/react-native-hyperswitch/ios/hyperswitchSDK/Shared/PaymentSessionConfiguration.swift | Adds codable session configuration wrapper. |
| packages/@juspay-tech/react-native-hyperswitch/ios/hyperswitchSDK/Shared/PaymentSession.swift | Adds update-intent support and moves to instance-based configuration state. |
| packages/@juspay-tech/react-native-hyperswitch/ios/hyperswitchSDK/Shared/PaymentMethodType.swift | Adds payment request data + method type enums. |
| packages/@juspay-tech/react-native-hyperswitch/ios/hyperswitchSDK/Shared/NativeLogger/LogPayload.swift | Extends log payload + event names for new flows. |
| packages/@juspay-tech/react-native-hyperswitch/ios/hyperswitchSDK/Shared/NativeLogger/LogBuilder.swift | Wires authentication_id into payload building. |
| packages/@juspay-tech/react-native-hyperswitch/ios/hyperswitchSDK/Shared/HyperUIViewController.swift | Adds paymentSheet reference for view controller ownership. |
| packages/@juspay-tech/react-native-hyperswitch/ios/hyperswitchSDK/Shared/HyperswitchEnvironment.swift | Adds environment enum (sandbox/production). |
| packages/@juspay-tech/react-native-hyperswitch/ios/hyperswitchSDK/Shared/HyperswitchConfigurationSchema.swift | Adds codable Hyperswitch configuration schema types. |
| packages/@juspay-tech/react-native-hyperswitch/ios/hyperswitchSDK/Shared/Hyperswitch.swift | Adds Hyperswitch wrapper entrypoint to create payment sessions. |
| packages/@juspay-tech/react-native-hyperswitch/ios/hyperswitchSDK/Shared/HyperEvents/PaymentEventType.swift | Adds typed event types and PaymentEvent model. |
| packages/@juspay-tech/react-native-hyperswitch/ios/hyperswitchSDK/Shared/HyperEvents/PaymentEventSubscriptionBuilder.swift | Adds subscription builder + listener wiring for events. |
| packages/@juspay-tech/react-native-hyperswitch/ios/hyperswitchSDK/Shared/HyperEvents/PaymentEventData.swift | Adds typed payload parsing helpers for payment events. |
| packages/@juspay-tech/react-native-hyperswitch/ios/hyperswitchSDK/Shared/Extensions.swift | Adds Encodable->Dictionary and UIColor hex utilities. |
| packages/@juspay-tech/react-native-hyperswitch/ios/hyperswitchSDK/Shared/CustomEndpointConfiguration.swift | Adds codable endpoint override config model. |
| packages/@juspay-tech/react-native-hyperswitch/ios/hyperswitchSDK/Shared/Codable+UIKit.swift | Removes UIColor helpers duplicated elsewhere. |
| packages/@juspay-tech/react-native-hyperswitch/ios/hyperswitchSDK/Shared/APIClient.swift | Adds profileId property to shared API client. |
| packages/@juspay-tech/react-native-hyperswitch/ios/hyperswitchSDK/CoreLite/SwiftUI+Lite.swift | Adds SwiftUI-lite integration for presenting payment sheet. |
| packages/@juspay-tech/react-native-hyperswitch/ios/hyperswitchSDK/CoreLite/PaymentSheetView+Lite.swift | Adds Lite payment sheet presentation via webview controller. |
| packages/@juspay-tech/react-native-hyperswitch/ios/hyperswitchSDK/CoreLite/PaymentSession+Lite.swift | Adds PaymentSession Lite API to present the lite sheet. |
| packages/@juspay-tech/react-native-hyperswitch/ios/hyperswitchSDK/Core/NativeModule/WidgetAction.swift | Adds update-intent actions to widget action enum. |
| packages/@juspay-tech/react-native-hyperswitch/ios/hyperswitchSDK/Core/NativeModule/RNViewManager.swift | Adds method to create widget root views with module name + props. |
| packages/@juspay-tech/react-native-hyperswitch/ios/hyperswitchSDK/Core/NativeModule/HyperModule.m | Updates extern methods: removes presentPaymentSheet; adds update-intent + iframe bridge hooks. |
| packages/@juspay-tech/react-native-hyperswitch/ios/hyperswitchSDK/Core/NativeModule/HyperHeadless.swift | Updates headless module behavior and introduces payment result parsing helper. |
| packages/@juspay-tech/react-native-hyperswitch/ios/hyperswitchSDK/Core/NativeModule/HyperHeadless.m | Updates extern signature for getPaymentSession to include rootTag. |
| packages/@juspay-tech/react-native-hyperswitch/ios/hyperswitchSDK/Core/HyperSession/PaymentSessionTypes.swift | Updates handler signature to accept CVCWidget for last-used confirm. |
| packages/@juspay-tech/react-native-hyperswitch/ios/hyperswitchSDK/Core/HyperPaymentSheet/PaymentSheetView+UIKit.swift | Switches completion type to PaymentResult; refactors presentation setup. |
| packages/@juspay-tech/react-native-hyperswitch/ios/hyperswitchSDK/Core/HyperPaymentSheet/PaymentSheetView+SwiftUI.swift | Updates SwiftUI completion type to PaymentResult. |
| packages/@juspay-tech/react-native-hyperswitch/ios/hyperswitchSDK/Core/HyperPaymentSheet/PaymentSheetView.swift | Updates props passed into RN root view (config/session/sdk params) + removes old response handler. |
| packages/@juspay-tech/react-native-hyperswitch/ios/hyperswitchSDK/Core/HyperPaymentSheet/PaymentSheet+Events.swift | Adds event dispatch and shouldProceedWithPayment callback plumbing. |
| packages/@juspay-tech/react-native-hyperswitch/ios/hyperswitchSDK/Core/HyperPaymentMethodManagement/PaymentMethodManagementWidget.swift | Updates props to include profileId and new SDK params. |
| packages/@juspay-tech/react-native-hyperswitch/ios/hyperswitchSDK/Core/HyperPaymentCardTextField/PaymentIntentParams.swift | Includes profileId in card field props. |
| packages/@juspay-tech/react-native-hyperswitch/ios/hyperswitchSDK/Core/HyperExpressCheckout/ExpressCheckoutLauncher.swift | Includes profileId + new SDK params wiring in express checkout flows. |
| packages/@juspay-tech/react-native-hyperswitch/ios/hyperswitchSDK/Core/HyperCVCWidget/CVCWidget.swift | Adds native CVCWidget view that hosts RN and supports confirm + event subscriptions. |
| packages/@juspay-tech/react-native-hyperswitch/ios/hyperswitchSDK/Core/DeviceDataCollection/HeadlessWebView.swift | Adds headless webview for device data collection with timeout + cleanup. |
| packages/@juspay-tech/react-native-hyperswitch/HyperswitchSdkReactNative.podspec | Refines iOS source/resource globs; pins resources explicitly. |
| packages/@juspay-tech/react-native-hyperswitch/android/src/main/java/io/hyperswitch/HyperswitchReactPackageProvider.kt | Adds host-side package provider for autolinked packages. |
| packages/@juspay-tech/react-native-hyperswitch/android/src/main/java/com/hyperswitchsdkreactnative/views/GooglePayButtonViewManager.kt | Removes local Google Pay view manager (delegated to shared RN lib). |
| packages/@juspay-tech/react-native-hyperswitch/android/src/main/java/com/hyperswitchsdkreactnative/views/GooglePayButtonView.kt | Removes local Google Pay view implementation. |
| packages/@juspay-tech/react-native-hyperswitch/android/src/main/java/com/hyperswitchsdkreactnative/utils/HyperFragmentManager.kt | Removes fragment manager glue (moved to shared RN artifact). |
| packages/@juspay-tech/react-native-hyperswitch/android/src/main/java/com/hyperswitchsdkreactnative/provider/HyperProvider.kt | Removes provider glue (moved to shared RN artifact). |
| packages/@juspay-tech/react-native-hyperswitch/android/src/main/java/com/hyperswitchsdkreactnative/HyperswitchSdkReactNativePackage.kt | Updates RN package to use shared io.hyperswitch.react modules/managers. |
| packages/@juspay-tech/react-native-hyperswitch/android/src/main/java/com/hyperswitchsdkreactnative/headless/PaymentSessionHandler.kt | Removes headless bridge types (moved to shared RN artifact). |
| packages/@juspay-tech/react-native-hyperswitch/android/src/main/java/com/hyperswitchsdkreactnative/headless/PaymentMethod.kt | Removes headless model types (moved to shared RN artifact). |
| packages/@juspay-tech/react-native-hyperswitch/android/src/main/java/com/hyperswitchsdkreactnative/headless/HyperHeadlessModule.kt | Removes wrapper headless module (replaced by shared RN module). |
| packages/@juspay-tech/react-native-hyperswitch/android/src/main/java/com/hyperswitchsdkreactnative/headless/HeadlessPaymentResult.kt | Removes wrapper headless result type. |
| packages/@juspay-tech/react-native-hyperswitch/android/src/main/java/com/hyperswitchsdkreactnative/headless/HeadlessManager.kt | Removes wrapper headless task manager. |
| packages/@juspay-tech/react-native-hyperswitch/android/src/main/java/com/hyperswitchsdkreactnative/headless/HeadlessFlowController.kt | Removes wrapper orchestration glue for headless flow. |
| packages/@juspay-tech/react-native-hyperswitch/android/src/main/java/com/hyperswitchsdkreactnative/headless/GetPaymentSessionCallBackManager.kt | Removes wrapper callback manager. |
| packages/@juspay-tech/react-native-hyperswitch/android/src/main/java/com/hyperswitchsdkreactnative/headless/ExitHeadlessCallBackManager.kt | Removes wrapper exit callback manager. |
| packages/@juspay-tech/react-native-hyperswitch/android/src/main/AndroidManifest.xml | Adds metadata toggles for Hermes/new-arch + native loading flags. |
| packages/@juspay-tech/react-native-hyperswitch/android/src/legacy/java/com/hyperswitchsdkreactnative/NativeHyperswitchSdkReactNativeSpec.java | Updates legacy spec signatures (config object, instanceHandle, updateIntent, etc.). |
| packages/@juspay-tech/react-native-hyperswitch/android/src/legacy/java/com/facebook/react/viewmanagers/NativePaymentWidgetManagerInterface.java | Removes widgetId prop setter from legacy generated manager interface. |
| packages/@juspay-tech/react-native-hyperswitch/android/src/legacy/java/com/facebook/react/viewmanagers/NativePaymentWidgetManagerDelegate.java | Removes widgetId prop routing from legacy delegate. |
| packages/@juspay-tech/react-native-hyperswitch/android/build.gradle | Adds local repos + switches dependency to shared hyperswitch-sdk-android-react-native artifact. |
| packages/@juspay-tech/react-hyperswitch/tsconfig.json | Adds TS config for new universal React bindings package. |
| packages/@juspay-tech/react-hyperswitch/src/types/react-native.d.ts | Adds minimal RN module shim for compilation. |
| packages/@juspay-tech/react-hyperswitch/src/types/PaymentTypes.ts | Introduces universal payment result/event/request types. |
| packages/@juspay-tech/react-hyperswitch/src/types/PaymentSessionTypes.ts | Adds universal PaymentSession type contract. |
| packages/@juspay-tech/react-hyperswitch/src/types/PaymentMethodTypes.ts | Adds saved payment method type models. |
| packages/@juspay-tech/react-hyperswitch/src/types/PaymentElementTypes.ts | Adds universal PaymentElement API + props/handle types. |
| packages/@juspay-tech/react-hyperswitch/src/types/HyperswitchSessionTypes.ts | Adds universal session/configuration types. |
| packages/@juspay-tech/react-hyperswitch/src/types/ElementsTypes.ts | Adds Elements + actions contract used by hooks/components. |
| packages/@juspay-tech/react-hyperswitch/src/types/CvcWidgetTypes.ts | Adds CVC widget types for universal API. |
| packages/@juspay-tech/react-hyperswitch/src/types/CustomerSavedPaymentMethodsSessionTypes.ts | Adds types for saved payment methods session contract. |
| packages/@juspay-tech/react-hyperswitch/src/types/CustomerLastUsedPaymentMethodTypes.ts | Adds last-used payment method types. |
| packages/@juspay-tech/react-hyperswitch/src/types/CustomerDefaultSavedPaymentMethodTypes.ts | Adds default-saved payment method types. |
| packages/@juspay-tech/react-hyperswitch/src/types/AppearanceTypes.ts | Adds universal appearance configuration types. |
| packages/@juspay-tech/react-hyperswitch/src/react/widget-registry.ts | Adds small registry for widgets in React bindings package. |
| packages/@juspay-tech/react-hyperswitch/src/react/PlatformView.tsx | Adds cross-platform container for RN vs web rendering. |
| packages/@juspay-tech/react-hyperswitch/src/react/PaymentElement.tsx | Adds universal PaymentElement React component and imperative handle wiring. |
| packages/@juspay-tech/react-hyperswitch/src/react/HyperElements.tsx | Adds universal HyperElements context provider. |
| packages/@juspay-tech/react-hyperswitch/src/react/hooks.ts | Adds universal hooks (usePaymentSession, useElements). |
| packages/@juspay-tech/react-hyperswitch/src/index.ts | Exports public API of the new universal bindings package. |
| packages/@juspay-tech/react-hyperswitch/src/definitions.ts | Aggregates type exports for consumer imports. |
| packages/@juspay-tech/react-hyperswitch/package.json | Adds package metadata/scripts/peer deps for new universal bindings package. |
| packages/@juspay-tech/react-hyperswitch/.gitignore | Adds build/artifact ignores for new package. |
| example/tsconfig.json | Adds example TS config with workspace path aliases for local dev. |
| example/src/utils.ts | Updates example configuration to use new universal types/options. |
| example/src/styles.ts | Removes old example styles file. |
| example/src/HyperContent.tsx | Adds example UI integration using universal components/hooks. |
| example/src/GradientBackground.tsx | Removes old example gradient background component. |
| example/src/DemoPopup.tsx | Adds example popup flow for payment intent + HyperElements integration. |
| example/react-native.config.js | Adds local dependency mapping for new @juspay-tech/react-hyperswitch package. |
| example/package.json | Links workspace packages + adds merchant-mode scripts + dev deps. |
| example/metro.config.js | Reworks Metro setup for workspace source vs “merchant mode” resolution. |
| example/ios/Podfile | Forces old-arch (new-arch disabled) and adds Xcode fmt workaround. |
| example/android/build.gradle | Adds mavenLocal and sets hyperswitchSdkVersion ext property. |
| example/android/app/build.gradle | Adds repositories block to include mavenLocal/google/mavenCentral. |
| example/android/.kotlin/errors/errors-1783336022927.log | Adds Kotlin daemon error log (should not be committed). |
| example/android/.kotlin/errors/errors-1782755475880.log | Adds Kotlin daemon error log (should not be committed). |
Comments suppressed due to low confidence (2)
packages/@juspay-tech/react-native-hyperswitch/android/build.gradle:10
mavenLocal()is enabled unconditionally for the library buildscript repositories. This can cause non-reproducible builds or accidental dependency shadowing if developers have local artifacts installed.
packages/@juspay-tech/react-native-hyperswitch/android/build.gradle:29mavenLocal()is enabled unconditionally for the library's repositories, which can shadow remote artifacts and make CI vs local builds diverge. Consider making it opt-in.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+11
to
+13
| export function getFindNodeHandle(ref: unknown): number { | ||
| return findNodeHandle(ref as React.ElementRef<typeof UIManager>) ?? -1; | ||
| } |
Comment on lines
+1
to
+2
| import type { ViewStyle } from 'react-native'; | ||
| import type { options as PaymentSheetConfigurationOptions } from './PaymentSheetConfiguration'; |
Comment on lines
+24
to
+26
| function parsePaymentResult(result: string): paymentResult { | ||
| return JSON.parse(result); | ||
| } |
Comment on lines
+22
to
+24
| export function consoleLogAll(): void { | ||
| console.log('Current widgetHashMap contents: ', widgetHashMap); | ||
| } |
Contributor
Author
There was a problem hiding this comment.
remove this line
Comment on lines
+26
to
+28
| export function confirmPayment(widgetId: string): Promise<paymentResult> { | ||
| console.log('Confirming payment for widget with widgetId: ', widgetId); | ||
| const nativeId = widgetHashMap[widgetId]; |
Contributor
Author
There was a problem hiding this comment.
remove this log
Comment on lines
+10
to
+24
| function mapStatus(status: string): PaymentResult['type'] { | ||
| switch (status) { | ||
| case 'succeeded': | ||
| case 'completed': | ||
| case 'success': | ||
| return 'completed'; | ||
| case 'cancelled': | ||
| case 'canceled': | ||
| return 'canceled'; | ||
| case 'failed': | ||
| case 'error': | ||
| default: | ||
| return 'failed'; | ||
| } | ||
| } |
Comment on lines
+6
to
+9
| export interface PaymentEventData { | ||
| type: string; | ||
| payload: Record<string, string>; | ||
| } |
Comment on lines
+4
to
+18
| export interface OverrideEndpontConfiguration { | ||
| customBackendEndpoint?: string; | ||
| customLoggingEndpoint?: string; | ||
| customAssetEndpoint?: string; | ||
| customSDKConfigEndpoint?: string; | ||
| customAirborneEndpoint?: string; | ||
| } | ||
|
|
||
| export interface CommonEndpoint { | ||
| commonEndpoint: string; | ||
| } | ||
|
|
||
| export interface OverrideEndpoints { | ||
| overrideEndpoints: OverrideEndpontConfiguration; | ||
| } |
manideepk90
force-pushed
the
feat-core-sdk
branch
from
July 15, 2026 09:07
d1681a9 to
ebaa538
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.