@stripe/stripe-react-native 0.65.1 → 0.67.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 (107) hide show
  1. package/android/detekt/detekt-baseline.xml +0 -10
  2. package/android/gradle.properties +1 -1
  3. package/android/src/main/java/com/reactnativestripesdk/CardFieldView.kt +51 -57
  4. package/android/src/main/java/com/reactnativestripesdk/CurrencySelectorElementEvent.kt +26 -0
  5. package/android/src/main/java/com/reactnativestripesdk/CurrencySelectorElementView.kt +129 -16
  6. package/android/src/main/java/com/reactnativestripesdk/CurrencySelectorElementViewManager.kt +17 -0
  7. package/android/src/main/java/com/reactnativestripesdk/EventEmitterCompat.kt +4 -0
  8. package/android/src/main/java/com/reactnativestripesdk/PaymentSheetManager.kt +8 -19
  9. package/android/src/main/java/com/reactnativestripesdk/StripeAbstractComposeView.kt +1 -0
  10. package/android/src/main/java/com/reactnativestripesdk/StripeSdkModule.kt +89 -31
  11. package/android/src/main/java/com/reactnativestripesdk/StripeSdkPackage.kt +1 -0
  12. package/android/src/main/java/com/reactnativestripesdk/customersheet/CustomerSheetManager.kt +2 -16
  13. package/android/src/main/java/com/reactnativestripesdk/utils/CheckoutMappers.kt +59 -33
  14. package/android/src/main/java/com/reactnativestripesdk/utils/DefaultActivityLifecycleCallbacks.kt +41 -0
  15. package/android/src/main/java/com/reactnativestripesdk/utils/Errors.kt +11 -6
  16. package/android/src/oldarch/java/com/reactnativestripesdk/NativeOnrampSdkModuleSpec.java +17 -3
  17. package/android/src/oldarch/java/com/reactnativestripesdk/NativeStripeSdkModuleSpec.java +2 -2
  18. package/android/src/onramp/java/com/reactnativestripesdk/OnrampErrors.kt +145 -0
  19. package/android/src/onramp/java/com/reactnativestripesdk/OnrampMappers.kt +125 -0
  20. package/android/src/onramp/java/com/reactnativestripesdk/OnrampSdkModule.kt +144 -22
  21. package/android/src/test/java/com/reactnativestripesdk/DrawableLoadingTest.kt +6 -2
  22. package/android/src/test/java/com/reactnativestripesdk/OnrampErrorsTest.kt +168 -0
  23. package/android/src/test/java/com/reactnativestripesdk/mappers/OnrampMappersTest.kt +107 -0
  24. package/android/src/test/java/com/reactnativestripesdk/utils/CheckoutMappersTest.kt +39 -30
  25. package/android/src/test/java/com/reactnativestripesdk/utils/CheckoutTestFixtures.java +8 -0
  26. package/ios/CurrencySelectorElementManager.m +7 -0
  27. package/ios/CurrencySelectorElementView.swift +142 -7
  28. package/ios/EmbeddedPaymentElementView.swift +1 -1
  29. package/ios/Mappers+Checkout.swift +251 -107
  30. package/ios/Mappers.swift +97 -7
  31. package/ios/NewArch/StripeCurrencySelectorElementComponentView.mm +14 -0
  32. package/ios/OldArch/StripeSdkEventEmitterCompat.h +1 -0
  33. package/ios/OldArch/StripeSdkEventEmitterCompat.m +6 -0
  34. package/ios/OnrampErrors.swift +132 -0
  35. package/ios/PaymentOptionDisplayData+ReactNative.swift +1 -1
  36. package/ios/PaymentSheetAppearance.swift +1 -1
  37. package/ios/StripeOnrampSdk.mm +19 -0
  38. package/ios/StripeSdk.mm +14 -14
  39. package/ios/StripeSdkEmitter.swift +1 -0
  40. package/ios/StripeSdkImpl+Checkout.swift +66 -31
  41. package/ios/StripeSdkImpl+CustomerSheet.swift +1 -1
  42. package/ios/StripeSdkImpl+Embedded.swift +1 -1
  43. package/ios/StripeSdkImpl+PaymentSheet.swift +1 -1
  44. package/ios/StripeSdkImpl.swift +116 -24
  45. package/lib/commonjs/components/PaymentMethodMessagingElement.js +1 -1
  46. package/lib/commonjs/components/PaymentMethodMessagingElement.js.map +1 -1
  47. package/lib/commonjs/components/StripeProvider.js +1 -1
  48. package/lib/commonjs/components/StripeProvider.js.map +1 -1
  49. package/lib/commonjs/hooks/useCheckout.js +1 -1
  50. package/lib/commonjs/hooks/useCheckout.js.map +1 -1
  51. package/lib/commonjs/hooks/useOnramp.js +1 -1
  52. package/lib/commonjs/hooks/useOnramp.js.map +1 -1
  53. package/lib/commonjs/internal/stripeConfig.js +2 -0
  54. package/lib/commonjs/internal/stripeConfig.js.map +1 -0
  55. package/lib/commonjs/specs/NativeOnrampSdkModule.js.map +1 -1
  56. package/lib/commonjs/specs/NativeStripeSdkModule.js.map +1 -1
  57. package/lib/commonjs/types/Errors.js +1 -1
  58. package/lib/commonjs/types/Errors.js.map +1 -1
  59. package/lib/commonjs/types/Onramp.js +1 -1
  60. package/lib/commonjs/types/Onramp.js.map +1 -1
  61. package/lib/module/components/PaymentMethodMessagingElement.js +1 -1
  62. package/lib/module/components/PaymentMethodMessagingElement.js.map +1 -1
  63. package/lib/module/components/StripeProvider.js +1 -1
  64. package/lib/module/components/StripeProvider.js.map +1 -1
  65. package/lib/module/hooks/useCheckout.js +1 -1
  66. package/lib/module/hooks/useCheckout.js.map +1 -1
  67. package/lib/module/hooks/useOnramp.js +1 -1
  68. package/lib/module/hooks/useOnramp.js.map +1 -1
  69. package/lib/module/internal/stripeConfig.js +2 -0
  70. package/lib/module/internal/stripeConfig.js.map +1 -0
  71. package/lib/module/specs/NativeOnrampSdkModule.js.map +1 -1
  72. package/lib/module/specs/NativeStripeSdkModule.js.map +1 -1
  73. package/lib/module/types/Errors.js +1 -1
  74. package/lib/module/types/Errors.js.map +1 -1
  75. package/lib/module/types/Onramp.js +1 -1
  76. package/lib/module/types/Onramp.js.map +1 -1
  77. package/lib/typescript/src/components/PaymentMethodMessagingElement.d.ts +1 -1
  78. package/lib/typescript/src/components/PaymentMethodMessagingElement.d.ts.map +1 -1
  79. package/lib/typescript/src/components/StripeProvider.d.ts.map +1 -1
  80. package/lib/typescript/src/hooks/useCheckout.d.ts.map +1 -1
  81. package/lib/typescript/src/hooks/useOnramp.d.ts +32 -10
  82. package/lib/typescript/src/hooks/useOnramp.d.ts.map +1 -1
  83. package/lib/typescript/src/internal/stripeConfig.d.ts +3 -0
  84. package/lib/typescript/src/internal/stripeConfig.d.ts.map +1 -0
  85. package/lib/typescript/src/specs/NativeOnrampSdkModule.d.ts +3 -0
  86. package/lib/typescript/src/specs/NativeOnrampSdkModule.d.ts.map +1 -1
  87. package/lib/typescript/src/specs/NativeStripeSdkModule.d.ts +2 -2
  88. package/lib/typescript/src/specs/NativeStripeSdkModule.d.ts.map +1 -1
  89. package/lib/typescript/src/types/Checkout.d.ts +266 -92
  90. package/lib/typescript/src/types/Checkout.d.ts.map +1 -1
  91. package/lib/typescript/src/types/Errors.d.ts +0 -5
  92. package/lib/typescript/src/types/Errors.d.ts.map +1 -1
  93. package/lib/typescript/src/types/Onramp.d.ts +168 -9
  94. package/lib/typescript/src/types/Onramp.d.ts.map +1 -1
  95. package/package.json +3 -2
  96. package/src/components/PaymentMethodMessagingElement.tsx +54 -52
  97. package/src/components/StripeProvider.tsx +2 -0
  98. package/src/hooks/useCheckout.tsx +20 -13
  99. package/src/hooks/useOnramp.tsx +139 -12
  100. package/src/internal/stripeConfig.ts +9 -0
  101. package/src/specs/NativeOnrampSdkModule.ts +5 -0
  102. package/src/specs/NativeStripeSdkModule.ts +6 -5
  103. package/src/types/Checkout.ts +289 -93
  104. package/src/types/Errors.ts +0 -6
  105. package/src/types/Onramp.ts +192 -9
  106. package/stripe-react-native.podspec +3 -3
  107. package/ios/CurrencySelectorElementManager.swift +0 -12
@@ -1,6 +1,14 @@
1
1
  import type { Address } from './Common';
2
- import type { OnrampError, StripeError } from './Errors';
2
+ import type { StripeError } from './Errors';
3
3
  import type { ApplePayBaseParams, ApplePayPaymentMethodParams } from './PlatformPay';
4
+ /**
5
+ * Generic error codes returned by Crypto Onramp APIs.
6
+ */
7
+ export declare enum OnrampError {
8
+ Failed = "Failed",
9
+ Canceled = "Canceled",
10
+ Unknown = "Unknown"
11
+ }
4
12
  /**
5
13
  * Configuration used to initialize and customize the crypto onramp experience.
6
14
  *
@@ -183,6 +191,157 @@ export type KycInfo = {
183
191
  dateOfBirth?: DateOfBirth;
184
192
  /** Customer’s address, if collected. */
185
193
  address?: Address;
194
+ /** Two-letter ISO 3166-1 alpha-2 code for the country where the customer was born. */
195
+ birthCountry?: string;
196
+ /** City where the customer was born. */
197
+ birthCity?: string;
198
+ /** Two-letter ISO 3166-1 alpha-2 codes for the customer's nationalities. */
199
+ nationalities?: string[];
200
+ };
201
+ /**
202
+ * The type of compliance identifier required or submitted for regulatory compliance.
203
+ */
204
+ export type ComplianceIdentifierType = string;
205
+ /**
206
+ * The regulation requiring a compliance identifier.
207
+ */
208
+ export type ComplianceRegulation = 'eu_carf' | 'eu_mica';
209
+ /**
210
+ * A compliance identifier collected for MiCA or CRS/CARF compliance.
211
+ */
212
+ export type ComplianceIdentifier = {
213
+ /** The type of identifier provided. */
214
+ type: ComplianceIdentifierType;
215
+ /** The identifier value. */
216
+ value: string;
217
+ };
218
+ /**
219
+ * A compliance identifier the customer still needs to provide.
220
+ */
221
+ export type ComplianceIdentifierRequirement = {
222
+ /** The type of identifier required. */
223
+ type: ComplianceIdentifierType;
224
+ /** The regulation requiring this identifier. */
225
+ regulation: ComplianceRegulation;
226
+ };
227
+ /**
228
+ * A group describing alternative identifier types that may satisfy a requirement.
229
+ */
230
+ export type ComplianceIdentifierAlternativeGroup = {
231
+ /** The original identifier types required. */
232
+ originalMissingIdentifiers: ComplianceIdentifierType[];
233
+ /** Alternative identifier types that may satisfy the original requirement. */
234
+ alternativeMissingIdentifiers: ComplianceIdentifierType[];
235
+ };
236
+ /**
237
+ * The compliance identifiers a customer still needs to provide.
238
+ */
239
+ export type ComplianceIdentifierRequirements = {
240
+ /** Required identifier types and the regulations requiring them. */
241
+ identifiers: ComplianceIdentifierRequirement[];
242
+ /** Alternative identifier groups that may satisfy one or more requirements. */
243
+ alternatives: ComplianceIdentifierAlternativeGroup[];
244
+ /** Whether at least one CRS/CARF tax identification number still needs to be collected. */
245
+ carfTinRequired: boolean;
246
+ };
247
+ /**
248
+ * Typed Crypto Onramp error discriminants returned by newer native SDKs.
249
+ */
250
+ export type OnrampErrorType = 'AppAttestationError' | 'UncategorizedApiError';
251
+ /**
252
+ * A native SDK component and version included in Crypto Onramp diagnostics.
253
+ */
254
+ export type SDKVersion = {
255
+ /** The SDK component name. */
256
+ name: string;
257
+ /** The SDK component version. */
258
+ version: string;
259
+ };
260
+ export type OnrampApiError = StripeError<OnrampError> & {
261
+ onrampErrorType: string;
262
+ developerMessage: string;
263
+ userMessage: string;
264
+ reason?: string;
265
+ operation: string;
266
+ appPackageName: string;
267
+ mode?: 'live' | 'test';
268
+ sdkVersions?: SDKVersion[];
269
+ requestId?: string;
270
+ apiErrorCode?: string;
271
+ apiErrorType?: string;
272
+ apiErrorMessage?: string;
273
+ apiUserMessage?: string;
274
+ docUrl?: string;
275
+ };
276
+ /**
277
+ * A typed Crypto Onramp app attestation failure.
278
+ */
279
+ export type AppAttestationError = OnrampApiError & {
280
+ onrampErrorType: 'AppAttestationError';
281
+ };
282
+ /**
283
+ * A typed Crypto Onramp API error that did not map to a narrower category.
284
+ */
285
+ export type UncategorizedApiError = OnrampApiError & {
286
+ onrampErrorType: 'UncategorizedApiError';
287
+ };
288
+ /**
289
+ * Error returned by Crypto Onramp APIs.
290
+ *
291
+ * Most failures use the generic Stripe error envelope. Newer native SDK
292
+ * versions may instead return typed SDK-owned errors via
293
+ * `onrampErrorType`.
294
+ */
295
+ export type CryptoOnrampError = (StripeError<OnrampError> & {
296
+ onrampErrorType?: undefined;
297
+ }) | AppAttestationError | UncategorizedApiError;
298
+ /**
299
+ * Result of retrieving missing compliance identifiers.
300
+ */
301
+ export type RetrieveMissingIdentifiersResult = (ComplianceIdentifierRequirements & {
302
+ error?: undefined;
303
+ }) | {
304
+ identifiers?: undefined;
305
+ alternatives?: undefined;
306
+ carfTinRequired?: undefined;
307
+ /** Present if retrieval failed with an error. */
308
+ error: CryptoOnrampError;
309
+ };
310
+ /**
311
+ * Result of submitting compliance identifiers for MiCA and CRS/CARF compliance.
312
+ */
313
+ export type SubmitIdentifiersResult = {
314
+ /** Whether all required MiCA identifiers and CRS/CARF tax identification numbers have been submitted. */
315
+ completed: boolean;
316
+ /** Any identifiers that still need to be collected. */
317
+ identifiers: ComplianceIdentifierRequirement[];
318
+ /** Alternative identifier groups that may satisfy one or more requirements. */
319
+ alternatives: ComplianceIdentifierAlternativeGroup[];
320
+ /** Whether at least one CRS/CARF tax identification number still needs to be collected. */
321
+ carfTinRequired: boolean;
322
+ /** Submitted identifier types whose values were invalid. */
323
+ invalidIdentifiers: ComplianceIdentifierType[];
324
+ error?: undefined;
325
+ } | {
326
+ completed?: undefined;
327
+ identifiers?: undefined;
328
+ alternatives?: undefined;
329
+ carfTinRequired?: undefined;
330
+ invalidIdentifiers?: undefined;
331
+ /** Present if submission failed with an error. */
332
+ error: CryptoOnrampError;
333
+ };
334
+ /**
335
+ * Result of presenting user attestation.
336
+ */
337
+ export type UserAttestationResult = {
338
+ /** The customer accepted the attestation. */
339
+ status: 'Confirmed';
340
+ error?: undefined;
341
+ } | {
342
+ status?: undefined;
343
+ /** Present if attestation failed or was cancelled. */
344
+ error: CryptoOnrampError;
186
345
  };
187
346
  /**
188
347
  * Result of KYC verification.
@@ -198,14 +357,14 @@ export type VerifyKycResult = {
198
357
  } | {
199
358
  status?: undefined;
200
359
  /** Present if the verification failed with an error. */
201
- error: StripeError<OnrampError>;
360
+ error: CryptoOnrampError;
202
361
  };
203
362
  /**
204
363
  * Common result for void-returning operations. Contains an optional error.
205
364
  */
206
365
  export type VoidResult = {
207
366
  /** Present if the operation failed. */
208
- error?: StripeError<OnrampError>;
367
+ error?: CryptoOnrampError;
209
368
  };
210
369
  /**
211
370
  * Result of Link authorization.
@@ -229,7 +388,7 @@ export type AuthorizeResult = {
229
388
  status?: undefined;
230
389
  customerId?: undefined;
231
390
  /** Present if the authorization failed with an error. */
232
- error: StripeError<OnrampError>;
391
+ error: CryptoOnrampError;
233
392
  };
234
393
  /**
235
394
  * Result of checking whether an email corresponds to an existing Link account.
@@ -241,7 +400,7 @@ export type HasLinkAccountResult = {
241
400
  } | {
242
401
  hasLinkAccount?: undefined;
243
402
  /** Present if the lookup failed with an error. */
244
- error: StripeError<OnrampError>;
403
+ error: CryptoOnrampError;
245
404
  };
246
405
  /**
247
406
  * Result of registering a new Link user.
@@ -253,7 +412,7 @@ export type RegisterLinkUserResult = {
253
412
  } | {
254
413
  customerId?: undefined;
255
414
  /** Present if registration failed with an error. */
256
- error: StripeError<OnrampError>;
415
+ error: CryptoOnrampError;
257
416
  };
258
417
  /**
259
418
  * Describes the payment method currently selected by the user.
@@ -284,7 +443,7 @@ export type CollectPaymentMethodResult = {
284
443
  displayData?: undefined;
285
444
  kycInfo?: undefined;
286
445
  /** Present if collection/selection failed with an error. */
287
- error: StripeError<OnrampError>;
446
+ error: CryptoOnrampError;
288
447
  };
289
448
  /**
290
449
  * Result of creating a crypto payment token for the currently selected payment method.
@@ -296,7 +455,7 @@ export type CreateCryptoPaymentTokenResult = {
296
455
  } | {
297
456
  cryptoPaymentToken?: undefined;
298
457
  /** Present if token creation failed with an error. */
299
- error: StripeError<OnrampError>;
458
+ error: CryptoOnrampError;
300
459
  };
301
460
  /**
302
461
  * A representation of the crypto payment token, which contains details about the payment method used.
@@ -328,6 +487,6 @@ export type PaymentDisplayDataResult = {
328
487
  } | {
329
488
  displayData?: undefined;
330
489
  /** Present if collection/selection failed with an error. */
331
- error: StripeError<OnrampError>;
490
+ error: CryptoOnrampError;
332
491
  };
333
492
  //# sourceMappingURL=Onramp.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Onramp.d.ts","sourceRoot":"","sources":["../../../../src/types/Onramp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,KAAK,EACV,kBAAkB,EAClB,2BAA2B,EAC5B,MAAM,eAAe,CAAC;AAEvB;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,sDAAsD;IACtD,mBAAmB,EAAE,MAAM,CAAC;IAC5B,sEAAsE;IACtE,UAAU,E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AC;KACf,CAAC;CACH,GACD;IACE,eAAe,EAAE;QACf,+DAA+D;QAC/D,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;QAEtC,uDAAuD;QACvD,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;CACH,CAAC;AAEN;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAChC;IACE,oDAAoD;IACpD,WAAW,EAAE,wBAAwB,CAAC;IACtC,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,GACD;IACE,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,4DAA4D;IAC5D,KAAK,EAAE,iBAAiB,CAAC;CAC1B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stripe/stripe-react-native",
3
- "version": "0.65.1",
3
+ "version": "0.67.0",
4
4
  "author": "Stripe",
5
5
  "description": "Stripe SDK for React Native",
6
6
  "main": "lib/commonjs/index",
@@ -13,7 +13,8 @@
13
13
  "typescript": "tsc --noEmit",
14
14
  "lint": "eslint \"**/*.{js,ts,tsx}\" --ignore-pattern \"docs/api-reference/*\" --ignore-path .gitignore",
15
15
  "prepare": "bob build && rm -rf lib/*/package.json && husky",
16
- "release": "./scripts/publish",
16
+ "propose": "./scripts/propose.rb",
17
+ "release": "./scripts/publish.rb",
17
18
  "example": "yarn --cwd example",
18
19
  "pods": "cd example && npx pod-install --quiet",
19
20
  "update-pods": "cd example/ios && pod update Stripe StripeApplePay StripeFinancialConnections StripePayments StripePaymentSheet StripePaymentsUI StripeCore StripeUICore StripeCryptoOnramp",
@@ -1,4 +1,4 @@
1
- import React, { forwardRef, useEffect, useRef, useState } from 'react';
1
+ import React, { useEffect, useRef, useState } from 'react';
2
2
  import {
3
3
  AccessibilityProps,
4
4
  HostComponent,
@@ -50,60 +50,62 @@ export interface Props extends AccessibilityProps {
50
50
  * @returns JSX.Element
51
51
  * @category ReactComponents
52
52
  */
53
- export const PaymentMethodMessagingElement = forwardRef<any, Props>(
54
- ({ appearance, configuration, onStateChange, ...props }) => {
55
- const viewRef =
56
- useRef<React.ComponentRef<HostComponent<NativeProps>>>(null);
53
+ export const PaymentMethodMessagingElement = ({
54
+ appearance,
55
+ configuration,
56
+ onStateChange,
57
+ ...props
58
+ }: Props) => {
59
+ const viewRef = useRef<React.ComponentRef<HostComponent<NativeProps>>>(null);
57
60
 
58
- const [height, setHeight] = useState<number | undefined>();
61
+ const [height, setHeight] = useState<number | undefined>();
59
62
 
60
- useEffect(() => {
61
- // listen for height changes
62
- const sub = addListener(
63
- 'paymentMethodMessagingElementDidUpdateHeight',
64
- ({ height: h }) => {
65
- LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
66
- setHeight(h);
67
- }
68
- );
69
- return () => sub.remove();
70
- });
63
+ useEffect(() => {
64
+ // listen for height changes
65
+ const sub = addListener(
66
+ 'paymentMethodMessagingElementDidUpdateHeight',
67
+ ({ height: h }) => {
68
+ LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
69
+ setHeight(h);
70
+ }
71
+ );
72
+ return () => sub.remove();
73
+ });
71
74
 
72
- useEffect(() => {
73
- // listen for load complete
74
- const sub = addListener(
75
- 'paymentMethodMessagingElementConfigureResult',
76
- ({ status: s }) => {
77
- let state: PaymentMethodMessagingElementState;
75
+ useEffect(() => {
76
+ // listen for load complete
77
+ const sub = addListener(
78
+ 'paymentMethodMessagingElementConfigureResult',
79
+ ({ status: s }) => {
80
+ let state: PaymentMethodMessagingElementState;
78
81
 
79
- if (s === 'loaded') {
80
- state = { status: 'loaded' };
81
- } else if (s === 'loading') {
82
- state = { status: 'loading' };
83
- } else if (s === 'no_content') {
84
- state = { status: 'no_content' };
85
- } else {
86
- state = {
87
- status: 'failed',
88
- error: new Error(
89
- 'Failed to configure payment method messaging element'
90
- ),
91
- };
92
- }
93
- onStateChange?.(state);
82
+ if (s === 'loaded') {
83
+ state = { status: 'loaded' };
84
+ } else if (s === 'loading') {
85
+ state = { status: 'loading' };
86
+ } else if (s === 'no_content') {
87
+ state = { status: 'no_content' };
88
+ } else {
89
+ state = {
90
+ status: 'failed',
91
+ error: new Error(
92
+ 'Failed to configure payment method messaging element'
93
+ ),
94
+ };
94
95
  }
95
- );
96
- return () => sub.remove();
97
- }, [onStateChange]);
98
-
99
- return (
100
- <NativePaymentMethodMessagingElement
101
- appearance={appearance}
102
- style={[{ width: '100%', height: height }]}
103
- configuration={configuration}
104
- {...props}
105
- ref={viewRef}
106
- />
96
+ onStateChange?.(state);
97
+ }
107
98
  );
108
- }
109
- );
99
+ return () => sub.remove();
100
+ }, [onStateChange]);
101
+
102
+ return (
103
+ <NativePaymentMethodMessagingElement
104
+ appearance={appearance}
105
+ style={[{ width: '100%', height: height }]}
106
+ configuration={configuration}
107
+ {...props}
108
+ ref={viewRef}
109
+ />
110
+ );
111
+ };
@@ -6,6 +6,7 @@ import { isAndroid, shouldAttributeExpo } from '../helpers';
6
6
  import type { AppInfo, InitStripeParams, InitialiseParams } from '../types';
7
7
  import pjson from '../../package.json';
8
8
  import { AppRegistry, Platform } from 'react-native';
9
+ import { setCurrentPublishableKey } from '../internal/stripeConfig';
9
10
 
10
11
  const EXPO_PARTNER_ID = 'pp_partner_JBN7LkABco2yUu';
11
12
 
@@ -50,6 +51,7 @@ export const initStripe = async (params: InitStripeParams): Promise<void> => {
50
51
 
51
52
  const extendedParams: InitialiseParams = { ...params, appInfo };
52
53
  await NativeStripeSdk.initialise(extendedParams);
54
+ setCurrentPublishableKey(params.publishableKey);
53
55
 
54
56
  if (Platform.OS === 'android') {
55
57
  await NativeOnrampSdk?.initialise(extendedParams);
@@ -158,15 +158,24 @@ export function useCheckout(
158
158
  ),
159
159
  [withLoading]
160
160
  );
161
- const updateTaxId = useCallback<Checkout['updateTaxId']>(
162
- (type, value) =>
163
- withLoading((key) =>
164
- NativeStripeSdk.checkoutUpdateTaxId(key, type, value)
165
- ),
166
- [withLoading]
167
- );
168
- const refresh = useCallback<Checkout['refresh']>(
169
- () => withLoading((key) => NativeStripeSdk.checkoutRefresh(key)),
161
+ const runServerUpdate = useCallback<Checkout['runServerUpdate']>(
162
+ (serverUpdate) =>
163
+ withLoading(async (key) => {
164
+ const startPromise = NativeStripeSdk.checkoutRunServerUpdateStart(key);
165
+
166
+ try {
167
+ await serverUpdate();
168
+ await NativeStripeSdk.checkoutRunServerUpdateComplete(key, null);
169
+ } catch (e: any) {
170
+ await NativeStripeSdk.checkoutRunServerUpdateComplete(
171
+ key,
172
+ e.message ?? 'Server update failed'
173
+ );
174
+ throw e;
175
+ }
176
+
177
+ return await startPromise;
178
+ }),
170
179
  [withLoading]
171
180
  );
172
181
 
@@ -188,8 +197,7 @@ export function useCheckout(
188
197
  removePromotionCode,
189
198
  updateLineItemQuantity,
190
199
  selectShippingOption,
191
- updateTaxId,
192
- refresh,
200
+ runServerUpdate,
193
201
  }),
194
202
  [
195
203
  updateShippingAddress,
@@ -198,8 +206,7 @@ export function useCheckout(
198
206
  removePromotionCode,
199
207
  updateLineItemQuantity,
200
208
  selectShippingOption,
201
- updateTaxId,
202
- refresh,
209
+ runServerUpdate,
203
210
  ]
204
211
  );
205
212