@stripe/stripe-react-native 0.52.0-crypto-onramp-2-private-beta.2 → 0.53.0

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 (175) hide show
  1. package/android/.idea/caches/deviceStreaming.xml +0 -13
  2. package/android/.idea/gradle.xml +1 -0
  3. package/android/.idea/misc.xml +1 -1
  4. package/android/build.gradle +0 -14
  5. package/android/gradle.properties +1 -1
  6. package/android/local.properties +2 -2
  7. package/android/src/main/java/com/reactnativestripesdk/EmbeddedPaymentElementView.kt +48 -25
  8. package/android/src/main/java/com/reactnativestripesdk/EmbeddedPaymentElementViewManager.kt +2 -0
  9. package/android/src/main/java/com/reactnativestripesdk/PaymentLauncherFragment.kt +1 -1
  10. package/android/src/main/java/com/reactnativestripesdk/StripeSdkModule.kt +14 -13
  11. package/android/src/main/java/com/reactnativestripesdk/StripeSdkPackage.kt +1 -19
  12. package/android/src/main/java/com/reactnativestripesdk/utils/Errors.kt +0 -10
  13. package/android/src/main/java/com/reactnativestripesdk/utils/Mappers.kt +3 -12
  14. package/android/src/oldarch/java/com/facebook/react/viewmanagers/ApplePayButtonManagerDelegate.java +0 -12
  15. package/android/src/oldarch/java/com/facebook/react/viewmanagers/ApplePayButtonManagerInterface.java +0 -4
  16. package/android/src/oldarch/java/com/reactnativestripesdk/NativeStripeSdkModuleSpec.java +4 -4
  17. package/ios/Mappers.swift +1 -134
  18. package/ios/OldArch/StripeSdkEventEmitterCompat.h +0 -1
  19. package/ios/OldArch/StripeSdkEventEmitterCompat.m +1 -7
  20. package/ios/StripeSdk.mm +7 -0
  21. package/ios/StripeSdkEmitter.swift +0 -4
  22. package/ios/StripeSdkImpl.swift +13 -584
  23. package/lib/commonjs/components/AddToWalletButton.js +1 -1
  24. package/lib/commonjs/components/AddToWalletButton.js.map +1 -1
  25. package/lib/commonjs/components/AddressSheet.js +1 -1
  26. package/lib/commonjs/components/AddressSheet.js.map +1 -1
  27. package/lib/commonjs/components/AuBECSDebitForm.js +1 -1
  28. package/lib/commonjs/components/AuBECSDebitForm.js.map +1 -1
  29. package/lib/commonjs/components/CardField.js +1 -1
  30. package/lib/commonjs/components/CardField.js.map +1 -1
  31. package/lib/commonjs/components/CardForm.js +1 -1
  32. package/lib/commonjs/components/CardForm.js.map +1 -1
  33. package/lib/commonjs/components/PlatformPayButton.js +1 -1
  34. package/lib/commonjs/components/PlatformPayButton.js.map +1 -1
  35. package/lib/commonjs/components/StripeContainer.js +1 -1
  36. package/lib/commonjs/components/StripeContainer.js.map +1 -1
  37. package/lib/commonjs/components/StripeProvider.js +1 -1
  38. package/lib/commonjs/components/StripeProvider.js.map +1 -1
  39. package/lib/commonjs/events.js +1 -1
  40. package/lib/commonjs/events.js.map +1 -1
  41. package/lib/commonjs/functions.js +1 -1
  42. package/lib/commonjs/functions.js.map +1 -1
  43. package/lib/commonjs/index.js +1 -1
  44. package/lib/commonjs/index.js.map +1 -1
  45. package/lib/commonjs/plugin/withStripe.js +1 -1
  46. package/lib/commonjs/plugin/withStripe.js.map +1 -1
  47. package/lib/commonjs/specs/NativeStripeSdkModule.js.map +1 -1
  48. package/lib/commonjs/types/EmbeddedPaymentElement.js +1 -1
  49. package/lib/commonjs/types/EmbeddedPaymentElement.js.map +1 -1
  50. package/lib/commonjs/types/Errors.js +1 -1
  51. package/lib/commonjs/types/Errors.js.map +1 -1
  52. package/lib/commonjs/types/PlatformPay.js.map +1 -1
  53. package/lib/commonjs/types/index.js +1 -1
  54. package/lib/commonjs/types/index.js.map +1 -1
  55. package/lib/module/components/AddToWalletButton.js +1 -1
  56. package/lib/module/components/AddToWalletButton.js.map +1 -1
  57. package/lib/module/components/AddressSheet.js +1 -1
  58. package/lib/module/components/AddressSheet.js.map +1 -1
  59. package/lib/module/components/AuBECSDebitForm.js +1 -1
  60. package/lib/module/components/AuBECSDebitForm.js.map +1 -1
  61. package/lib/module/components/CardField.js +1 -1
  62. package/lib/module/components/CardField.js.map +1 -1
  63. package/lib/module/components/CardForm.js +1 -1
  64. package/lib/module/components/CardForm.js.map +1 -1
  65. package/lib/module/components/PlatformPayButton.js +1 -1
  66. package/lib/module/components/PlatformPayButton.js.map +1 -1
  67. package/lib/module/components/StripeContainer.js +1 -1
  68. package/lib/module/components/StripeContainer.js.map +1 -1
  69. package/lib/module/components/StripeProvider.js +1 -1
  70. package/lib/module/components/StripeProvider.js.map +1 -1
  71. package/lib/module/events.js +1 -1
  72. package/lib/module/events.js.map +1 -1
  73. package/lib/module/functions.js +1 -1
  74. package/lib/module/functions.js.map +1 -1
  75. package/lib/module/index.js +1 -1
  76. package/lib/module/index.js.map +1 -1
  77. package/lib/module/plugin/withStripe.js +1 -1
  78. package/lib/module/plugin/withStripe.js.map +1 -1
  79. package/lib/module/specs/NativeStripeSdkModule.js.map +1 -1
  80. package/lib/module/types/EmbeddedPaymentElement.js +1 -1
  81. package/lib/module/types/EmbeddedPaymentElement.js.map +1 -1
  82. package/lib/module/types/Errors.js +1 -1
  83. package/lib/module/types/Errors.js.map +1 -1
  84. package/lib/module/types/PlatformPay.js.map +1 -1
  85. package/lib/module/types/index.js +1 -1
  86. package/lib/module/types/index.js.map +1 -1
  87. package/lib/typescript/src/components/StripeProvider.d.ts.map +1 -1
  88. package/lib/typescript/src/events.d.ts +0 -3
  89. package/lib/typescript/src/events.d.ts.map +1 -1
  90. package/lib/typescript/src/functions.d.ts +1 -0
  91. package/lib/typescript/src/functions.d.ts.map +1 -1
  92. package/lib/typescript/src/index.d.ts +0 -1
  93. package/lib/typescript/src/index.d.ts.map +1 -1
  94. package/lib/typescript/src/plugin/withStripe.d.ts +0 -15
  95. package/lib/typescript/src/plugin/withStripe.d.ts.map +1 -1
  96. package/lib/typescript/src/specs/NativeStripeSdkModule.d.ts +1 -0
  97. package/lib/typescript/src/specs/NativeStripeSdkModule.d.ts.map +1 -1
  98. package/lib/typescript/src/types/EmbeddedPaymentElement.d.ts +1 -0
  99. package/lib/typescript/src/types/EmbeddedPaymentElement.d.ts.map +1 -1
  100. package/lib/typescript/src/types/Errors.d.ts +0 -5
  101. package/lib/typescript/src/types/Errors.d.ts.map +1 -1
  102. package/lib/typescript/src/types/PlatformPay.d.ts +7 -1
  103. package/lib/typescript/src/types/PlatformPay.d.ts.map +1 -1
  104. package/lib/typescript/src/types/index.d.ts +1 -7
  105. package/lib/typescript/src/types/index.d.ts.map +1 -1
  106. package/package.json +21 -2
  107. package/src/components/StripeProvider.tsx +0 -9
  108. package/src/events.ts +0 -22
  109. package/src/functions.ts +11 -0
  110. package/src/index.tsx +0 -1
  111. package/src/plugin/withStripe.ts +7 -104
  112. package/src/specs/NativeStripeSdkModule.ts +2 -0
  113. package/src/types/EmbeddedPaymentElement.tsx +7 -0
  114. package/src/types/Errors.ts +0 -6
  115. package/src/types/PlatformPay.ts +7 -1
  116. package/src/types/index.ts +0 -8
  117. package/stripe-react-native.podspec +8 -21
  118. package/.clang-format +0 -90
  119. package/.claude/settings.local.json +0 -11
  120. package/.editorconfig +0 -18
  121. package/.husky/pre-commit +0 -1
  122. package/.idea/GitLink.xml +0 -6
  123. package/.idea/codeStyles/Project.xml +0 -162
  124. package/.idea/codeStyles/codeStyleConfig.xml +0 -5
  125. package/.idea/misc.xml +0 -851
  126. package/.idea/modules.xml +0 -8
  127. package/.idea/stripe-react-native.iml +0 -9
  128. package/.idea/vcs.xml +0 -6
  129. package/.vscode/settings.json +0 -3
  130. package/CHANGELOG.md +0 -931
  131. package/CLAUDE.md +0 -148
  132. package/android/.gradle/8.11.1/checksums/checksums.lock +0 -0
  133. package/android/.gradle/8.11.1/executionHistory/executionHistory.bin +0 -0
  134. package/android/.gradle/8.11.1/executionHistory/executionHistory.lock +0 -0
  135. package/android/.gradle/8.11.1/fileChanges/last-build.bin +0 -0
  136. package/android/.gradle/8.11.1/fileHashes/fileHashes.bin +0 -0
  137. package/android/.gradle/8.11.1/fileHashes/fileHashes.lock +0 -0
  138. package/android/.gradle/8.11.1/gc.properties +0 -0
  139. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  140. package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
  141. package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  142. package/android/.gradle/file-system.probe +0 -0
  143. package/android/.gradle/vcs-1/gc.properties +0 -0
  144. package/android/.idea/AndroidProjectSystem.xml +0 -6
  145. package/android/.idea/GitLink.xml +0 -6
  146. package/android/.idea/appInsightsSettings.xml +0 -23
  147. package/android/src/main/java/com/reactnativestripesdk/FakeOnrampSdkModule.kt +0 -138
  148. package/android/src/oldarch/java/com/reactnativestripesdk/NativeOnrampSdkModuleSpec.java +0 -110
  149. package/android/src/onramp/java/com/reactnativestripesdk/OnrampSdkModule.kt +0 -844
  150. package/ios/StripeOnrampSdk.h +0 -17
  151. package/ios/StripeOnrampSdk.mm +0 -144
  152. package/lib/commonjs/hooks/useOnramp.js +0 -2
  153. package/lib/commonjs/hooks/useOnramp.js.map +0 -1
  154. package/lib/commonjs/specs/NativeOnrampSdkModule.js +0 -2
  155. package/lib/commonjs/specs/NativeOnrampSdkModule.js.map +0 -1
  156. package/lib/commonjs/types/Onramp.js +0 -2
  157. package/lib/commonjs/types/Onramp.js.map +0 -1
  158. package/lib/module/hooks/useOnramp.js +0 -2
  159. package/lib/module/hooks/useOnramp.js.map +0 -1
  160. package/lib/module/specs/NativeOnrampSdkModule.js +0 -2
  161. package/lib/module/specs/NativeOnrampSdkModule.js.map +0 -1
  162. package/lib/module/types/Onramp.js +0 -2
  163. package/lib/module/types/Onramp.js.map +0 -1
  164. package/lib/typescript/src/hooks/useOnramp.d.ts +0 -139
  165. package/lib/typescript/src/hooks/useOnramp.d.ts.map +0 -1
  166. package/lib/typescript/src/specs/NativeOnrampSdkModule.d.ts +0 -26
  167. package/lib/typescript/src/specs/NativeOnrampSdkModule.d.ts.map +0 -1
  168. package/lib/typescript/src/types/Onramp.d.ts +0 -259
  169. package/lib/typescript/src/types/Onramp.d.ts.map +0 -1
  170. package/package-lock.json +0 -14114
  171. package/patches/README.md +0 -55
  172. package/patches/old-arch-codegen-fix.patch +0 -91
  173. package/src/hooks/useOnramp.tsx +0 -297
  174. package/src/specs/NativeOnrampSdkModule.ts +0 -41
  175. package/src/types/Onramp.ts +0 -297
package/CLAUDE.md DELETED
@@ -1,148 +0,0 @@
1
- # CLAUDE.md
2
-
3
- This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
-
5
- ## Development Commands
6
-
7
- ### Building and Linting
8
- - `yarn typescript` - Type-check TypeScript files
9
- - `yarn lint` - Lint code with ESLint
10
- - `yarn lint --fix` - Fix linting issues automatically
11
- - `yarn test` - Run Jest unit tests
12
- - `yarn prepare` - Build the library (runs `bob build && husky`)
13
-
14
- ### Development Setup
15
- - `yarn bootstrap` - Setup project by installing dependencies and CocoaPods
16
- - `yarn bootstrap-no-pods` - Setup without installing CocoaPods
17
- - `yarn pods` - Install CocoaPods for iOS (example app)
18
- - `yarn update-pods` - Update specific Stripe pod dependencies
19
-
20
- ### Example App Development Workflow
21
- 1. **Setup**: `yarn bootstrap`
22
- 2. **Run Example App** (requires 2 terminals):
23
- - Terminal 1: `yarn example start`
24
- - Terminal 2: `yarn example ios` OR `yarn example android`
25
-
26
- The example app uses a pre-configured demo backend, so no server setup is required.
27
-
28
- ### Example App Commands
29
- - `yarn example start` - Start Metro server
30
- - `yarn run-example-ios` - Run iOS example app on iPhone 16 simulator
31
- - `yarn run-example-android` - Run Android example app
32
- - `yarn run-example-ios:release` - Build and run iOS app in release mode
33
- - `yarn run-example-android:release` - Build and run Android app in release mode
34
-
35
- ### Testing
36
- - `yarn test:e2e:ios` - Run all iOS E2E tests using Maestro
37
- - `yarn test:e2e:android` - Run all Android E2E tests using Maestro
38
- - `yarn test-ios ./path/to/test.yml` - Run single iOS E2E test
39
- - `yarn test-android ./path/to/test.yml` - Run single Android E2E test
40
- - `yarn test:unit:ios` - Run iOS native unit tests via Xcode
41
- - `yarn test:unit:android` - Run Android unit tests
42
-
43
- ### Documentation
44
- - `yarn docs` - Generate API documentation using TypeDoc
45
-
46
- ### Commit Convention
47
- Follow [conventional commits](https://www.conventionalcommits.org/en):
48
- - `fix:` - Bug fixes
49
- - `feat:` - New features
50
- - `refactor:` - Code refactoring
51
- - `docs:` - Documentation changes
52
- - `test:` - Test additions/updates
53
- - `chore:` - Tooling changes
54
-
55
- ## Architecture Overview
56
-
57
- This is the official Stripe React Native SDK, providing payment processing capabilities for mobile apps.
58
-
59
- ### Key Directories
60
-
61
- - **`src/`** - Main TypeScript source code
62
- - `components/` - React Native components (CardField, PaymentSheet, etc.)
63
- - `hooks/` - React hooks for payment functionality
64
- - `types/` - TypeScript type definitions
65
- - `specs/` - Native module specifications for code generation
66
- - `functions.ts` - Core payment functions
67
- - `index.tsx` - Main exports
68
-
69
- - **`ios/`** - Native iOS implementation in Swift/Objective-C
70
- - Uses Stripe iOS SDK (~24.16.1)
71
- - Supports both Old and New Architecture (Fabric)
72
- - Test files in `ios/Tests/`
73
-
74
- - **`android/`** - Native Android implementation in Kotlin/Java
75
- - Uses Stripe Android SDK
76
- - Gradle build configuration
77
-
78
- - **`example/`** - Example React Native app demonstrating SDK usage
79
- - Contains test server in `server/` directory
80
- - Configured for both iOS and Android development
81
-
82
- - **`e2e-tests/`** - End-to-end tests using Maestro framework
83
- - Platform-specific tests in `ios-only/` and `android-only/`
84
- - Tests payment flows, UI components, and integrations
85
-
86
- ### Code Generation
87
-
88
- The SDK uses React Native's TurboModules/Fabric for native communication:
89
- - Specs defined in `src/specs/` generate native interfaces
90
- - Both Old and New Architecture supported
91
- - Special patch for Old Architecture compatibility in `patches/old-arch-codegen-fix.patch`
92
-
93
- ### Build System
94
-
95
- - **React Native Builder Bob** - Builds CommonJS, ES modules, and TypeScript declarations
96
- - **CocoaPods** - iOS dependency management
97
- - **Gradle** - Android build system
98
- - **Expo Plugin** - `src/plugin/withStripe.ts` for Expo integration
99
-
100
- ### Key Components
101
-
102
- - **StripeProvider** - Context provider for SDK initialization
103
- - **PaymentSheet** - Pre-built payment UI
104
- - **CardField/CardForm** - Card input components
105
- - **PlatformPayButton** - Apple Pay/Google Pay integration
106
- - **CustomerSheet** - Customer payment method management
107
- - **AddressSheet** - Address collection component
108
-
109
- ### Testing Strategy
110
-
111
- - **Jest** - Unit tests for TypeScript code
112
- - **Maestro** - E2E testing framework for mobile flows
113
- - **Native Tests** - iOS XCTest and Android instrumentation tests
114
- - Mock implementation provided in `jest/mock.js`
115
-
116
- ### Platform-Specific Notes
117
-
118
- - **iOS**: Requires Xcode 14.1+, iOS 13+ deployment target
119
- - **Android**: Requires API 21+, compileSdkVersion 34, Kotlin 2.x
120
- - **React Native**: Compatible with 0.78+, TypeScript 5.7+
121
- - **Expo**: Supported via plugin configuration
122
-
123
- ### Development File Locations
124
-
125
- - **iOS Native**: Open `example/ios/StripeSdkExample.xcworkspace` in Xcode
126
- - Source files: `Pods > Development Pods > stripe-react-native`
127
- - **Android Native**: Open `example/android` in Android Studio
128
- - Source files: `reactnativestripesdk` under `Android`
129
- - **TypeScript**: Edit files in `src/` and `example/`
130
-
131
- ### GitHub Issue Management
132
- - `GH_HOST=github.com gh issue list --repo stripe/stripe-react-native --limit 20` - List recent issues
133
- - `GH_HOST=github.com gh issue view <issue_number> --repo stripe/stripe-react-native` - View specific issue
134
- - `GH_HOST=github.com gh issue view <issue_number> --repo stripe/stripe-react-native --comments` - View issue with comments
135
- - `GH_HOST=github.com gh issue list --repo stripe/stripe-react-native --state all --search "keyword" --limit 30` - Search ALL issues (open/closed) by keyword
136
- - `GH_HOST=github.com gh issue create --repo stripe/stripe-react-native` - Create new issue
137
- - `GH_HOST=github.com gh issue edit <issue_number> --repo stripe/stripe-react-native` - Edit issue
138
- - `GH_HOST=github.com gh pr create --repo stripe/stripe-react-native` - Create pull request
139
- - Always use `--state all` when searching to include closed/resolved issues
140
- - Always check GitHub issues for similar problems before investigating user reports
141
- - Use GitHub CLI to distinguish between SDK bugs vs integration issues
142
-
143
- ### Filing PRs
144
- When using the GitHub `gh` command, ALWAYS set `GH_HOST=github.com`. For example: `GH_HOST=github.com gh pr create --title [...]`
145
-
146
- ### Old Architecture Compatibility
147
-
148
- The SDK maintains compatibility with React Native's Old Architecture via `patches/old-arch-codegen-fix.patch`. This patch converts EventEmitter properties to callback functions for code generation compatibility with RN ≥ 0.74.
File without changes
@@ -1,2 +0,0 @@
1
- #Thu Aug 28 20:58:28 EDT 2025
2
- gradle.version=8.11.1
Binary file
File without changes
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="AndroidProjectSystem">
4
- <option name="providerId" value="com.android.tools.idea.GradleProjectSystem" />
5
- </component>
6
- </project>
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="uk.co.ben_gibson.git.link.SettingsState">
4
- <option name="host" value="72037fcc-cb9c-4c22-960a-ffe73fd5e229" />
5
- </component>
6
- </project>
@@ -1,23 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="AppInsightsSettings">
4
- <option name="tabSettings">
5
- <map>
6
- <entry key="Android Vitals">
7
- <value>
8
- <InsightsFilterSettings>
9
- <option name="connection">
10
- <ConnectionSetting>
11
- <option name="appId" value="com.sessions24.aurora" />
12
- </ConnectionSetting>
13
- </option>
14
- <option name="signal" value="SIGNAL_UNSPECIFIED" />
15
- <option name="timeIntervalDays" value="SEVEN_DAYS" />
16
- <option name="visibilityType" value="ALL" />
17
- </InsightsFilterSettings>
18
- </value>
19
- </entry>
20
- </map>
21
- </option>
22
- </component>
23
- </project>
@@ -1,138 +0,0 @@
1
- package com.reactnativestripesdk
2
-
3
- import com.facebook.react.bridge.Promise
4
- import com.facebook.react.bridge.ReactApplicationContext
5
- import com.facebook.react.bridge.ReactMethod
6
- import com.facebook.react.bridge.ReadableMap
7
- import com.facebook.react.module.annotations.ReactModule
8
- import com.reactnativestripesdk.utils.createFailedError
9
-
10
- @ReactModule(name = NativeOnrampSdkModuleSpec.NAME)
11
- class FakeOnrampSdkModule(
12
- reactContext: ReactApplicationContext,
13
- ) : NativeOnrampSdkModuleSpec(reactContext) {
14
- @ReactMethod
15
- override fun initialise(
16
- params: ReadableMap?,
17
- promise: Promise?,
18
- ) {
19
- promise?.resolve(null)
20
- }
21
-
22
- @ReactMethod
23
- override fun configureOnramp(
24
- config: ReadableMap?,
25
- promise: Promise?,
26
- ) {
27
- promise?.resolveNotImplemented()
28
- }
29
-
30
- @ReactMethod
31
- override fun hasLinkAccount(
32
- email: String?,
33
- promise: Promise?,
34
- ) {
35
- promise?.resolveNotImplemented()
36
- }
37
-
38
- @ReactMethod
39
- override fun registerLinkUser(
40
- info: ReadableMap?,
41
- promise: Promise?,
42
- ) {
43
- promise?.resolveNotImplemented()
44
- }
45
-
46
- @ReactMethod
47
- override fun registerWalletAddress(
48
- walletAddress: String?,
49
- network: String?,
50
- promise: Promise?,
51
- ) {
52
- promise?.resolveNotImplemented()
53
- }
54
-
55
- @ReactMethod
56
- override fun attachKycInfo(
57
- kycInfo: ReadableMap?,
58
- promise: Promise?,
59
- ) {
60
- promise?.resolveNotImplemented()
61
- }
62
-
63
- @ReactMethod
64
- override fun updatePhoneNumber(
65
- phone: String?,
66
- promise: Promise?,
67
- ) {
68
- promise?.resolveNotImplemented()
69
- }
70
-
71
- @ReactMethod
72
- override fun authenticateUser(promise: Promise?) {
73
- promise?.resolveNotImplemented()
74
- }
75
-
76
- @ReactMethod
77
- override fun verifyIdentity(promise: Promise?) {
78
- promise?.resolveNotImplemented()
79
- }
80
-
81
- @ReactMethod
82
- override fun collectPaymentMethod(
83
- paymentMethod: String?,
84
- platformPayParams: ReadableMap?,
85
- promise: Promise?,
86
- ) {
87
- promise?.resolveNotImplemented()
88
- }
89
-
90
- @ReactMethod
91
- override fun provideCheckoutClientSecret(clientSecret: String?) {
92
- // No-op
93
- }
94
-
95
- @ReactMethod
96
- override fun createCryptoPaymentToken(promise: Promise?) {
97
- promise?.resolveNotImplemented()
98
- }
99
-
100
- @ReactMethod
101
- override fun performCheckout(
102
- onrampSessionId: String?,
103
- promise: Promise?,
104
- ) {
105
- promise?.resolveNotImplemented()
106
- }
107
-
108
- @ReactMethod
109
- override fun onrampAuthorize(
110
- linkAuthIntentId: String?,
111
- promise: Promise?,
112
- ) {
113
- promise?.resolveNotImplemented()
114
- }
115
-
116
- @ReactMethod
117
- override fun logout(promise: Promise?) {
118
- promise?.resolveNotImplemented()
119
- }
120
-
121
- @ReactMethod
122
- override fun getCryptoTokenDisplayData(
123
- token: ReadableMap,
124
- promise: Promise,
125
- ) {
126
- promise?.resolveNotImplemented()
127
- }
128
-
129
- private fun Promise.resolveNotImplemented() {
130
- this.resolve(
131
- createFailedError(
132
- NotImplementedError(
133
- "To enable Onramp, add 'StripeSdk_includeOnramp=true' to gradle.properties.",
134
- ),
135
- ),
136
- )
137
- }
138
- }
@@ -1,110 +0,0 @@
1
-
2
- /**
3
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
- *
5
- * Do not edit this file as changes may cause incorrect behavior and will be lost
6
- * once the code is regenerated.
7
- *
8
- * @generated by codegen project: GenerateModuleJavaSpec.js
9
- *
10
- * @nolint
11
- */
12
-
13
- package com.reactnativestripesdk;
14
-
15
- import com.facebook.proguard.annotations.DoNotStrip;
16
- import com.facebook.react.bridge.Promise;
17
- import com.facebook.react.bridge.ReactApplicationContext;
18
- import com.facebook.react.bridge.ReactContextBaseJavaModule;
19
- import com.facebook.react.bridge.ReactMethod;
20
- import com.facebook.react.bridge.ReadableMap;
21
- import com.facebook.react.modules.core.DeviceEventManagerModule;
22
- import com.facebook.react.turbomodule.core.interfaces.TurboModule;
23
- import javax.annotation.Nonnull;
24
-
25
- public abstract class NativeOnrampSdkModuleSpec extends ReactContextBaseJavaModule implements TurboModule {
26
- public static final String NAME = "OnrampSdk";
27
-
28
- public NativeOnrampSdkModuleSpec(ReactApplicationContext reactContext) {
29
- super(reactContext);
30
- }
31
-
32
- @Override
33
- public @Nonnull String getName() {
34
- return NAME;
35
- }
36
-
37
- private void invoke(String eventName, Object params) {
38
- getReactApplicationContext()
39
- .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
40
- .emit(eventName, params);
41
- }
42
-
43
- protected final void emitOnCheckoutClientSecretRequested(ReadableMap value) {
44
- invoke("onCheckoutClientSecretRequested", value);
45
- }
46
-
47
- @ReactMethod
48
- @DoNotStrip
49
- public abstract void initialise(ReadableMap params, Promise promise);
50
-
51
- @ReactMethod
52
- @DoNotStrip
53
- public abstract void configureOnramp(ReadableMap config, Promise promise);
54
-
55
- @ReactMethod
56
- @DoNotStrip
57
- public abstract void hasLinkAccount(String email, Promise promise);
58
-
59
- @ReactMethod
60
- @DoNotStrip
61
- public abstract void registerLinkUser(ReadableMap info, Promise promise);
62
-
63
- @ReactMethod
64
- @DoNotStrip
65
- public abstract void registerWalletAddress(String walletAddress, String network, Promise promise);
66
-
67
- @ReactMethod
68
- @DoNotStrip
69
- public abstract void attachKycInfo(ReadableMap kycInfo, Promise promise);
70
-
71
- @ReactMethod
72
- @DoNotStrip
73
- public abstract void updatePhoneNumber(String phone, Promise promise);
74
-
75
- @ReactMethod
76
- @DoNotStrip
77
- public abstract void authenticateUser(Promise promise);
78
-
79
- @ReactMethod
80
- @DoNotStrip
81
- public abstract void verifyIdentity(Promise promise);
82
-
83
- @ReactMethod
84
- @DoNotStrip
85
- public abstract void collectPaymentMethod(String paymentMethod, ReadableMap platformPayParams, Promise promise);
86
-
87
- @ReactMethod
88
- @DoNotStrip
89
- public abstract void provideCheckoutClientSecret(String clientSecret);
90
-
91
- @ReactMethod
92
- @DoNotStrip
93
- public abstract void createCryptoPaymentToken(Promise promise);
94
-
95
- @ReactMethod
96
- @DoNotStrip
97
- public abstract void performCheckout(String onrampSessionId, Promise promise);
98
-
99
- @ReactMethod
100
- @DoNotStrip
101
- public abstract void onrampAuthorize(String linkAuthIntentId, Promise promise);
102
-
103
- @ReactMethod
104
- @DoNotStrip
105
- public abstract void getCryptoTokenDisplayData(ReadableMap token, Promise promise);
106
-
107
- @ReactMethod
108
- @DoNotStrip
109
- public abstract void logout(Promise promise);
110
- }