@onramper/onramper-react-native 1.2.0 → 1.2.2
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.
- package/CHANGELOG.md +30 -0
- package/README.md +9 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64/OnramperSDK.framework/Info.plist +0 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64/OnramperSDK.framework/Modules/OnramperSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64/OnramperSDK.framework/Modules/OnramperSDK.swiftmodule/arm64-apple-ios.swiftinterface +12 -1
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64/OnramperSDK.framework/OnramperSDK +0 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64/OnramperSDK.framework/OnramperSDK_OnramperSDK.bundle/Info.plist +0 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64/dSYMs/OnramperSDK.framework.dSYM/Contents/Resources/DWARF/OnramperSDK +0 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64/dSYMs/OnramperSDK.framework.dSYM/Contents/Resources/Relocations/aarch64/OnramperSDK.yml +2240 -2234
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/OnramperSDK.framework/Info.plist +0 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/OnramperSDK.framework/Modules/OnramperSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/OnramperSDK.framework/Modules/OnramperSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +12 -1
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/OnramperSDK.framework/Modules/OnramperSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/OnramperSDK.framework/Modules/OnramperSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +12 -1
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/OnramperSDK.framework/OnramperSDK +0 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/OnramperSDK.framework/OnramperSDK_OnramperSDK.bundle/Info.plist +0 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/OnramperSDK.framework.dSYM/Contents/Resources/DWARF/OnramperSDK +0 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/OnramperSDK.framework.dSYM/Contents/Resources/Relocations/aarch64/OnramperSDK.yml +2240 -2234
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/OnramperSDK.framework.dSYM/Contents/Resources/Relocations/x86_64/OnramperSDK.yml +2206 -2200
- package/ios/HybridOnramperNitro.swift +12 -0
- package/lib/commonjs/OnramperClient.js +35 -1
- package/lib/commonjs/OnramperClient.js.map +1 -1
- package/lib/module/OnramperClient.js +35 -1
- package/lib/module/OnramperClient.js.map +1 -1
- package/lib/typescript/commonjs/src/OnramperClient.d.ts +5 -0
- package/lib/typescript/commonjs/src/OnramperClient.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/specs/OnramperNitro.nitro.d.ts +1 -0
- package/lib/typescript/commonjs/src/specs/OnramperNitro.nitro.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types.d.ts +2 -0
- package/lib/typescript/commonjs/src/types.d.ts.map +1 -1
- package/lib/typescript/module/src/OnramperClient.d.ts +5 -0
- package/lib/typescript/module/src/OnramperClient.d.ts.map +1 -1
- package/lib/typescript/module/src/specs/OnramperNitro.nitro.d.ts +1 -0
- package/lib/typescript/module/src/specs/OnramperNitro.nitro.d.ts.map +1 -1
- package/lib/typescript/module/src/types.d.ts +2 -0
- package/lib/typescript/module/src/types.d.ts.map +1 -1
- package/nitrogen/generated/ios/OnramperReactNative-Swift-Cxx-Bridge.cpp +8 -0
- package/nitrogen/generated/ios/OnramperReactNative-Swift-Cxx-Bridge.hpp +38 -0
- package/nitrogen/generated/ios/OnramperReactNative-Swift-Cxx-Umbrella.hpp +1 -0
- package/nitrogen/generated/ios/c++/HybridOnramperNitroSpecSwift.hpp +7 -0
- package/nitrogen/generated/ios/swift/Func_void_std__optional_std__string_.swift +53 -0
- package/nitrogen/generated/ios/swift/HybridOnramperNitroSpec.swift +1 -0
- package/nitrogen/generated/ios/swift/HybridOnramperNitroSpec_cxx.swift +22 -0
- package/nitrogen/generated/shared/c++/HybridOnramperNitroSpec.cpp +1 -0
- package/nitrogen/generated/shared/c++/HybridOnramperNitroSpec.hpp +2 -0
- package/package.json +2 -2
- package/src/OnramperClient.ts +38 -1
- package/src/specs/OnramperNitro.nitro.ts +2 -0
- package/src/types.ts +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,36 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented in this file.
|
|
4
4
|
|
|
5
|
+
## [1.2.2]
|
|
6
|
+
|
|
7
|
+
Bundles `OnramperSDK@1.2.2`.
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- Fixed authentication handling during SDK session initialization and refresh.
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- No public React Native API changes or migration are required.
|
|
16
|
+
|
|
17
|
+
## [1.2.1]
|
|
18
|
+
|
|
19
|
+
Bundles `OnramperSDK@1.2.1`.
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
|
|
23
|
+
- Durable Onramper transaction IDs. `checkoutFinalized.response` now includes the required
|
|
24
|
+
`onramperTransactionId`, and `OnramperClient.currentTransactionId` mirrors the native
|
|
25
|
+
published value. Subscribe with `addTransactionIdListener` when UI must react to it.
|
|
26
|
+
- Both example apps display and log the transaction ID at finalization.
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
|
|
30
|
+
- No migration is required. The release is additive. Persist `onramperTransactionId` for
|
|
31
|
+
support, reconciliation, and status lookup instead of per-attempt checkout/intent IDs.
|
|
32
|
+
Read it before `reset()` or `signOut()`, which clear the current value. TypeScript tests
|
|
33
|
+
that manually construct a `CheckoutFinalizeResponse` fixture must add the required field.
|
|
34
|
+
|
|
5
35
|
## [1.2.0]
|
|
6
36
|
|
|
7
37
|
Bundles `OnramperSDK@1.2.0`.
|
package/README.md
CHANGED
|
@@ -65,6 +65,11 @@ Already know the user? Pass a third `prefill` argument (`email`, `firstName`, `l
|
|
|
65
65
|
The SwiftUI `OnramperCheckoutButton` does not expose external callback hooks; checkout outcomes flow via the module-level event stream:
|
|
66
66
|
|
|
67
67
|
```ts
|
|
68
|
+
const onFinalized = client.addEventListener('checkoutFinalized', ({ response }) => {
|
|
69
|
+
// Durable transaction identifier: store this for support/reconciliation.
|
|
70
|
+
persistTransactionId(response.onramperTransactionId);
|
|
71
|
+
});
|
|
72
|
+
|
|
68
73
|
const unsub = client.addEventListener('completed', (e) => {
|
|
69
74
|
console.log('done:', e.checkoutId);
|
|
70
75
|
});
|
|
@@ -74,6 +79,10 @@ const onFailed = client.addEventListener('failed', (e) => {
|
|
|
74
79
|
});
|
|
75
80
|
```
|
|
76
81
|
|
|
82
|
+
`checkoutStarted.intentId` and `completed.checkoutId` identify an attempt, while
|
|
83
|
+
`onramperTransactionId` identifies the transaction and is available before payment rendering.
|
|
84
|
+
`client.currentTransactionId` mirrors the same value; `reset()` clears it.
|
|
85
|
+
|
|
77
86
|
## Error handling
|
|
78
87
|
|
|
79
88
|
All native errors arrive as `OnramperError` with a typed `code`:
|
|
Binary file
|
|
Binary file
|
|
@@ -161,8 +161,9 @@ public struct ToSRequirementCompletion : Swift.Codable, Swift.Sendable {
|
|
|
161
161
|
}
|
|
162
162
|
public struct CheckoutFinalizeResponse : Swift.Codable, Swift.Sendable {
|
|
163
163
|
public let headlessCheckoutId: Swift.String
|
|
164
|
+
public let onramperTransactionId: Swift.String
|
|
164
165
|
public let headlessCheckoutData: OnramperSDK.HeadlessCheckoutData
|
|
165
|
-
public init(headlessCheckoutId: Swift.String, headlessCheckoutData: OnramperSDK.HeadlessCheckoutData)
|
|
166
|
+
public init(headlessCheckoutId: Swift.String, onramperTransactionId: Swift.String, headlessCheckoutData: OnramperSDK.HeadlessCheckoutData)
|
|
166
167
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
167
168
|
public init(from decoder: any Swift.Decoder) throws
|
|
168
169
|
}
|
|
@@ -450,6 +451,16 @@ public enum RenderType : Swift.String, Swift.Codable, Swift.Sendable {
|
|
|
450
451
|
get
|
|
451
452
|
}
|
|
452
453
|
#endif
|
|
454
|
+
#if compiler(>=5.3) && $NonescapableTypes
|
|
455
|
+
@Combine.Published @_projectedValueProperty($currentTransactionId) @_Concurrency.MainActor final public var currentTransactionId: Swift.String? {
|
|
456
|
+
get
|
|
457
|
+
}
|
|
458
|
+
#endif
|
|
459
|
+
#if compiler(>=5.3) && $NonescapableTypes
|
|
460
|
+
@_Concurrency.MainActor final public var $currentTransactionId: Combine.Published<Swift.String?>.Publisher {
|
|
461
|
+
get
|
|
462
|
+
}
|
|
463
|
+
#endif
|
|
453
464
|
@_Concurrency.MainActor final public let configuration: OnramperSDK.OnramperConfiguration
|
|
454
465
|
@_Concurrency.MainActor weak final public var delegate: (any OnramperSDK.OnramperDelegate)?
|
|
455
466
|
@_Concurrency.MainActor final public var sessionId: Swift.String? {
|
|
Binary file
|
|
Binary file
|