@stripe/stripe-react-native 0.70.0 → 0.72.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.
- package/android/gradle.properties +1 -1
- package/android/src/main/java/com/reactnativestripesdk/CurrencySelectorElementView.kt +7 -103
- package/android/src/main/java/com/reactnativestripesdk/CurrencySelectorElementViewManager.kt +1 -5
- package/android/src/main/java/com/reactnativestripesdk/EmbeddedPaymentElementView.kt +0 -26
- package/android/src/main/java/com/reactnativestripesdk/EmbeddedPaymentElementViewManager.kt +6 -21
- package/android/src/main/java/com/reactnativestripesdk/LinkControllerManager.kt +59 -18
- package/android/src/main/java/com/reactnativestripesdk/PaymentMethodCreateParamsFactory.kt +22 -0
- package/android/src/main/java/com/reactnativestripesdk/PaymentSheetManager.kt +6 -50
- package/android/src/main/java/com/reactnativestripesdk/StripeSdkModule.kt +38 -187
- package/android/src/main/java/com/reactnativestripesdk/utils/Mappers.kt +4 -0
- package/android/src/oldarch/java/com/reactnativestripesdk/NativeStripeSdkModuleSpec.java +4 -0
- package/android/src/onramp/java/com/reactnativestripesdk/OnrampMappers.kt +1 -0
- package/android/src/test/java/com/reactnativestripesdk/mappers/MappersTest.kt +10 -60
- package/ios/CurrencySelectorElementView.swift +18 -129
- package/ios/Mappers.swift +4 -0
- package/ios/PaymentMethodFactory.swift +22 -0
- package/ios/StripeSdk.mm +7 -0
- package/ios/StripeSdkImpl+Checkout.swift +35 -259
- package/ios/StripeSdkImpl+Embedded.swift +5 -28
- package/ios/StripeSdkImpl+LinkController.swift +40 -2
- package/ios/StripeSdkImpl+PaymentSheet.swift +2 -15
- package/ios/StripeSdkImpl.swift +2 -4
- package/lib/commonjs/components/AddToWalletButton.js +1 -1
- package/lib/commonjs/components/AddToWalletButton.js.map +1 -1
- package/lib/commonjs/components/AddressSheet.js +1 -1
- package/lib/commonjs/components/AddressSheet.js.map +1 -1
- package/lib/commonjs/components/AuBECSDebitForm.js +1 -1
- package/lib/commonjs/components/AuBECSDebitForm.js.map +1 -1
- package/lib/commonjs/components/CardField.js +1 -1
- package/lib/commonjs/components/CardField.js.map +1 -1
- package/lib/commonjs/components/CardForm.js +1 -1
- package/lib/commonjs/components/CardForm.js.map +1 -1
- package/lib/commonjs/components/CurrencySelectorElement.js +1 -1
- package/lib/commonjs/components/CurrencySelectorElement.js.map +1 -1
- package/lib/commonjs/components/PaymentMethodMessagingElement.js +1 -1
- package/lib/commonjs/components/PaymentMethodMessagingElement.js.map +1 -1
- package/lib/commonjs/components/PlatformPayButton.js +1 -1
- package/lib/commonjs/components/PlatformPayButton.js.map +1 -1
- package/lib/commonjs/components/StripeContainer.js +1 -1
- package/lib/commonjs/components/StripeContainer.js.map +1 -1
- package/lib/commonjs/connect/Components.js +1 -1
- package/lib/commonjs/connect/Components.js.map +1 -1
- package/lib/commonjs/connect/ConnectComponentsProvider.js +1 -1
- package/lib/commonjs/connect/ConnectComponentsProvider.js.map +1 -1
- package/lib/commonjs/connect/EmbeddedComponent.js +2 -2
- package/lib/commonjs/connect/EmbeddedComponent.js.map +1 -1
- package/lib/commonjs/connect/ModalCloseButton.js +1 -1
- package/lib/commonjs/connect/ModalCloseButton.js.map +1 -1
- package/lib/commonjs/connect/NavigationBar.js +1 -1
- package/lib/commonjs/connect/NavigationBar.js.map +1 -1
- package/lib/commonjs/functions.js +1 -1
- package/lib/commonjs/functions.js.map +1 -1
- package/lib/commonjs/helpers.js +1 -1
- package/lib/commonjs/hooks/useLinkController.js +1 -1
- package/lib/commonjs/hooks/useLinkController.js.map +1 -1
- package/lib/commonjs/specs/NativeAddToWalletButton.js +1 -1
- package/lib/commonjs/specs/NativeAddressSheet.js +1 -1
- package/lib/commonjs/specs/NativeApplePayButton.js +1 -1
- package/lib/commonjs/specs/NativeAuBECSDebitForm.js +1 -1
- package/lib/commonjs/specs/NativeCardField.js +1 -1
- package/lib/commonjs/specs/NativeCardField.js.map +1 -1
- package/lib/commonjs/specs/NativeCardForm.js +1 -1
- package/lib/commonjs/specs/NativeCardForm.js.map +1 -1
- package/lib/commonjs/specs/NativeConnectAccountOnboardingView.js +1 -1
- package/lib/commonjs/specs/NativeCurrencySelectorElement.js +1 -1
- package/lib/commonjs/specs/NativeEmbeddedPaymentElement.js +1 -1
- package/lib/commonjs/specs/NativeEmbeddedPaymentElement.js.map +1 -1
- package/lib/commonjs/specs/NativeGooglePayButton.js +1 -1
- package/lib/commonjs/specs/NativeNavigationBar.js +1 -1
- package/lib/commonjs/specs/NativePaymentMethodMessagingElement.js +1 -1
- package/lib/commonjs/specs/NativeStripeContainer.js +1 -1
- package/lib/commonjs/specs/NativeStripeSdkModule.js.map +1 -1
- package/lib/commonjs/types/EmbeddedPaymentElement.js +1 -1
- package/lib/commonjs/types/EmbeddedPaymentElement.js.map +1 -1
- package/lib/commonjs/types/PaymentIntent.js.map +1 -1
- package/lib/module/components/AddToWalletButton.js +1 -1
- package/lib/module/components/AddToWalletButton.js.map +1 -1
- package/lib/module/components/AddressSheet.js +1 -1
- package/lib/module/components/AddressSheet.js.map +1 -1
- package/lib/module/components/AuBECSDebitForm.js +1 -1
- package/lib/module/components/AuBECSDebitForm.js.map +1 -1
- package/lib/module/components/CardField.js +1 -1
- package/lib/module/components/CardField.js.map +1 -1
- package/lib/module/components/CardForm.js +1 -1
- package/lib/module/components/CardForm.js.map +1 -1
- package/lib/module/components/CurrencySelectorElement.js +1 -1
- package/lib/module/components/CurrencySelectorElement.js.map +1 -1
- package/lib/module/components/PaymentMethodMessagingElement.js +1 -1
- package/lib/module/components/PaymentMethodMessagingElement.js.map +1 -1
- package/lib/module/components/PlatformPayButton.js +1 -1
- package/lib/module/components/PlatformPayButton.js.map +1 -1
- package/lib/module/components/StripeContainer.js +1 -1
- package/lib/module/components/StripeContainer.js.map +1 -1
- package/lib/module/connect/Components.js +1 -1
- package/lib/module/connect/Components.js.map +1 -1
- package/lib/module/connect/ConnectComponentsProvider.js +1 -1
- package/lib/module/connect/ConnectComponentsProvider.js.map +1 -1
- package/lib/module/connect/EmbeddedComponent.js +2 -2
- package/lib/module/connect/EmbeddedComponent.js.map +1 -1
- package/lib/module/connect/ModalCloseButton.js +1 -1
- package/lib/module/connect/ModalCloseButton.js.map +1 -1
- package/lib/module/connect/NavigationBar.js +1 -1
- package/lib/module/connect/NavigationBar.js.map +1 -1
- package/lib/module/functions.js +1 -1
- package/lib/module/functions.js.map +1 -1
- package/lib/module/helpers.js +1 -1
- package/lib/module/hooks/useLinkController.js +1 -1
- package/lib/module/hooks/useLinkController.js.map +1 -1
- package/lib/module/specs/NativeAddToWalletButton.js +1 -1
- package/lib/module/specs/NativeAddressSheet.js +1 -1
- package/lib/module/specs/NativeApplePayButton.js +1 -1
- package/lib/module/specs/NativeAuBECSDebitForm.js +1 -1
- package/lib/module/specs/NativeCardField.js +1 -1
- package/lib/module/specs/NativeCardField.js.map +1 -1
- package/lib/module/specs/NativeCardForm.js +1 -1
- package/lib/module/specs/NativeCardForm.js.map +1 -1
- package/lib/module/specs/NativeConnectAccountOnboardingView.js +1 -1
- package/lib/module/specs/NativeCurrencySelectorElement.js +1 -1
- package/lib/module/specs/NativeEmbeddedPaymentElement.js +1 -1
- package/lib/module/specs/NativeEmbeddedPaymentElement.js.map +1 -1
- package/lib/module/specs/NativeGooglePayButton.js +1 -1
- package/lib/module/specs/NativeNavigationBar.js +1 -1
- package/lib/module/specs/NativePaymentMethodMessagingElement.js +1 -1
- package/lib/module/specs/NativeStripeContainer.js +1 -1
- package/lib/module/specs/NativeStripeSdkModule.js.map +1 -1
- package/lib/module/types/EmbeddedPaymentElement.js +1 -1
- package/lib/module/types/EmbeddedPaymentElement.js.map +1 -1
- package/lib/module/types/PaymentIntent.js.map +1 -1
- package/lib/typescript/src/connect/EmbeddedComponent.d.ts +1 -0
- package/lib/typescript/src/connect/EmbeddedComponent.d.ts.map +1 -1
- package/lib/typescript/src/functions.d.ts +11 -0
- package/lib/typescript/src/functions.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useLinkController.d.ts +7 -0
- package/lib/typescript/src/hooks/useLinkController.d.ts.map +1 -1
- package/lib/typescript/src/specs/NativeStripeSdkModule.d.ts +4 -0
- package/lib/typescript/src/specs/NativeStripeSdkModule.d.ts.map +1 -1
- package/lib/typescript/src/types/LinkController.d.ts +10 -5
- package/lib/typescript/src/types/LinkController.d.ts.map +1 -1
- package/lib/typescript/src/types/PaymentIntent.d.ts +17 -1
- package/lib/typescript/src/types/PaymentIntent.d.ts.map +1 -1
- package/lib/typescript/src/types/PaymentMethod.d.ts +1 -1
- package/lib/typescript/src/types/PaymentMethod.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/connect/EmbeddedComponent.tsx +14 -2
- package/src/functions.ts +26 -0
- package/src/hooks/useLinkController.tsx +24 -1
- package/src/specs/NativeStripeSdkModule.ts +5 -0
- package/src/types/LinkController.ts +9 -5
- package/src/types/PaymentIntent.ts +21 -1
- package/src/types/PaymentMethod.ts +1 -0
- package/stripe-react-native.podspec +1 -1
- package/android/.idea/AndroidProjectSystem.xml +0 -6
- package/android/.idea/caches/deviceStreaming.xml +0 -835
- package/android/.idea/compiler.xml +0 -6
- package/android/.idea/gradle.xml +0 -17
- package/android/.idea/migrations.xml +0 -10
- package/android/.idea/misc.xml +0 -10
- package/android/.idea/runConfigurations.xml +0 -17
- package/android/.idea/vcs.xml +0 -6
- package/android/local.properties +0 -8
- package/android/src/main/java/com/reactnativestripesdk/CurrencySelectorAppearance.kt +0 -229
- package/android/src/main/java/com/reactnativestripesdk/utils/CheckoutAddressUpdate.kt +0 -45
- package/android/src/main/java/com/reactnativestripesdk/utils/CheckoutMappers.kt +0 -127
- package/android/src/test/java/com/reactnativestripesdk/CurrencySelectorAppearanceTest.kt +0 -137
- package/android/src/test/java/com/reactnativestripesdk/utils/CheckoutMappersTest.kt +0 -98
- package/android/src/test/java/com/reactnativestripesdk/utils/CheckoutTestFixtures.java +0 -57
- package/ios/CurrencySelectorAppearance.swift +0 -120
- package/ios/Mappers+Checkout.swift +0 -337
|
@@ -63,8 +63,12 @@ class PaymentMethodFactory {
|
|
|
63
63
|
return try createCashAppPaymentMethodParams()
|
|
64
64
|
case STPPaymentMethodType.revolutPay:
|
|
65
65
|
return try createRevolutPayPaymentMethodParams()
|
|
66
|
+
case STPPaymentMethodType.payByBank:
|
|
67
|
+
return try createPayByBankPaymentMethodParams()
|
|
66
68
|
// case STPPaymentMethodType.weChatPay:
|
|
67
69
|
// return try createWeChatPayPaymentMethodParams()
|
|
70
|
+
case STPPaymentMethodType.twint:
|
|
71
|
+
return try createTwintPaymentMethodParams()
|
|
68
72
|
default:
|
|
69
73
|
throw PaymentMethodError.paymentNotSupported
|
|
70
74
|
}
|
|
@@ -120,6 +124,8 @@ class PaymentMethodFactory {
|
|
|
120
124
|
return nil
|
|
121
125
|
case STPPaymentMethodType.revolutPay:
|
|
122
126
|
return nil
|
|
127
|
+
case STPPaymentMethodType.payByBank, STPPaymentMethodType.twint:
|
|
128
|
+
return nil
|
|
123
129
|
default:
|
|
124
130
|
throw PaymentMethodError.paymentNotSupported
|
|
125
131
|
}
|
|
@@ -323,6 +329,14 @@ class PaymentMethodFactory {
|
|
|
323
329
|
return STPPaymentMethodParams(eps: params, billingDetails: billingDetails, metadata: metadata)
|
|
324
330
|
}
|
|
325
331
|
|
|
332
|
+
private func createTwintPaymentMethodParams() throws -> STPPaymentMethodParams {
|
|
333
|
+
let params = STPPaymentMethodTwintParams()
|
|
334
|
+
guard let billingDetails = billingDetailsParams else {
|
|
335
|
+
throw PaymentMethodError.twintPaymentMissingParams
|
|
336
|
+
}
|
|
337
|
+
return STPPaymentMethodParams(twint: params, billingDetails: billingDetails, metadata: metadata)
|
|
338
|
+
}
|
|
339
|
+
|
|
326
340
|
private func createBECSDebitPaymentMethodParams() throws -> STPPaymentMethodParams {
|
|
327
341
|
let params = STPPaymentMethodAUBECSDebitParams()
|
|
328
342
|
|
|
@@ -396,6 +410,11 @@ class PaymentMethodFactory {
|
|
|
396
410
|
return STPPaymentMethodParams(revolutPay: params, billingDetails: billingDetailsParams, metadata: metadata)
|
|
397
411
|
}
|
|
398
412
|
|
|
413
|
+
private func createPayByBankPaymentMethodParams() throws -> STPPaymentMethodParams {
|
|
414
|
+
let params = STPPaymentMethodPayByBankParams()
|
|
415
|
+
return STPPaymentMethodParams(payByBank: params, billingDetails: billingDetailsParams, metadata: metadata)
|
|
416
|
+
}
|
|
417
|
+
|
|
399
418
|
func createMandateData() -> STPMandateDataParams? {
|
|
400
419
|
if let mandateParams = paymentMethodData?["mandateData"] as? NSDictionary {
|
|
401
420
|
if let customerAcceptanceParams = mandateParams["customerAcceptance"] as? NSDictionary {
|
|
@@ -415,6 +434,7 @@ class PaymentMethodFactory {
|
|
|
415
434
|
enum PaymentMethodError: Error {
|
|
416
435
|
case cardPaymentMissingParams
|
|
417
436
|
case epsPaymentMissingParams
|
|
437
|
+
case twintPaymentMissingParams
|
|
418
438
|
case idealPaymentMissingParams
|
|
419
439
|
case paymentNotSupported
|
|
420
440
|
case cardPaymentOptionsMissingParams
|
|
@@ -450,6 +470,8 @@ extension PaymentMethodError: LocalizedError {
|
|
|
450
470
|
return NSLocalizedString("Multibanco requires that you provide the following billing details: email", comment: "Create payment error")
|
|
451
471
|
case .epsPaymentMissingParams:
|
|
452
472
|
return NSLocalizedString("You must provide billing details", comment: "Create payment error")
|
|
473
|
+
case .twintPaymentMissingParams:
|
|
474
|
+
return NSLocalizedString("You must provide billing details", comment: "Create payment error")
|
|
453
475
|
case .afterpayClearpayPaymentMissingParams:
|
|
454
476
|
return NSLocalizedString("You must provide billing details", comment: "Create payment error")
|
|
455
477
|
case .paymentNotSupported:
|
package/ios/StripeSdk.mm
CHANGED
|
@@ -599,6 +599,13 @@ RCT_EXPORT_METHOD(presentLinkController:(nonnull RCTPromiseResolveBlock)resolve
|
|
|
599
599
|
[StripeSdkImpl.shared presentLinkController:resolve rejecter:reject];
|
|
600
600
|
}
|
|
601
601
|
|
|
602
|
+
RCT_EXPORT_METHOD(confirmLinkControllerSetupIntent:(nonnull NSDictionary *)params
|
|
603
|
+
resolve:(nonnull RCTPromiseResolveBlock)resolve
|
|
604
|
+
reject:(nonnull RCTPromiseRejectBlock)reject)
|
|
605
|
+
{
|
|
606
|
+
[StripeSdkImpl.shared confirmLinkControllerSetupIntent:params resolver:resolve rejecter:reject];
|
|
607
|
+
}
|
|
608
|
+
|
|
602
609
|
/* clang-format on */
|
|
603
610
|
|
|
604
611
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
@@ -5,315 +5,91 @@
|
|
|
5
5
|
// Created by Nick Porter on 4/29/26.
|
|
6
6
|
//
|
|
7
7
|
|
|
8
|
-
import Combine
|
|
9
8
|
import Foundation
|
|
10
|
-
@_spi(ReactNativeSDK) import StripePaymentSheet
|
|
11
9
|
|
|
12
10
|
extension StripeSdkImpl {
|
|
13
|
-
internal func currentCheckoutStateResult(checkout: Checkout) -> NSDictionary {
|
|
14
|
-
Mappers.mapFromCheckoutState(isLoading: checkout.isLoading, session: checkout.session)
|
|
15
|
-
}
|
|
16
|
-
|
|
17
11
|
@objc(initCheckoutSession:configuration:resolver:rejecter:)
|
|
18
12
|
public func initCheckoutSession(
|
|
19
|
-
clientSecret: String,
|
|
20
|
-
configuration: NSDictionary,
|
|
21
|
-
resolver
|
|
13
|
+
clientSecret _: String,
|
|
14
|
+
configuration _: NSDictionary,
|
|
15
|
+
resolver _: @escaping RCTPromiseResolveBlock,
|
|
22
16
|
rejecter reject: @escaping RCTPromiseRejectBlock
|
|
23
17
|
) {
|
|
24
|
-
|
|
25
|
-
clientSecret: clientSecret,
|
|
26
|
-
params: configuration
|
|
27
|
-
)
|
|
28
|
-
|
|
29
|
-
Task { @MainActor [weak self] in
|
|
30
|
-
guard let self else {
|
|
31
|
-
reject(ErrorType.Failed, "Stripe SDK is unavailable", nil)
|
|
32
|
-
return
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
do {
|
|
36
|
-
let checkout = try await Checkout(configuration: checkoutConfiguration)
|
|
37
|
-
let sessionKey = UUID().uuidString
|
|
38
|
-
|
|
39
|
-
let cancellable = checkout.$isLoading
|
|
40
|
-
.combineLatest(checkout.$session)
|
|
41
|
-
.dropFirst()
|
|
42
|
-
.sink { [weak self] isLoading, session in
|
|
43
|
-
self?.emitter?.emitCheckoutSessionDidChangeState([
|
|
44
|
-
"sessionKey": sessionKey,
|
|
45
|
-
"state": Mappers.mapFromCheckoutState(isLoading: isLoading, session: session),
|
|
46
|
-
])
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
self.checkoutInstances[sessionKey] = checkout
|
|
50
|
-
self.checkoutStateCancellables[sessionKey] = cancellable
|
|
51
|
-
|
|
52
|
-
resolve([
|
|
53
|
-
"sessionKey": sessionKey,
|
|
54
|
-
"state": self.currentCheckoutStateResult(checkout: checkout),
|
|
55
|
-
])
|
|
56
|
-
} catch {
|
|
57
|
-
reject(self.checkoutErrorCode(for: error), error.localizedDescription, error)
|
|
58
|
-
}
|
|
59
|
-
}
|
|
18
|
+
rejectCheckoutUnavailable(reject)
|
|
60
19
|
}
|
|
61
20
|
|
|
62
21
|
@objc(checkoutUpdateShippingAddress:address:name:phone:resolver:rejecter:)
|
|
63
22
|
public func checkoutUpdateShippingAddress(
|
|
64
|
-
sessionKey: String,
|
|
65
|
-
address: NSDictionary,
|
|
66
|
-
name: String?,
|
|
67
|
-
phone: String?,
|
|
68
|
-
resolver
|
|
23
|
+
sessionKey _: String,
|
|
24
|
+
address _: NSDictionary,
|
|
25
|
+
name _: String?,
|
|
26
|
+
phone _: String?,
|
|
27
|
+
resolver _: @escaping RCTPromiseResolveBlock,
|
|
69
28
|
rejecter reject: @escaping RCTPromiseRejectBlock
|
|
70
29
|
) {
|
|
71
|
-
|
|
72
|
-
sessionKey: sessionKey,
|
|
73
|
-
address: address,
|
|
74
|
-
name: name,
|
|
75
|
-
phone: phone,
|
|
76
|
-
missingCountryMessage: "A shipping address country is required.",
|
|
77
|
-
resolver: resolve,
|
|
78
|
-
rejecter: reject
|
|
79
|
-
) { checkout, addressUpdate in
|
|
80
|
-
try await checkout.updateShippingAddress(
|
|
81
|
-
name: addressUpdate.name,
|
|
82
|
-
phone: addressUpdate.phone,
|
|
83
|
-
address: addressUpdate.address
|
|
84
|
-
)
|
|
85
|
-
}
|
|
30
|
+
rejectCheckoutUnavailable(reject)
|
|
86
31
|
}
|
|
87
32
|
|
|
88
33
|
@objc(checkoutApplyPromotionCode:code:resolver:rejecter:)
|
|
89
34
|
public func checkoutApplyPromotionCode(
|
|
90
|
-
sessionKey: String,
|
|
91
|
-
code: String,
|
|
92
|
-
resolver
|
|
35
|
+
sessionKey _: String,
|
|
36
|
+
code _: String,
|
|
37
|
+
resolver _: @escaping RCTPromiseResolveBlock,
|
|
93
38
|
rejecter reject: @escaping RCTPromiseRejectBlock
|
|
94
39
|
) {
|
|
95
|
-
|
|
96
|
-
sessionKey: sessionKey,
|
|
97
|
-
resolver: resolve,
|
|
98
|
-
rejecter: reject
|
|
99
|
-
) { checkout in
|
|
100
|
-
try await checkout.applyPromotionCode(code)
|
|
101
|
-
}
|
|
40
|
+
rejectCheckoutUnavailable(reject)
|
|
102
41
|
}
|
|
103
42
|
|
|
104
43
|
@objc(checkoutRemovePromotionCode:resolver:rejecter:)
|
|
105
44
|
public func checkoutRemovePromotionCode(
|
|
106
|
-
sessionKey: String,
|
|
107
|
-
resolver
|
|
45
|
+
sessionKey _: String,
|
|
46
|
+
resolver _: @escaping RCTPromiseResolveBlock,
|
|
108
47
|
rejecter reject: @escaping RCTPromiseRejectBlock
|
|
109
48
|
) {
|
|
110
|
-
|
|
111
|
-
sessionKey: sessionKey,
|
|
112
|
-
resolver: resolve,
|
|
113
|
-
rejecter: reject
|
|
114
|
-
) { checkout in
|
|
115
|
-
try await checkout.removePromotionCode()
|
|
116
|
-
}
|
|
49
|
+
rejectCheckoutUnavailable(reject)
|
|
117
50
|
}
|
|
118
51
|
|
|
119
52
|
@objc(checkoutUpdateLineItemQuantity:lineItemId:quantity:resolver:rejecter:)
|
|
120
53
|
public func checkoutUpdateLineItemQuantity(
|
|
121
|
-
sessionKey: String,
|
|
122
|
-
lineItemId: String,
|
|
123
|
-
quantity: Double,
|
|
124
|
-
resolver
|
|
54
|
+
sessionKey _: String,
|
|
55
|
+
lineItemId _: String,
|
|
56
|
+
quantity _: Double,
|
|
57
|
+
resolver _: @escaping RCTPromiseResolveBlock,
|
|
125
58
|
rejecter reject: @escaping RCTPromiseRejectBlock
|
|
126
59
|
) {
|
|
127
|
-
|
|
128
|
-
reject(ErrorType.Failed, "Line item quantity must be an integer.", nil)
|
|
129
|
-
return
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
performCheckoutMutation(
|
|
133
|
-
sessionKey: sessionKey,
|
|
134
|
-
resolver: resolve,
|
|
135
|
-
rejecter: reject
|
|
136
|
-
) { checkout in
|
|
137
|
-
try await checkout.updateQuantity(lineItemId: lineItemId, quantity: integerQuantity)
|
|
138
|
-
}
|
|
60
|
+
rejectCheckoutUnavailable(reject)
|
|
139
61
|
}
|
|
140
62
|
|
|
141
63
|
@objc(checkoutSelectShippingOption:id:resolver:rejecter:)
|
|
142
64
|
public func checkoutSelectShippingOption(
|
|
143
|
-
sessionKey: String,
|
|
144
|
-
id: String,
|
|
145
|
-
resolver
|
|
65
|
+
sessionKey _: String,
|
|
66
|
+
id _: String,
|
|
67
|
+
resolver _: @escaping RCTPromiseResolveBlock,
|
|
146
68
|
rejecter reject: @escaping RCTPromiseRejectBlock
|
|
147
69
|
) {
|
|
148
|
-
|
|
149
|
-
sessionKey: sessionKey,
|
|
150
|
-
resolver: resolve,
|
|
151
|
-
rejecter: reject
|
|
152
|
-
) { checkout in
|
|
153
|
-
try await checkout.selectShippingOption(id)
|
|
154
|
-
}
|
|
70
|
+
rejectCheckoutUnavailable(reject)
|
|
155
71
|
}
|
|
156
72
|
|
|
157
73
|
@objc(checkoutRunServerUpdateStart:resolver:rejecter:)
|
|
158
74
|
public func checkoutRunServerUpdateStart(
|
|
159
|
-
sessionKey: String,
|
|
160
|
-
resolver
|
|
75
|
+
sessionKey _: String,
|
|
76
|
+
resolver _: @escaping RCTPromiseResolveBlock,
|
|
161
77
|
rejecter reject: @escaping RCTPromiseRejectBlock
|
|
162
78
|
) {
|
|
163
|
-
|
|
164
|
-
guard let self else {
|
|
165
|
-
reject(ErrorType.Failed, "Stripe SDK is unavailable", nil)
|
|
166
|
-
return
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
guard let checkout = self.checkoutInstances[sessionKey] else {
|
|
170
|
-
reject(ErrorType.Failed, "Checkout session not found", nil)
|
|
171
|
-
return
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
guard self.serverUpdateContinuations[sessionKey] == nil else {
|
|
175
|
-
reject(ErrorType.Failed, "A server update is already in progress for this session", nil)
|
|
176
|
-
return
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
do {
|
|
180
|
-
try await checkout.runServerUpdate {
|
|
181
|
-
try await withCheckedThrowingContinuation { continuation in
|
|
182
|
-
self.serverUpdateContinuations[sessionKey] = continuation
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
resolve(self.currentCheckoutStateResult(checkout: checkout))
|
|
186
|
-
} catch {
|
|
187
|
-
reject(self.checkoutErrorCode(for: error), error.localizedDescription, error)
|
|
188
|
-
}
|
|
189
|
-
}
|
|
79
|
+
rejectCheckoutUnavailable(reject)
|
|
190
80
|
}
|
|
191
81
|
|
|
192
82
|
@objc(checkoutRunServerUpdateComplete:error:resolver:rejecter:)
|
|
193
83
|
public func checkoutRunServerUpdateComplete(
|
|
194
|
-
sessionKey: String,
|
|
195
|
-
error: String?,
|
|
196
|
-
resolver
|
|
84
|
+
sessionKey _: String,
|
|
85
|
+
error _: String?,
|
|
86
|
+
resolver _: @escaping RCTPromiseResolveBlock,
|
|
197
87
|
rejecter reject: @escaping RCTPromiseRejectBlock
|
|
198
88
|
) {
|
|
199
|
-
|
|
200
|
-
reject(ErrorType.Failed, "No pending server update for this session", nil)
|
|
201
|
-
return
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
if let error {
|
|
205
|
-
continuation.resume(throwing: CheckoutError.apiError(message: error))
|
|
206
|
-
} else {
|
|
207
|
-
continuation.resume()
|
|
208
|
-
}
|
|
209
|
-
resolve(nil)
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
internal func buildCheckoutConfiguration(
|
|
213
|
-
clientSecret: String,
|
|
214
|
-
params: NSDictionary
|
|
215
|
-
) -> Checkout.Configuration {
|
|
216
|
-
var configuration = Checkout.Configuration(clientSecret: clientSecret)
|
|
217
|
-
|
|
218
|
-
if let adaptivePricing = params["adaptivePricing"] as? NSDictionary,
|
|
219
|
-
let allowed = adaptivePricing["allowed"] as? Bool {
|
|
220
|
-
configuration.adaptivePricing.allowed = allowed
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
return configuration
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
private func performCheckoutMutation(
|
|
227
|
-
sessionKey: String,
|
|
228
|
-
resolver resolve: @escaping RCTPromiseResolveBlock,
|
|
229
|
-
rejecter reject: @escaping RCTPromiseRejectBlock,
|
|
230
|
-
operation: @escaping (Checkout) async throws -> Void
|
|
231
|
-
) {
|
|
232
|
-
Task { @MainActor [weak self] in
|
|
233
|
-
guard let self else {
|
|
234
|
-
reject(ErrorType.Failed, "Stripe SDK is unavailable", nil)
|
|
235
|
-
return
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
guard let checkout = self.checkoutInstances[sessionKey] else {
|
|
239
|
-
reject(ErrorType.Failed, "Checkout session not found", nil)
|
|
240
|
-
return
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
do {
|
|
244
|
-
try await operation(checkout)
|
|
245
|
-
resolve(self.currentCheckoutStateResult(checkout: checkout))
|
|
246
|
-
} catch {
|
|
247
|
-
reject(self.checkoutErrorCode(for: error), error.localizedDescription, error)
|
|
248
|
-
}
|
|
249
|
-
}
|
|
89
|
+
rejectCheckoutUnavailable(reject)
|
|
250
90
|
}
|
|
251
91
|
|
|
252
|
-
private func
|
|
253
|
-
|
|
254
|
-
address: NSDictionary,
|
|
255
|
-
name: String?,
|
|
256
|
-
phone: String?,
|
|
257
|
-
missingCountryMessage: String,
|
|
258
|
-
resolver resolve: @escaping RCTPromiseResolveBlock,
|
|
259
|
-
rejecter reject: @escaping RCTPromiseRejectBlock,
|
|
260
|
-
operation: @escaping (Checkout, Checkout.ContactAddress) async throws -> Void
|
|
261
|
-
) {
|
|
262
|
-
guard let addressUpdate = buildCheckoutAddressUpdate(
|
|
263
|
-
address: address,
|
|
264
|
-
name: name,
|
|
265
|
-
phone: phone
|
|
266
|
-
) else {
|
|
267
|
-
reject(ErrorType.Failed, missingCountryMessage, nil)
|
|
268
|
-
return
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
performCheckoutMutation(
|
|
272
|
-
sessionKey: sessionKey,
|
|
273
|
-
resolver: resolve,
|
|
274
|
-
rejecter: reject
|
|
275
|
-
) { checkout in
|
|
276
|
-
try await operation(checkout, addressUpdate)
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
private func buildCheckoutAddressUpdate(
|
|
281
|
-
address: NSDictionary,
|
|
282
|
-
name: String?,
|
|
283
|
-
phone: String?
|
|
284
|
-
) -> Checkout.ContactAddress? {
|
|
285
|
-
guard let country = address["country"] as? String, !country.isEmpty else {
|
|
286
|
-
return nil
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
let checkoutAddress = Checkout.Address(
|
|
290
|
-
country: country,
|
|
291
|
-
line1: address["line1"] as? String,
|
|
292
|
-
line2: address["line2"] as? String,
|
|
293
|
-
city: address["city"] as? String,
|
|
294
|
-
state: address["state"] as? String,
|
|
295
|
-
postalCode: address["postalCode"] as? String
|
|
296
|
-
)
|
|
297
|
-
|
|
298
|
-
return Checkout.ContactAddress(
|
|
299
|
-
name: name,
|
|
300
|
-
phone: phone,
|
|
301
|
-
address: checkoutAddress
|
|
302
|
-
)
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
private func checkoutErrorCode(for error: Error) -> String {
|
|
306
|
-
if let checkoutError = error as? CheckoutError {
|
|
307
|
-
switch checkoutError {
|
|
308
|
-
case .invalidClientSecret:
|
|
309
|
-
return "InvalidClientSecret"
|
|
310
|
-
case .sheetCurrentlyPresented:
|
|
311
|
-
return "SheetCurrentlyPresented"
|
|
312
|
-
default:
|
|
313
|
-
return ErrorType.Failed
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
return ErrorType.Failed
|
|
92
|
+
private func rejectCheckoutUnavailable(_ reject: RCTPromiseRejectBlock) {
|
|
93
|
+
reject(ErrorType.Failed, StripeSdkImpl.checkoutUnavailableMessage, nil)
|
|
318
94
|
}
|
|
319
95
|
}
|
|
@@ -71,36 +71,13 @@ extension StripeSdkImpl {
|
|
|
71
71
|
|
|
72
72
|
@objc(createEmbeddedPaymentElementWithCheckout:configuration:resolve:reject:)
|
|
73
73
|
public func createEmbeddedPaymentElementWithCheckout(
|
|
74
|
-
sessionKey: String,
|
|
75
|
-
configuration: NSDictionary,
|
|
74
|
+
sessionKey _: String,
|
|
75
|
+
configuration _: NSDictionary,
|
|
76
76
|
resolve: @escaping RCTPromiseResolveBlock,
|
|
77
|
-
reject: @escaping RCTPromiseRejectBlock
|
|
77
|
+
reject _: @escaping RCTPromiseRejectBlock
|
|
78
78
|
) {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
resolve(nil)
|
|
82
|
-
return
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
guard let configuration = buildEmbeddedPaymentElementConfiguration(params: configuration).configuration else {
|
|
86
|
-
emitLoadingFailed(message: "Invalid configuration")
|
|
87
|
-
resolve(nil)
|
|
88
|
-
return
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
Task {
|
|
92
|
-
do {
|
|
93
|
-
let embeddedPaymentElement = try await EmbeddedPaymentElement.create(
|
|
94
|
-
checkout: checkout,
|
|
95
|
-
configuration: configuration
|
|
96
|
-
)
|
|
97
|
-
attachEmbedded(embeddedPaymentElement)
|
|
98
|
-
resolve(nil)
|
|
99
|
-
} catch {
|
|
100
|
-
emitLoadingFailed(error: error)
|
|
101
|
-
resolve(nil)
|
|
102
|
-
}
|
|
103
|
-
}
|
|
79
|
+
emitLoadingFailed(message: StripeSdkImpl.checkoutUnavailableMessage)
|
|
80
|
+
resolve(nil)
|
|
104
81
|
}
|
|
105
82
|
|
|
106
83
|
/// Wires up a freshly created element and emits its initial height /
|
|
@@ -19,7 +19,6 @@ extension StripeSdkImpl {
|
|
|
19
19
|
let phoneNumber = params["phoneNumber"] as? String
|
|
20
20
|
let merchantDisplayName = params["merchantDisplayName"] as? String
|
|
21
21
|
let allowLogout = params["allowLogout"] as? Bool ?? true
|
|
22
|
-
let setupIntentClientSecret = params["setupIntentClientSecret"] as? String
|
|
23
22
|
|
|
24
23
|
var supportedPaymentMethodTypes: [LinkPaymentMethodType]?
|
|
25
24
|
if let rawTypes = params["supportedPaymentMethodTypes"] as? [String] {
|
|
@@ -32,15 +31,17 @@ extension StripeSdkImpl {
|
|
|
32
31
|
}
|
|
33
32
|
}
|
|
34
33
|
|
|
34
|
+
let paymentMethodTypes = params["paymentMethodTypes"] as? [String]
|
|
35
|
+
|
|
35
36
|
let configuration = LinkConfiguration(
|
|
36
37
|
supportedPaymentMethodTypes: supportedPaymentMethodTypes,
|
|
38
|
+
paymentMethodTypes: paymentMethodTypes,
|
|
37
39
|
allowLogout: allowLogout,
|
|
38
40
|
merchantDisplayName: merchantDisplayName
|
|
39
41
|
)
|
|
40
42
|
|
|
41
43
|
LinkController.create(
|
|
42
44
|
apiClient: STPAPIClient.shared,
|
|
43
|
-
setupIntentClientSecret: setupIntentClientSecret,
|
|
44
45
|
configuration: configuration
|
|
45
46
|
) { [weak self] result in
|
|
46
47
|
switch result {
|
|
@@ -94,6 +95,43 @@ extension StripeSdkImpl {
|
|
|
94
95
|
}
|
|
95
96
|
}
|
|
96
97
|
|
|
98
|
+
@objc(confirmLinkControllerSetupIntent:resolver:rejecter:)
|
|
99
|
+
public func confirmLinkControllerSetupIntent(
|
|
100
|
+
_ params: NSDictionary,
|
|
101
|
+
resolver resolve: @escaping RCTPromiseResolveBlock,
|
|
102
|
+
rejecter reject: @escaping RCTPromiseRejectBlock
|
|
103
|
+
) {
|
|
104
|
+
guard let clientSecret = params["clientSecret"] as? String else {
|
|
105
|
+
resolve(Errors.createError(ErrorType.Failed, "clientSecret is required."))
|
|
106
|
+
return
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
guard let controller = linkController else {
|
|
110
|
+
resolve(Errors.createError(ErrorType.Failed, "LinkController has not been initialized. Call initLinkController first."))
|
|
111
|
+
return
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
Task { @MainActor in
|
|
115
|
+
let presentingViewController = findViewControllerPresenter(
|
|
116
|
+
from: RCTKeyWindow()?.rootViewController ?? UIViewController()
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
controller.confirmSetupIntent(
|
|
120
|
+
clientSecret: clientSecret,
|
|
121
|
+
from: presentingViewController
|
|
122
|
+
) { result in
|
|
123
|
+
switch result {
|
|
124
|
+
case .success(.completed):
|
|
125
|
+
resolve([:])
|
|
126
|
+
case .success(.canceled):
|
|
127
|
+
resolve(Errors.createError(ErrorType.Canceled, "The customer canceled SetupIntent confirmation."))
|
|
128
|
+
case .failure(let error):
|
|
129
|
+
resolve(Errors.createError(ErrorType.Failed, error))
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
97
135
|
private static func mapLinkPaymentMethodPreview(_ preview: LinkController.PaymentMethodPreview) -> [String: Any] {
|
|
98
136
|
let iconBase64 = "data:image/png;base64," + (preview.icon.pngData()?.base64EncodedString(options: []) ?? "")
|
|
99
137
|
var result: [String: Any] = [
|
|
@@ -183,21 +183,8 @@ extension StripeSdkImpl {
|
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
185
|
|
|
186
|
-
if
|
|
187
|
-
|
|
188
|
-
guard let checkout = checkoutInstances[sessionKey] else {
|
|
189
|
-
resolve(Errors.createError(ErrorType.Failed, "Checkout session not found"))
|
|
190
|
-
return
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
if params["customFlow"] as? Bool == true {
|
|
194
|
-
PaymentSheet.FlowController.create(checkout: checkout,
|
|
195
|
-
configuration: configuration) { [weak self] result in
|
|
196
|
-
handlePaymentSheetFlowControllerResult(result: result, stripeSdk: self)
|
|
197
|
-
}
|
|
198
|
-
} else {
|
|
199
|
-
resolve(Errors.createError(ErrorType.Failed, "PaymentSheet with checkout is not supported. Use customFlow: true instead."))
|
|
200
|
-
}
|
|
186
|
+
if params["checkout"] != nil {
|
|
187
|
+
resolve(Errors.createError(ErrorType.Failed, StripeSdkImpl.checkoutUnavailableMessage))
|
|
201
188
|
} else if let paymentIntentClientSecret = params["paymentIntentClientSecret"] as? String {
|
|
202
189
|
if !Errors.isPIClientSecretValid(clientSecret: paymentIntentClientSecret) {
|
|
203
190
|
resolve(Errors.createError(ErrorType.Failed, "`secret` format does not match expected client secret formatting."))
|
package/ios/StripeSdkImpl.swift
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import AuthenticationServices
|
|
2
|
-
import Combine
|
|
3
2
|
import Foundation
|
|
4
3
|
import PassKit
|
|
5
4
|
@_spi(DashboardOnly) @_spi(STP) import Stripe
|
|
@@ -38,6 +37,8 @@ private func getDeviceType() -> String {
|
|
|
38
37
|
public class StripeSdkImpl: NSObject, UIAdaptivePresentationControllerDelegate {
|
|
39
38
|
@objc public static let shared = StripeSdkImpl()
|
|
40
39
|
|
|
40
|
+
static let checkoutUnavailableMessage = "Checkout Sessions are temporarily unavailable while the native integration is being rebuilt."
|
|
41
|
+
|
|
41
42
|
static var isNewArchitecture: Bool {
|
|
42
43
|
#if RCT_NEW_ARCH_ENABLED
|
|
43
44
|
return true
|
|
@@ -63,9 +64,6 @@ public class StripeSdkImpl: NSObject, UIAdaptivePresentationControllerDelegate {
|
|
|
63
64
|
|
|
64
65
|
internal var paymentSheet: PaymentSheet?
|
|
65
66
|
internal var paymentSheetFlowController: PaymentSheet.FlowController?
|
|
66
|
-
internal var checkoutInstances: [String: Checkout] = [:]
|
|
67
|
-
internal var checkoutStateCancellables: [String: AnyCancellable] = [:]
|
|
68
|
-
internal var serverUpdateContinuations: [String: CheckedContinuation<Void, Error>] = [:]
|
|
69
67
|
var paymentSheetIntentCreationCallback: ((Result<String, Error>) -> Void)?
|
|
70
68
|
var paymentSheetConfirmationTokenIntentCreationCallback: ((Result<String, Error>) -> Void)?
|
|
71
69
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.AddToWalletButton=AddToWalletButton;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _NativeAddToWalletButton=_interopRequireDefault(require("../specs/NativeAddToWalletButton"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.AddToWalletButton=AddToWalletButton;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _NativeAddToWalletButton=_interopRequireDefault(require("../specs/NativeAddToWalletButton"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/mats/stripe/stripe-react-native/src/components/AddToWalletButton.tsx";var _excluded=["onComplete"];function AddToWalletButton(_ref){var onComplete=_ref.onComplete,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);return(0,_jsxRuntime.jsx)(_NativeAddToWalletButton.default,Object.assign({},props,{onCompleteAction:function onCompleteAction(value){return onComplete(value.nativeEvent);}}));}
|
|
2
2
|
//# sourceMappingURL=AddToWalletButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_NativeAddToWalletButton","_jsxRuntime","_jsxFileName","_excluded","AddToWalletButton","_ref","onComplete","props","_objectWithoutProperties2","default","jsx","Object","assign","onCompleteAction","value","nativeEvent"],"sourceRoot":"../../../src","sources":["components/AddToWalletButton.tsx"],"mappings":"wSAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WAcA,IAAAC,wBAAA,CAAAF,sBAAA,CAAAC,OAAA,sCAAuE,IAAAE,WAAA,CAAAF,OAAA,0BAAAG,YAAA,
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_NativeAddToWalletButton","_jsxRuntime","_jsxFileName","_excluded","AddToWalletButton","_ref","onComplete","props","_objectWithoutProperties2","default","jsx","Object","assign","onCompleteAction","value","nativeEvent"],"sourceRoot":"../../../src","sources":["components/AddToWalletButton.tsx"],"mappings":"wSAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WAcA,IAAAC,wBAAA,CAAAF,sBAAA,CAAAC,OAAA,sCAAuE,IAAAE,WAAA,CAAAF,OAAA,0BAAAG,YAAA,mFAAAC,SAAA,gBAkEhE,QAAS,CAAAC,iBAAiBA,CAAAC,IAAA,CAAkC,IAA/B,CAAAC,UAAU,CAAAD,IAAA,CAAVC,UAAU,CAAKC,KAAK,IAAAC,yBAAA,CAAAC,OAAA,EAAAJ,IAAA,CAAAF,SAAA,EACtD,MACE,GAAAF,WAAA,CAAAS,GAAA,EAACV,wBAAA,CAAAS,OAAuB,CAAAE,MAAA,CAAAC,MAAA,IAClBL,KAAK,EACTM,gBAAgB,CAAE,QAAlB,CAAAA,gBAAgBA,CACdC,KAEE,QACC,CAAAR,UAAU,CAACQ,KAAK,CAACC,WAAW,CAAC,EAAC,EACpC,CAAC,CAEN","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.AddressSheet=AddressSheet;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _NativeAddressSheet=_interopRequireDefault(require("../specs/NativeAddressSheet"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.AddressSheet=AddressSheet;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _NativeAddressSheet=_interopRequireDefault(require("../specs/NativeAddressSheet"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/mats/stripe/stripe-react-native/src/components/AddressSheet.tsx";var _excluded=["onSubmit","onError"];function AddressSheet(_ref){var onSubmit=_ref.onSubmit,onError=_ref.onError,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);return(0,_jsxRuntime.jsx)(_NativeAddressSheet.default,Object.assign({},props,{onSubmitAction:function onSubmitAction(event){return onSubmit(event.nativeEvent.result);},onErrorAction:function onErrorAction(event){return onError(event.nativeEvent.error);}}));}
|
|
2
2
|
//# sourceMappingURL=AddressSheet.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_NativeAddressSheet","_jsxRuntime","_jsxFileName","_excluded","AddressSheet","_ref","onSubmit","onError","props","_objectWithoutProperties2","default","jsx","Object","assign","onSubmitAction","event","nativeEvent","result","onErrorAction","error"],"sourceRoot":"../../../src","sources":["components/AddressSheet.tsx"],"mappings":"8RAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WAQA,IAAAC,mBAAA,CAAAF,sBAAA,CAAAC,OAAA,iCAA6D,IAAAE,WAAA,CAAAF,OAAA,0BAAAG,YAAA,
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_NativeAddressSheet","_jsxRuntime","_jsxFileName","_excluded","AddressSheet","_ref","onSubmit","onError","props","_objectWithoutProperties2","default","jsx","Object","assign","onSubmitAction","event","nativeEvent","result","onErrorAction","error"],"sourceRoot":"../../../src","sources":["components/AddressSheet.tsx"],"mappings":"8RAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WAQA,IAAAC,mBAAA,CAAAF,sBAAA,CAAAC,OAAA,iCAA6D,IAAAE,WAAA,CAAAF,OAAA,0BAAAG,YAAA,8EAAAC,SAAA,wBA4DtD,QAAS,CAAAC,YAAYA,CAAAC,IAAA,CAAyC,IAAtC,CAAAC,QAAQ,CAAAD,IAAA,CAARC,QAAQ,CAAEC,OAAO,CAAAF,IAAA,CAAPE,OAAO,CAAKC,KAAK,IAAAC,yBAAA,CAAAC,OAAA,EAAAL,IAAA,CAAAF,SAAA,EACxD,MACE,GAAAF,WAAA,CAAAU,GAAA,EAACX,mBAAA,CAAAU,OAAkB,CAAAE,MAAA,CAAAC,MAAA,IACbL,KAAK,EACTM,cAAc,CAAE,QAAhB,CAAAA,cAAcA,CAAGC,KAAK,QAAK,CAAAT,QAAQ,CAACS,KAAK,CAACC,WAAW,CAACC,MAAM,CAAC,EAAC,CAC9DC,aAAa,CAAE,QAAf,CAAAA,aAAaA,CAAGH,KAAK,QAAK,CAAAR,OAAO,CAACQ,KAAK,CAACC,WAAW,CAACG,KAAK,CAAC,EAAC,EAC5D,CAAC,CAEN","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.AuBECSDebitForm=AuBECSDebitForm;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _NativeAuBECSDebitForm=_interopRequireDefault(require("../specs/NativeAuBECSDebitForm"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.AuBECSDebitForm=AuBECSDebitForm;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _NativeAuBECSDebitForm=_interopRequireDefault(require("../specs/NativeAuBECSDebitForm"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/mats/stripe/stripe-react-native/src/components/AuBECSDebitForm.tsx";var _excluded=["onComplete","companyName","formStyle"];function AuBECSDebitForm(_ref){var onComplete=_ref.onComplete,companyName=_ref.companyName,formStyle=_ref.formStyle,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);return(0,_jsxRuntime.jsx)(_NativeAuBECSDebitForm.default,Object.assign({onCompleteAction:function onCompleteAction(value){return onComplete(value.nativeEvent);},companyName:companyName,formStyle:Object.assign({},formStyle)},props));}
|
|
2
2
|
//# sourceMappingURL=AuBECSDebitForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_NativeAuBECSDebitForm","_jsxRuntime","_jsxFileName","_excluded","AuBECSDebitForm","_ref","onComplete","companyName","formStyle","props","_objectWithoutProperties2","default","jsx","Object","assign","onCompleteAction","value","nativeEvent"],"sourceRoot":"../../../src","sources":["components/AuBECSDebitForm.tsx"],"mappings":"oSAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WAEA,IAAAC,sBAAA,CAAAF,sBAAA,CAAAC,OAAA,oCAAmE,IAAAE,WAAA,CAAAF,OAAA,0BAAAG,YAAA,
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_NativeAuBECSDebitForm","_jsxRuntime","_jsxFileName","_excluded","AuBECSDebitForm","_ref","onComplete","companyName","formStyle","props","_objectWithoutProperties2","default","jsx","Object","assign","onCompleteAction","value","nativeEvent"],"sourceRoot":"../../../src","sources":["components/AuBECSDebitForm.tsx"],"mappings":"oSAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WAEA,IAAAC,sBAAA,CAAAF,sBAAA,CAAAC,OAAA,oCAAmE,IAAAE,WAAA,CAAAF,OAAA,0BAAAG,YAAA,iFAAAC,SAAA,0CA6B5D,QAAS,CAAAC,eAAeA,CAAAC,IAAA,CAKrB,IAJR,CAAAC,UAAU,CAAAD,IAAA,CAAVC,UAAU,CACVC,WAAW,CAAAF,IAAA,CAAXE,WAAW,CACXC,SAAS,CAAAH,IAAA,CAATG,SAAS,CACNC,KAAK,IAAAC,yBAAA,CAAAC,OAAA,EAAAN,IAAA,CAAAF,SAAA,EAER,MACE,GAAAF,WAAA,CAAAW,GAAA,EAACZ,sBAAA,CAAAW,OAAqB,CAAAE,MAAA,CAAAC,MAAA,EACpBC,gBAAgB,CAAE,QAAlB,CAAAA,gBAAgBA,CAAGC,KAAK,QAAK,CAAAV,UAAU,CAACU,KAAK,CAACC,WAAW,CAAC,EAAC,CAC3DV,WAAW,CAAEA,WAAY,CACzBC,SAAS,CAAAK,MAAA,CAAAC,MAAA,IAAON,SAAS,CAAG,EACxBC,KAAK,CACV,CAAC,CAEN","ignoreList":[]}
|