@stripe/stripe-react-native 0.49.0 → 0.50.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 (106) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +1 -1
  3. package/android/src/main/AndroidManifest.xml +10 -0
  4. package/android/src/main/java/com/reactnativestripesdk/CustomPaymentMethodActivity.kt +81 -0
  5. package/android/src/main/java/com/reactnativestripesdk/EmbeddedPaymentElementView.kt +96 -1
  6. package/android/src/main/java/com/reactnativestripesdk/EmbeddedPaymentElementViewManager.kt +16 -1
  7. package/android/src/main/java/com/reactnativestripesdk/PaymentMethodCreateParamsFactory.kt +0 -17
  8. package/android/src/main/java/com/reactnativestripesdk/PaymentSheetFragment.kt +115 -19
  9. package/android/src/main/java/com/reactnativestripesdk/StripeSdkModule.kt +22 -0
  10. package/android/src/main/java/com/reactnativestripesdk/utils/Mappers.kt +52 -6
  11. package/android/src/main/res/values/styles.xml +27 -0
  12. package/android/src/oldarch/java/com/reactnativestripesdk/NativeStripeSdkModuleSpec.java +8 -0
  13. package/ios/ApplePayButtonManager.m +4 -0
  14. package/ios/ApplePayButtonView.swift +11 -4
  15. package/ios/Mappers.swift +0 -5
  16. package/ios/NewArch/ApplePayButtonComponentView.mm +6 -0
  17. package/ios/OldArch/StripeSdkEventEmitterCompat.h +1 -1
  18. package/ios/OldArch/StripeSdkEventEmitterCompat.m +7 -1
  19. package/ios/PaymentMethodFactory.swift +0 -17
  20. package/ios/StripeSdk.mm +7 -0
  21. package/ios/StripeSdkEmitter.swift +1 -0
  22. package/ios/StripeSdkImpl+Embedded.swift +39 -17
  23. package/ios/StripeSdkImpl+PaymentSheet.swift +114 -1
  24. package/ios/StripeSdkImpl.swift +38 -9
  25. package/lib/commonjs/components/AddToWalletButton.js +1 -1
  26. package/lib/commonjs/components/AddToWalletButton.js.map +1 -1
  27. package/lib/commonjs/components/AddressSheet.js +1 -1
  28. package/lib/commonjs/components/AddressSheet.js.map +1 -1
  29. package/lib/commonjs/components/AuBECSDebitForm.js +1 -1
  30. package/lib/commonjs/components/AuBECSDebitForm.js.map +1 -1
  31. package/lib/commonjs/components/CardField.js +1 -1
  32. package/lib/commonjs/components/CardField.js.map +1 -1
  33. package/lib/commonjs/components/CardForm.js +1 -1
  34. package/lib/commonjs/components/CardForm.js.map +1 -1
  35. package/lib/commonjs/components/PlatformPayButton.js +1 -1
  36. package/lib/commonjs/components/PlatformPayButton.js.map +1 -1
  37. package/lib/commonjs/components/StripeContainer.js +1 -1
  38. package/lib/commonjs/components/StripeContainer.js.map +1 -1
  39. package/lib/commonjs/events.js.map +1 -1
  40. package/lib/commonjs/functions.js +1 -1
  41. package/lib/commonjs/functions.js.map +1 -1
  42. package/lib/commonjs/specs/NativeApplePayButton.js +1 -1
  43. package/lib/commonjs/specs/NativeApplePayButton.js.map +1 -1
  44. package/lib/commonjs/specs/NativeStripeSdkModule.js.map +1 -1
  45. package/lib/commonjs/types/EmbeddedPaymentElement.js +1 -1
  46. package/lib/commonjs/types/EmbeddedPaymentElement.js.map +1 -1
  47. package/lib/commonjs/types/PaymentIntent.js.map +1 -1
  48. package/lib/commonjs/types/PaymentSheet.js +1 -1
  49. package/lib/commonjs/types/PaymentSheet.js.map +1 -1
  50. package/lib/module/components/AddToWalletButton.js +1 -1
  51. package/lib/module/components/AddToWalletButton.js.map +1 -1
  52. package/lib/module/components/AddressSheet.js +1 -1
  53. package/lib/module/components/AddressSheet.js.map +1 -1
  54. package/lib/module/components/AuBECSDebitForm.js +1 -1
  55. package/lib/module/components/AuBECSDebitForm.js.map +1 -1
  56. package/lib/module/components/CardField.js +1 -1
  57. package/lib/module/components/CardField.js.map +1 -1
  58. package/lib/module/components/CardForm.js +1 -1
  59. package/lib/module/components/CardForm.js.map +1 -1
  60. package/lib/module/components/PlatformPayButton.js +1 -1
  61. package/lib/module/components/PlatformPayButton.js.map +1 -1
  62. package/lib/module/components/StripeContainer.js +1 -1
  63. package/lib/module/components/StripeContainer.js.map +1 -1
  64. package/lib/module/events.js.map +1 -1
  65. package/lib/module/functions.js +1 -1
  66. package/lib/module/functions.js.map +1 -1
  67. package/lib/module/specs/NativeApplePayButton.js +1 -1
  68. package/lib/module/specs/NativeApplePayButton.js.map +1 -1
  69. package/lib/module/specs/NativeStripeSdkModule.js.map +1 -1
  70. package/lib/module/types/EmbeddedPaymentElement.js +1 -1
  71. package/lib/module/types/EmbeddedPaymentElement.js.map +1 -1
  72. package/lib/module/types/PaymentIntent.js.map +1 -1
  73. package/lib/module/types/PaymentSheet.js +1 -1
  74. package/lib/module/types/PaymentSheet.js.map +1 -1
  75. package/lib/typescript/src/components/PlatformPayButton.d.ts.map +1 -1
  76. package/lib/typescript/src/events.d.ts +1 -1
  77. package/lib/typescript/src/events.d.ts.map +1 -1
  78. package/lib/typescript/src/functions.d.ts.map +1 -1
  79. package/lib/typescript/src/specs/NativeApplePayButton.d.ts +4 -0
  80. package/lib/typescript/src/specs/NativeApplePayButton.d.ts.map +1 -1
  81. package/lib/typescript/src/specs/NativeStripeSdkModule.d.ts +2 -0
  82. package/lib/typescript/src/specs/NativeStripeSdkModule.d.ts.map +1 -1
  83. package/lib/typescript/src/types/EmbeddedPaymentElement.d.ts +2 -0
  84. package/lib/typescript/src/types/EmbeddedPaymentElement.d.ts.map +1 -1
  85. package/lib/typescript/src/types/PaymentIntent.d.ts +1 -10
  86. package/lib/typescript/src/types/PaymentIntent.d.ts.map +1 -1
  87. package/lib/typescript/src/types/PaymentMethod.d.ts +2 -13
  88. package/lib/typescript/src/types/PaymentMethod.d.ts.map +1 -1
  89. package/lib/typescript/src/types/PaymentSheet.d.ts +55 -0
  90. package/lib/typescript/src/types/PaymentSheet.d.ts.map +1 -1
  91. package/package.json +1 -1
  92. package/patches/README.md +55 -0
  93. package/patches/old-arch-codegen-fix.patch +87 -0
  94. package/src/components/PlatformPayButton.tsx +12 -4
  95. package/src/events.ts +2 -1
  96. package/src/functions.ts +36 -1
  97. package/src/specs/NativeApplePayButton.ts +5 -0
  98. package/src/specs/NativeStripeSdkModule.ts +4 -0
  99. package/src/types/EmbeddedPaymentElement.tsx +33 -0
  100. package/src/types/PaymentIntent.ts +0 -10
  101. package/src/types/PaymentMethod.ts +0 -14
  102. package/src/types/PaymentSheet.ts +59 -0
  103. package/.env +0 -19
  104. package/ios/StripeSdk.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  105. package/ios/StripeSdk.xcodeproj/project.xcworkspace/xcuserdata/wooj.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  106. package/ios/StripeSdk.xcodeproj/xcuserdata/wooj.xcuserdatad/xcschemes/xcschememanagement.plist +0 -19
@@ -27,6 +27,8 @@ import com.stripe.android.model.StripeIntent
27
27
  import com.stripe.android.model.StripeIntent.NextActionData
28
28
  import com.stripe.android.model.StripeIntent.NextActionType
29
29
  import com.stripe.android.model.Token
30
+ import com.stripe.android.paymentelement.ExperimentalCustomPaymentMethodsApi
31
+ import com.stripe.android.paymentsheet.PaymentSheet
30
32
 
31
33
  internal fun createResult(
32
34
  key: String,
@@ -138,7 +140,6 @@ internal fun mapPaymentMethodType(type: PaymentMethod.Type?): String =
138
140
  PaymentMethod.Type.Oxxo -> "Oxxo"
139
141
  PaymentMethod.Type.P24 -> "P24"
140
142
  PaymentMethod.Type.SepaDebit -> "SepaDebit"
141
- PaymentMethod.Type.Sofort -> "Sofort"
142
143
  PaymentMethod.Type.Upi -> "Upi"
143
144
  PaymentMethod.Type.WeChatPay -> "WeChatPay"
144
145
  PaymentMethod.Type.Klarna -> "Klarna"
@@ -168,7 +169,6 @@ internal fun mapToPaymentMethodType(type: String?): PaymentMethod.Type? =
168
169
  "Oxxo" -> PaymentMethod.Type.Oxxo
169
170
  "P24" -> PaymentMethod.Type.P24
170
171
  "SepaDebit" -> PaymentMethod.Type.SepaDebit
171
- "Sofort" -> PaymentMethod.Type.Sofort
172
172
  "Upi" -> PaymentMethod.Type.Upi
173
173
  "WeChatPay" -> PaymentMethod.Type.WeChatPay
174
174
  "Klarna" -> PaymentMethod.Type.Klarna
@@ -415,10 +415,6 @@ internal fun mapFromPaymentMethod(paymentMethod: PaymentMethod): WritableMap {
415
415
  it.putString("last4", paymentMethod.bacsDebit?.last4)
416
416
  },
417
417
  )
418
- pm.putMap(
419
- "Sofort",
420
- WritableNativeMap().also { it.putString("country", paymentMethod.sofort?.country) },
421
- )
422
418
  pm.putMap(
423
419
  "Ideal",
424
420
  WritableNativeMap().also {
@@ -1065,3 +1061,53 @@ private fun Map<String, Any?>.toReadableMap(): ReadableMap {
1065
1061
 
1066
1062
  return writableMap
1067
1063
  }
1064
+
1065
+ @OptIn(ExperimentalCustomPaymentMethodsApi::class)
1066
+ @SuppressLint("RestrictedApi")
1067
+ internal fun parseCustomPaymentMethods(customPaymentMethodConfig: Bundle?): List<PaymentSheet.CustomPaymentMethod> {
1068
+ if (customPaymentMethodConfig == null) {
1069
+ return emptyList()
1070
+ }
1071
+
1072
+ val configHashMap = customPaymentMethodConfig.getSerializable("customPaymentMethodConfigurationReadableMap") as? HashMap<String, Any>
1073
+ if (configHashMap != null) {
1074
+ val customPaymentMethods = configHashMap["customPaymentMethods"] as? List<HashMap<String, Any>>
1075
+ if (customPaymentMethods != null) {
1076
+ val result = mutableListOf<PaymentSheet.CustomPaymentMethod>()
1077
+
1078
+ for (customPaymentMethodMap in customPaymentMethods) {
1079
+ val id = customPaymentMethodMap["id"] as? String
1080
+ if (id != null) {
1081
+ val subtitle = customPaymentMethodMap["subtitle"] as? String
1082
+ val disableBillingDetailCollection = customPaymentMethodMap["disableBillingDetailCollection"] as? Boolean ?: false
1083
+ result.add(
1084
+ PaymentSheet.CustomPaymentMethod(
1085
+ id = id,
1086
+ subtitle = subtitle,
1087
+ disableBillingDetailCollection = disableBillingDetailCollection,
1088
+ ),
1089
+ )
1090
+ }
1091
+ }
1092
+
1093
+ return result
1094
+ }
1095
+ }
1096
+
1097
+ return emptyList()
1098
+ }
1099
+
1100
+ @SuppressLint("RestrictedApi")
1101
+ internal fun mapFromCustomPaymentMethod(
1102
+ customPaymentMethod: PaymentSheet.CustomPaymentMethod,
1103
+ billingDetails: PaymentMethod.BillingDetails,
1104
+ ): WritableMap =
1105
+ WritableNativeMap().apply {
1106
+ putMap(
1107
+ "customPaymentMethod",
1108
+ WritableNativeMap().apply {
1109
+ putString("id", customPaymentMethod.id)
1110
+ },
1111
+ )
1112
+ putMap("billingDetails", mapFromBillingDetails(billingDetails))
1113
+ }
@@ -0,0 +1,27 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <resources>
3
+ <style name="Theme.StripeReactNative.Transparent" parent="Theme.AppCompat.Light.NoActionBar">
4
+ <!-- Core transparency settings -->
5
+ <item name="android:windowIsTranslucent">true</item>
6
+ <item name="android:windowBackground">@android:color/transparent</item>
7
+ <item name="android:windowContentOverlay">@null</item>
8
+ <item name="android:windowNoTitle">true</item>
9
+ <item name="android:windowIsFloating">false</item>
10
+ <item name="android:backgroundDimEnabled">false</item>
11
+ <item name="android:windowAnimationStyle">@null</item>
12
+
13
+ <!-- Enhanced transparency and touch handling -->
14
+ <item name="android:windowCloseOnTouchOutside">false</item>
15
+ <item name="android:windowEnableSplitTouch">false</item>
16
+ <item name="android:windowDrawsSystemBarBackgrounds">false</item>
17
+ <item name="android:statusBarColor">@android:color/transparent</item>
18
+ <item name="android:navigationBarColor">@android:color/transparent</item>
19
+
20
+ <!-- Performance optimizations -->
21
+ <item name="android:windowDisablePreview">true</item>
22
+
23
+ <!-- Prevent visual artifacts -->
24
+ <item name="android:windowShowWallpaper">false</item>
25
+ <item name="android:windowFullscreen">false</item>
26
+ </style>
27
+ </resources>
@@ -114,6 +114,10 @@ public abstract class NativeStripeSdkModuleSpec extends ReactContextBaseJavaModu
114
114
  invoke("embeddedPaymentElementLoadingFailed", value);
115
115
  }
116
116
 
117
+ protected final void emitOnCustomPaymentMethodConfirmHandlerCallback(ReadableMap value) {
118
+ invoke("onCustomPaymentMethodConfirmHandlerCallback", value);
119
+ }
120
+
117
121
  @ReactMethod
118
122
  @DoNotStrip
119
123
  public abstract void initialise(ReadableMap params, Promise promise);
@@ -154,6 +158,10 @@ public abstract class NativeStripeSdkModuleSpec extends ReactContextBaseJavaModu
154
158
  @DoNotStrip
155
159
  public abstract void intentCreationCallback(ReadableMap result, Promise promise);
156
160
 
161
+ @ReactMethod
162
+ @DoNotStrip
163
+ public abstract void customPaymentMethodResultCallback(ReadableMap result, Promise promise);
164
+
157
165
  @ReactMethod
158
166
  @DoNotStrip
159
167
  public abstract void presentPaymentSheet(ReadableMap options, Promise promise);
@@ -11,5 +11,9 @@ RCT_EXPORT_VIEW_PROPERTY(onShippingMethodSelectedAction, RCTDirectEventBlock)
11
11
  RCT_EXPORT_VIEW_PROPERTY(onShippingContactSelectedAction, RCTDirectEventBlock)
12
12
  RCT_EXPORT_VIEW_PROPERTY(onCouponCodeEnteredAction, RCTDirectEventBlock)
13
13
  RCT_EXPORT_VIEW_PROPERTY(onOrderTrackingAction, RCTDirectEventBlock)
14
+ RCT_EXPORT_VIEW_PROPERTY(hasShippingMethodCallback, BOOL)
15
+ RCT_EXPORT_VIEW_PROPERTY(hasShippingContactCallback, BOOL)
16
+ RCT_EXPORT_VIEW_PROPERTY(hasCouponCodeCallback, BOOL)
17
+ RCT_EXPORT_VIEW_PROPERTY(hasOrderTrackingCallback, BOOL)
14
18
 
15
19
  @end
@@ -10,16 +10,23 @@ public class ApplePayButtonView: UIView {
10
10
  @objc public var onCouponCodeEnteredAction: RCTDirectEventBlock?
11
11
  @objc public var onOrderTrackingAction: RCTDirectEventBlock?
12
12
 
13
+ // Boolean flags to track which callbacks were provided as props
14
+ @objc public var hasShippingMethodCallback = false
15
+ @objc public var hasShippingContactCallback = false
16
+ @objc public var hasCouponCodeCallback = false
17
+ @objc public var hasOrderTrackingCallback = false
18
+
13
19
  @objc public var type: NSNumber?
14
20
  @objc public var buttonStyle: NSNumber?
15
21
  @objc public var borderRadius: NSNumber?
16
22
  @objc public var disabled = false
17
23
 
18
24
  @objc func handleApplePayButtonTapped() {
19
- StripeSdkImpl.shared.shippingMethodUpdateJSCallback = onShippingMethodSelectedAction
20
- StripeSdkImpl.shared.shippingContactUpdateJSCallback = onShippingContactSelectedAction
21
- StripeSdkImpl.shared.couponCodeEnteredJSCallback = onCouponCodeEnteredAction
22
- StripeSdkImpl.shared.platformPayOrderTrackingJSCallback = onOrderTrackingAction
25
+ // Only set callbacks that were actually provided as props
26
+ StripeSdkImpl.shared.shippingMethodUpdateJSCallback = hasShippingMethodCallback ? onShippingMethodSelectedAction : nil
27
+ StripeSdkImpl.shared.shippingContactUpdateJSCallback = hasShippingContactCallback ? onShippingContactSelectedAction : nil
28
+ StripeSdkImpl.shared.couponCodeEnteredJSCallback = hasCouponCodeCallback ? onCouponCodeEnteredAction : nil
29
+ StripeSdkImpl.shared.platformPayOrderTrackingJSCallback = hasOrderTrackingCallback ? onOrderTrackingAction : nil
23
30
  }
24
31
 
25
32
  @objc public func didSetProps() {
package/ios/Mappers.swift CHANGED
@@ -285,7 +285,6 @@ class Mappers {
285
285
  case STPPaymentMethodType.EPS: return "Eps"
286
286
  case STPPaymentMethodType.bancontact: return "Bancontact"
287
287
  case STPPaymentMethodType.OXXO: return "Oxxo"
288
- case STPPaymentMethodType.sofort: return "Sofort"
289
288
  case STPPaymentMethodType.UPI: return "Upi"
290
289
  case STPPaymentMethodType.afterpayClearpay: return "AfterpayClearpay"
291
290
  case STPPaymentMethodType.klarna: return "Klarna"
@@ -316,7 +315,6 @@ class Mappers {
316
315
  case "Eps": return STPPaymentMethodType.EPS
317
316
  case "Bancontact": return STPPaymentMethodType.bancontact
318
317
  case "Oxxo": return STPPaymentMethodType.OXXO
319
- case "Sofort": return STPPaymentMethodType.sofort
320
318
  case "Upi": return STPPaymentMethodType.UPI
321
319
  case "AfterpayClearpay": return STPPaymentMethodType.afterpayClearpay
322
320
  case "Klarna": return STPPaymentMethodType.klarna
@@ -666,9 +664,6 @@ class Mappers {
666
664
  "SepaDebit": sepaDebit,
667
665
  "BacsDebit": bacsDebit,
668
666
  "AuBecsDebit": auBECSDebit,
669
- "Sofort": [
670
- "country": paymentMethod.sofort?.country
671
- ],
672
667
  "Upi": [
673
668
  "vpa": paymentMethod.upi?.vpa
674
669
  ],
@@ -98,6 +98,12 @@ using namespace facebook::react;
98
98
  _view.disabled = newViewProps.disabled;
99
99
  _view.borderRadius = @(newViewProps.borderRadius);
100
100
 
101
+ // Set the boolean flags from props
102
+ _view.hasShippingMethodCallback = newViewProps.hasShippingMethodCallback;
103
+ _view.hasShippingContactCallback = newViewProps.hasShippingContactCallback;
104
+ _view.hasCouponCodeCallback = newViewProps.hasCouponCodeCallback;
105
+ _view.hasOrderTrackingCallback = newViewProps.hasOrderTrackingCallback;
106
+
101
107
  [super updateProps:props oldProps:oldProps];
102
108
 
103
109
  [_view didSetProps];
@@ -21,7 +21,7 @@
21
21
  - (void)emitEmbeddedPaymentElementFormSheetConfirmComplete:(NSDictionary *)value;
22
22
  - (void)emitEmbeddedPaymentElementRowSelectionImmediateAction;
23
23
  - (void)emitEmbeddedPaymentElementLoadingFailed:(NSDictionary *)value;
24
-
24
+ - (void)emitOnCustomPaymentMethodConfirmHandlerCallback:(NSDictionary *)value;
25
25
  @end
26
26
 
27
27
  #endif
@@ -21,7 +21,8 @@
21
21
  @"embeddedPaymentElementDidUpdatePaymentOption",
22
22
  @"embeddedPaymentElementFormSheetConfirmComplete",
23
23
  @"embeddedPaymentElementRowSelectionImmediateAction",
24
- @"embeddedPaymentElementLoadingFailed"
24
+ @"embeddedPaymentElementLoadingFailed",
25
+ @"onCustomPaymentMethodConfirmHandlerCallback"
25
26
  ];
26
27
  }
27
28
 
@@ -100,6 +101,11 @@
100
101
  [self sendEventWithName:@"embeddedPaymentElementLoadingFailed" body:value];
101
102
  }
102
103
 
104
+ - (void)emitOnCustomPaymentMethodConfirmHandlerCallback:(NSDictionary *)value
105
+ {
106
+ [self sendEventWithName:@"onCustomPaymentMethodConfirmHandlerCallback" body:value];
107
+ }
108
+
103
109
  @end
104
110
 
105
111
  #endif
@@ -31,8 +31,6 @@ class PaymentMethodFactory {
31
31
  return try createFPXPaymentMethodParams()
32
32
  case STPPaymentMethodType.alipay:
33
33
  return try createAlipayPaymentMethodParams()
34
- case STPPaymentMethodType.sofort:
35
- return try createSofortPaymentMethodParams()
36
34
  case STPPaymentMethodType.bancontact:
37
35
  return try createBancontactPaymentMethodParams()
38
36
  case STPPaymentMethodType.SEPADebit:
@@ -82,8 +80,6 @@ class PaymentMethodFactory {
82
80
  return createCardPaymentMethodOptions()
83
81
  case STPPaymentMethodType.FPX:
84
82
  return nil
85
- case STPPaymentMethodType.sofort:
86
- return nil
87
83
  case STPPaymentMethodType.alipay:
88
84
  return try createAlipayPaymentMethodOptions()
89
85
  case STPPaymentMethodType.bancontact:
@@ -250,16 +246,6 @@ class PaymentMethodFactory {
250
246
  return options
251
247
  }
252
248
 
253
- private func createSofortPaymentMethodParams() throws -> STPPaymentMethodParams {
254
- guard let country = self.paymentMethodData?["country"] as? String else {
255
- throw PaymentMethodError.sofortPaymentMissingParams
256
- }
257
- let params = STPPaymentMethodSofortParams()
258
- params.country = country
259
-
260
- return STPPaymentMethodParams(sofort: params, billingDetails: billingDetailsParams, metadata: metadata)
261
- }
262
-
263
249
  private func createBancontactPaymentMethodParams() throws -> STPPaymentMethodParams {
264
250
  let params = STPPaymentMethodBancontactParams()
265
251
 
@@ -411,7 +397,6 @@ enum PaymentMethodError: Error {
411
397
  case epsPaymentMissingParams
412
398
  case idealPaymentMissingParams
413
399
  case paymentNotSupported
414
- case sofortPaymentMissingParams
415
400
  case cardPaymentOptionsMissingParams
416
401
  case bancontactPaymentMissingParams
417
402
  case sepaPaymentMissingParams
@@ -434,8 +419,6 @@ extension PaymentMethodError: LocalizedError {
434
419
  return NSLocalizedString("You must provide billing details", comment: "Create payment error")
435
420
  case .idealPaymentMissingParams:
436
421
  return NSLocalizedString("You must provide bank name", comment: "Create payment error")
437
- case .sofortPaymentMissingParams:
438
- return NSLocalizedString("You must provide bank account country", comment: "Create payment error")
439
422
  case .p24PaymentMissingParams:
440
423
  return NSLocalizedString("You must provide billing details", comment: "Create payment error")
441
424
  case .bancontactPaymentMissingParams:
package/ios/StripeSdk.mm CHANGED
@@ -400,6 +400,13 @@ RCT_EXPORT_METHOD(clearEmbeddedPaymentOption:(NSInteger)viewTag
400
400
  resolve(nil);
401
401
  }
402
402
 
403
+ RCT_EXPORT_METHOD(customPaymentMethodResultCallback:(nonnull NSDictionary *)result
404
+ resolve:(RCTPromiseResolveBlock)resolve
405
+ reject:(RCTPromiseRejectBlock)reject)
406
+ {
407
+ [StripeSdkImpl.shared customPaymentMethodResultCallback:result resolver:resolve rejecter:reject];
408
+ }
409
+
403
410
  /* clang-format on */
404
411
 
405
412
  #ifdef RCT_NEW_ARCH_ENABLED
@@ -16,4 +16,5 @@ import Foundation
16
16
  func emitEmbeddedPaymentElementFormSheetConfirmComplete(_ value: [String: Any])
17
17
  func emitEmbeddedPaymentElementRowSelectionImmediateAction()
18
18
  func emitEmbeddedPaymentElementLoadingFailed(_ value: [String: Any])
19
+ func emitOnCustomPaymentMethodConfirmHandlerCallback(_ value: [String: Any])
19
20
  }
@@ -6,7 +6,7 @@
6
6
  //
7
7
 
8
8
  import Foundation
9
- @_spi(EmbeddedPaymentElementPrivateBeta) @_spi(ExperimentalAllowsRemovalOfLastSavedPaymentMethodAPI) @_spi(CustomerSessionBetaAccess) @_spi(STP) import StripePaymentSheet
9
+ @_spi(EmbeddedPaymentElementPrivateBeta) @_spi(ExperimentalAllowsRemovalOfLastSavedPaymentMethodAPI) @_spi(CustomerSessionBetaAccess) @_spi(STP) @_spi(CustomPaymentMethodsBeta) import StripePaymentSheet
10
10
 
11
11
  @objc(StripeSdkImpl)
12
12
  extension StripeSdkImpl {
@@ -69,23 +69,25 @@ extension StripeSdkImpl {
69
69
  @objc(confirmEmbeddedPaymentElement:reject:)
70
70
  public func confirmEmbeddedPaymentElement(resolve: @escaping RCTPromiseResolveBlock,
71
71
  reject: @escaping RCTPromiseRejectBlock) {
72
- embeddedInstance?.presentingViewController = RCTPresentedViewController()
73
- embeddedInstance?.confirm { result in
74
- switch result {
75
- case .completed:
76
- // Return an object with { status: 'completed' }
77
- resolve(["status": "completed"])
78
- case .canceled:
79
- // Return an object with { status: 'canceled' }
80
- resolve(["status": "canceled"])
81
- case .failed(let error):
82
- // Return an object with { status: 'failed', error }
83
- resolve([
84
- "status": "failed",
85
- "error": error.localizedDescription
86
- ])
72
+ DispatchQueue.main.async { [weak self] in
73
+ self?.embeddedInstance?.presentingViewController = RCTPresentedViewController()
74
+ self?.embeddedInstance?.confirm { result in
75
+ switch result {
76
+ case .completed:
77
+ // Return an object with { status: 'completed' }
78
+ resolve(["status": "completed"])
79
+ case .canceled:
80
+ // Return an object with { status: 'canceled' }
81
+ resolve(["status": "canceled"])
82
+ case .failed(let error):
83
+ // Return an object with { status: 'failed', error }
84
+ resolve([
85
+ "status": "failed",
86
+ "error": error.localizedDescription
87
+ ])
88
+ }
89
+ }
87
90
  }
88
- }
89
91
  }
90
92
 
91
93
  @objc(updateEmbeddedPaymentElement:resolve:reject:)
@@ -320,6 +322,26 @@ extension StripeSdkImpl {
320
322
  }
321
323
  }
322
324
  }
325
+ // Parse custom payment method configuration
326
+ if let customPaymentMethodConfig = params["customPaymentMethodConfiguration"] as? NSDictionary {
327
+ let parsedMethods = StripeSdkImpl.parseCustomPaymentMethods(from: customPaymentMethodConfig)
328
+
329
+ if !parsedMethods.isEmpty {
330
+ let customMethods = parsedMethods.map { parsed in
331
+ var customPaymentMethod = EmbeddedPaymentElement.CustomPaymentMethodConfiguration.CustomPaymentMethod(
332
+ id: parsed.id,
333
+ subtitle: parsed.subtitle
334
+ )
335
+ customPaymentMethod.disableBillingDetailCollection = parsed.disableBillingDetailCollection
336
+ return customPaymentMethod
337
+ }
338
+
339
+ configuration.customPaymentMethodConfiguration = .init(
340
+ customPaymentMethods: customMethods,
341
+ customPaymentMethodConfirmHandler: StripeSdkImpl.createCustomPaymentMethodConfirmHandler(sdkImpl: self)
342
+ )
343
+ }
344
+ }
323
345
 
324
346
  return (nil, configuration)
325
347
  }
@@ -6,7 +6,8 @@
6
6
  //
7
7
 
8
8
  import Foundation
9
- @_spi(ExperimentalAllowsRemovalOfLastSavedPaymentMethodAPI) @_spi(CustomerSessionBetaAccess) @_spi(EmbeddedPaymentElementPrivateBeta) @_spi(STP) @_spi(PaymentMethodOptionsSetupFutureUsagePreview) import StripePaymentSheet
9
+ @_spi(ExperimentalAllowsRemovalOfLastSavedPaymentMethodAPI) @_spi(CustomerSessionBetaAccess) @_spi(EmbeddedPaymentElementPrivateBeta) @_spi(STP) @_spi(PaymentMethodOptionsSetupFutureUsagePreview) @_spi(CustomPaymentMethodsBeta) import StripePaymentSheet
10
+
10
11
 
11
12
  extension StripeSdkImpl {
12
13
  internal func buildPaymentSheetConfiguration(
@@ -137,6 +138,14 @@ extension StripeSdkImpl {
137
138
 
138
139
  configuration.cardBrandAcceptance = computeCardBrandAcceptance(params: params)
139
140
 
141
+ // Parse custom payment method configuration
142
+ if let customPaymentMethodConfig = params["customPaymentMethodConfiguration"] as? [String: Any] {
143
+ configuration.customPaymentMethodConfiguration = StripeSdkImpl.buildCustomPaymentMethodConfiguration(
144
+ from: customPaymentMethodConfig,
145
+ sdkImpl: self
146
+ )
147
+ }
148
+
140
149
  return (nil, configuration)
141
150
  }
142
151
 
@@ -410,5 +419,109 @@ extension StripeSdkImpl {
410
419
  return .automatic
411
420
  }
412
421
  }
422
+
423
+ // MARK: - Common Custom Payment Method Helper
424
+
425
+ // Simple data structure for parsed custom payment method data
426
+ struct ParsedCustomPaymentMethod {
427
+ let id: String
428
+ let subtitle: String?
429
+ let disableBillingDetailCollection: Bool
430
+ }
431
+
432
+ // Simple parser that extracts data without type complexity
433
+ static func parseCustomPaymentMethods(from config: [String: Any]) -> [ParsedCustomPaymentMethod] {
434
+ guard let customMethods = config["customPaymentMethods"] as? [[String: Any]],
435
+ !customMethods.isEmpty else { return [] }
436
+
437
+ return customMethods.compactMap { methodDict in
438
+ guard let id = methodDict["id"] as? String else { return nil }
439
+ let subtitle = methodDict["subtitle"] as? String
440
+ let disableBillingDetailCollection = methodDict["disableBillingDetailCollection"] as? Bool ?? true
441
+
442
+ return ParsedCustomPaymentMethod(
443
+ id: id,
444
+ subtitle: subtitle,
445
+ disableBillingDetailCollection: disableBillingDetailCollection
446
+ )
447
+ }
448
+ }
449
+
450
+ // Overload for NSDictionary
451
+ static func parseCustomPaymentMethods(from config: NSDictionary) -> [ParsedCustomPaymentMethod] {
452
+ guard let customPaymentMethods = config["customPaymentMethods"] as? NSArray,
453
+ customPaymentMethods.count > 0 else { return [] }
454
+
455
+ var parsedMethods: [ParsedCustomPaymentMethod] = []
456
+
457
+ for customPaymentMethodData in customPaymentMethods {
458
+ if let customPaymentMethodDict = customPaymentMethodData as? NSDictionary,
459
+ let id = customPaymentMethodDict["id"] as? String {
460
+ let subtitle = customPaymentMethodDict["subtitle"] as? String
461
+ let disableBillingDetailCollection = customPaymentMethodDict["disableBillingDetailCollection"] as? Bool ?? true
462
+
463
+ parsedMethods.append(ParsedCustomPaymentMethod(
464
+ id: id,
465
+ subtitle: subtitle,
466
+ disableBillingDetailCollection: disableBillingDetailCollection
467
+ ))
468
+ }
469
+ }
470
+
471
+ return parsedMethods
472
+ }
473
+
474
+ private static func buildCustomPaymentMethodConfiguration(
475
+ from config: [String: Any],
476
+ sdkImpl: StripeSdkImpl
477
+ ) -> PaymentSheet.CustomPaymentMethodConfiguration? {
478
+ let parsedMethods = parseCustomPaymentMethods(from: config)
479
+ guard !parsedMethods.isEmpty else { return nil }
480
+
481
+ let customMethods = parsedMethods.map { parsed in
482
+ var cpm = PaymentSheet.CustomPaymentMethodConfiguration.CustomPaymentMethod(
483
+ id: parsed.id,
484
+ subtitle: parsed.subtitle
485
+ )
486
+ cpm.disableBillingDetailCollection = parsed.disableBillingDetailCollection
487
+ return cpm
488
+ }
489
+
490
+ return .init(
491
+ customPaymentMethods: customMethods,
492
+ customPaymentMethodConfirmHandler: createCustomPaymentMethodConfirmHandler(sdkImpl: sdkImpl)
493
+ )
494
+ }
495
+
496
+ // MARK: - Common Custom Payment Method Handler
497
+
498
+ static func createCustomPaymentMethodConfirmHandler(
499
+ sdkImpl: StripeSdkImpl?
500
+ ) -> PaymentSheet.CustomPaymentMethodConfiguration.CustomPaymentMethodConfirmHandler {
501
+ return { customPaymentMethod, billingDetails in
502
+ // Send event to JS with the custom payment method data
503
+ let customPaymentMethodDict: [String: Any] = [
504
+ "id": customPaymentMethod.id
505
+ ]
506
+
507
+ let billingDetailsDict = Mappers.mapFromBillingDetails(billingDetails: billingDetails)
508
+ let payload: [String: Any] = [
509
+ "customPaymentMethod": customPaymentMethodDict,
510
+ "billingDetails": billingDetailsDict
511
+ ]
512
+
513
+ // Use async/await with continuation instead of blocking semaphore
514
+ return await withCheckedContinuation { continuation in
515
+ // Set up callback to receive result from JavaScript
516
+ sdkImpl?.customPaymentMethodResultCallback = { result in
517
+ sdkImpl?.customPaymentMethodResultCallback = nil
518
+ continuation.resume(returning: result)
519
+ }
520
+
521
+ // Emit event to JavaScript
522
+ sdkImpl?.emitter?.emitOnCustomPaymentMethodConfirmHandlerCallback(payload)
523
+ }
524
+ }
525
+ }
413
526
  }
414
527
 
@@ -62,6 +62,7 @@ public class StripeSdkImpl: NSObject, UIAdaptivePresentationControllerDelegate {
62
62
  var setSelectedPaymentOptionCallback: (() -> Void)? = nil
63
63
  var fetchSelectedPaymentOptionCallback: ((CustomerPaymentOption?) -> Void)? = nil
64
64
  var setupIntentClientSecretForCustomerAttachCallback: ((String) -> Void)? = nil
65
+ var customPaymentMethodResultCallback: ((PaymentSheetResult) -> Void)?
65
66
 
66
67
  var embeddedInstance: EmbeddedPaymentElement? = nil
67
68
  lazy var embeddedInstanceDelegate = StripeSdkEmbeddedPaymentElementDelegate(sdkImpl: self)
@@ -130,20 +131,38 @@ public class StripeSdkImpl: NSObject, UIAdaptivePresentationControllerDelegate {
130
131
  if let clientSecret = result["clientSecret"] as? String {
131
132
  paymentSheetIntentCreationCallback(.success(clientSecret))
132
133
  } else {
133
- struct ConfirmationError: Error, LocalizedError {
134
- private var errorMessage: String
135
- init(errorMessage: String) {
136
- self.errorMessage = errorMessage
137
- }
138
- public var errorDescription: String? {
139
- return errorMessage
140
- }
141
- }
142
134
  let errorParams = result["error"] as? NSDictionary
143
135
  let error = ConfirmationError.init(errorMessage: errorParams?["localizedMessage"] as? String ?? "An unknown error occurred.")
144
136
  paymentSheetIntentCreationCallback(.failure(error))
145
137
  }
146
138
  }
139
+
140
+ @objc(customPaymentMethodResultCallback:resolver:rejecter:)
141
+ @MainActor public func customPaymentMethodResultCallback(result: NSDictionary, resolver resolve: @escaping RCTPromiseResolveBlock,
142
+ rejecter reject: @escaping RCTPromiseRejectBlock) -> Void {
143
+ guard let customPaymentMethodResultCallback = self.customPaymentMethodResultCallback else {
144
+ resolve(Errors.createError(ErrorType.Failed, "Internal error: no custom payment method callback"))
145
+ return
146
+ }
147
+
148
+ let status = result["status"] as? String ?? ""
149
+ let errorMessage = result["error"] as? String
150
+
151
+ switch status {
152
+ case "completed":
153
+ customPaymentMethodResultCallback(.completed)
154
+ case "canceled":
155
+ customPaymentMethodResultCallback(.canceled)
156
+ case "failed":
157
+ let error = ConfirmationError.init(errorMessage: errorMessage ?? "An unknown error occurred.")
158
+ customPaymentMethodResultCallback(.failed(error: error))
159
+ default:
160
+ let error = ConfirmationError.init(errorMessage: "Unknown custom payment method result status")
161
+ customPaymentMethodResultCallback(.failed(error: error))
162
+ }
163
+
164
+ resolve(NSNull())
165
+ }
147
166
 
148
167
  @objc(confirmPaymentSheetPayment:rejecter:)
149
168
  public func confirmPaymentSheetPayment(resolver resolve: @escaping RCTPromiseResolveBlock,
@@ -1156,6 +1175,16 @@ public class StripeSdkImpl: NSObject, UIAdaptivePresentationControllerDelegate {
1156
1175
  break
1157
1176
  }
1158
1177
  }
1178
+
1179
+ struct ConfirmationError: Error, LocalizedError {
1180
+ private var errorMessage: String
1181
+ init(errorMessage: String) {
1182
+ self.errorMessage = errorMessage
1183
+ }
1184
+ public var errorDescription: String? {
1185
+ return errorMessage
1186
+ }
1187
+ }
1159
1188
  }
1160
1189
 
1161
1190
  func findViewControllerPresenter(from uiViewController: UIViewController) -> UIViewController {
@@ -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/wooj/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);}}));}
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/jaynewstrom/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,mFAAAC,SAAA,gBAgEhE,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
+ {"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,0FAAAC,SAAA,gBAgEhE,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/wooj/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);}}));}
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/jaynewstrom/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,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
+ {"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,qFAAAC,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/wooj/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));}
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/jaynewstrom/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