@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.
- package/android/detekt/detekt-baseline.xml +0 -10
- package/android/gradle.properties +1 -1
- package/android/src/main/java/com/reactnativestripesdk/CardFieldView.kt +51 -57
- package/android/src/main/java/com/reactnativestripesdk/CurrencySelectorElementEvent.kt +26 -0
- package/android/src/main/java/com/reactnativestripesdk/CurrencySelectorElementView.kt +129 -16
- package/android/src/main/java/com/reactnativestripesdk/CurrencySelectorElementViewManager.kt +17 -0
- package/android/src/main/java/com/reactnativestripesdk/EventEmitterCompat.kt +4 -0
- package/android/src/main/java/com/reactnativestripesdk/PaymentSheetManager.kt +8 -19
- package/android/src/main/java/com/reactnativestripesdk/StripeAbstractComposeView.kt +1 -0
- package/android/src/main/java/com/reactnativestripesdk/StripeSdkModule.kt +89 -31
- package/android/src/main/java/com/reactnativestripesdk/StripeSdkPackage.kt +1 -0
- package/android/src/main/java/com/reactnativestripesdk/customersheet/CustomerSheetManager.kt +2 -16
- package/android/src/main/java/com/reactnativestripesdk/utils/CheckoutMappers.kt +59 -33
- package/android/src/main/java/com/reactnativestripesdk/utils/DefaultActivityLifecycleCallbacks.kt +41 -0
- package/android/src/main/java/com/reactnativestripesdk/utils/Errors.kt +11 -6
- package/android/src/oldarch/java/com/reactnativestripesdk/NativeOnrampSdkModuleSpec.java +17 -3
- package/android/src/oldarch/java/com/reactnativestripesdk/NativeStripeSdkModuleSpec.java +2 -2
- package/android/src/onramp/java/com/reactnativestripesdk/OnrampErrors.kt +145 -0
- package/android/src/onramp/java/com/reactnativestripesdk/OnrampMappers.kt +125 -0
- package/android/src/onramp/java/com/reactnativestripesdk/OnrampSdkModule.kt +144 -22
- package/android/src/test/java/com/reactnativestripesdk/DrawableLoadingTest.kt +6 -2
- package/android/src/test/java/com/reactnativestripesdk/OnrampErrorsTest.kt +168 -0
- package/android/src/test/java/com/reactnativestripesdk/mappers/OnrampMappersTest.kt +107 -0
- package/android/src/test/java/com/reactnativestripesdk/utils/CheckoutMappersTest.kt +39 -30
- package/android/src/test/java/com/reactnativestripesdk/utils/CheckoutTestFixtures.java +8 -0
- package/ios/CurrencySelectorElementManager.m +7 -0
- package/ios/CurrencySelectorElementView.swift +142 -7
- package/ios/EmbeddedPaymentElementView.swift +1 -1
- package/ios/Mappers+Checkout.swift +251 -107
- package/ios/Mappers.swift +97 -7
- package/ios/NewArch/StripeCurrencySelectorElementComponentView.mm +14 -0
- package/ios/OldArch/StripeSdkEventEmitterCompat.h +1 -0
- package/ios/OldArch/StripeSdkEventEmitterCompat.m +6 -0
- package/ios/OnrampErrors.swift +132 -0
- package/ios/PaymentOptionDisplayData+ReactNative.swift +1 -1
- package/ios/PaymentSheetAppearance.swift +1 -1
- package/ios/StripeOnrampSdk.mm +19 -0
- package/ios/StripeSdk.mm +14 -14
- package/ios/StripeSdkEmitter.swift +1 -0
- package/ios/StripeSdkImpl+Checkout.swift +66 -31
- package/ios/StripeSdkImpl+CustomerSheet.swift +1 -1
- package/ios/StripeSdkImpl+Embedded.swift +1 -1
- package/ios/StripeSdkImpl+PaymentSheet.swift +1 -1
- package/ios/StripeSdkImpl.swift +116 -24
- package/lib/commonjs/components/PaymentMethodMessagingElement.js +1 -1
- package/lib/commonjs/components/PaymentMethodMessagingElement.js.map +1 -1
- package/lib/commonjs/components/StripeProvider.js +1 -1
- package/lib/commonjs/components/StripeProvider.js.map +1 -1
- package/lib/commonjs/hooks/useCheckout.js +1 -1
- package/lib/commonjs/hooks/useCheckout.js.map +1 -1
- package/lib/commonjs/hooks/useOnramp.js +1 -1
- package/lib/commonjs/hooks/useOnramp.js.map +1 -1
- package/lib/commonjs/internal/stripeConfig.js +2 -0
- package/lib/commonjs/internal/stripeConfig.js.map +1 -0
- package/lib/commonjs/specs/NativeOnrampSdkModule.js.map +1 -1
- package/lib/commonjs/specs/NativeStripeSdkModule.js.map +1 -1
- package/lib/commonjs/types/Errors.js +1 -1
- package/lib/commonjs/types/Errors.js.map +1 -1
- package/lib/commonjs/types/Onramp.js +1 -1
- package/lib/commonjs/types/Onramp.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/StripeProvider.js +1 -1
- package/lib/module/components/StripeProvider.js.map +1 -1
- package/lib/module/hooks/useCheckout.js +1 -1
- package/lib/module/hooks/useCheckout.js.map +1 -1
- package/lib/module/hooks/useOnramp.js +1 -1
- package/lib/module/hooks/useOnramp.js.map +1 -1
- package/lib/module/internal/stripeConfig.js +2 -0
- package/lib/module/internal/stripeConfig.js.map +1 -0
- package/lib/module/specs/NativeOnrampSdkModule.js.map +1 -1
- package/lib/module/specs/NativeStripeSdkModule.js.map +1 -1
- package/lib/module/types/Errors.js +1 -1
- package/lib/module/types/Errors.js.map +1 -1
- package/lib/module/types/Onramp.js +1 -1
- package/lib/module/types/Onramp.js.map +1 -1
- package/lib/typescript/src/components/PaymentMethodMessagingElement.d.ts +1 -1
- package/lib/typescript/src/components/PaymentMethodMessagingElement.d.ts.map +1 -1
- package/lib/typescript/src/components/StripeProvider.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useCheckout.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useOnramp.d.ts +32 -10
- package/lib/typescript/src/hooks/useOnramp.d.ts.map +1 -1
- package/lib/typescript/src/internal/stripeConfig.d.ts +3 -0
- package/lib/typescript/src/internal/stripeConfig.d.ts.map +1 -0
- package/lib/typescript/src/specs/NativeOnrampSdkModule.d.ts +3 -0
- package/lib/typescript/src/specs/NativeOnrampSdkModule.d.ts.map +1 -1
- package/lib/typescript/src/specs/NativeStripeSdkModule.d.ts +2 -2
- package/lib/typescript/src/specs/NativeStripeSdkModule.d.ts.map +1 -1
- package/lib/typescript/src/types/Checkout.d.ts +266 -92
- package/lib/typescript/src/types/Checkout.d.ts.map +1 -1
- package/lib/typescript/src/types/Errors.d.ts +0 -5
- package/lib/typescript/src/types/Errors.d.ts.map +1 -1
- package/lib/typescript/src/types/Onramp.d.ts +168 -9
- package/lib/typescript/src/types/Onramp.d.ts.map +1 -1
- package/package.json +3 -2
- package/src/components/PaymentMethodMessagingElement.tsx +54 -52
- package/src/components/StripeProvider.tsx +2 -0
- package/src/hooks/useCheckout.tsx +20 -13
- package/src/hooks/useOnramp.tsx +139 -12
- package/src/internal/stripeConfig.ts +9 -0
- package/src/specs/NativeOnrampSdkModule.ts +5 -0
- package/src/specs/NativeStripeSdkModule.ts +6 -5
- package/src/types/Checkout.ts +289 -93
- package/src/types/Errors.ts +0 -6
- package/src/types/Onramp.ts +192 -9
- package/stripe-react-native.podspec +3 -3
- package/ios/CurrencySelectorElementManager.swift +0 -12
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import type { Address } from './Common';
|
|
2
|
-
import type {
|
|
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:
|
|
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?:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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,
|
|
1
|
+
{"version":3,"file":"Onramp.d.ts","sourceRoot":"","sources":["../../../../src/types/Onramp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,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tD,KAAK,EAAE,iBAAiB,CAAC;CAC1B,CAAC;AAEN;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAC1B;IACE,IAAI,EAAE;QACJ,uFAAuF;QACvF,KAAK,EAAE,MAAM,CAAC;QAEd,gEAAgE;QAChE,OAAO,EAAE,MAAM,CAAC;QAEhB,+CAA+C;QAC/C,KAAK,EAAE,MAAM,CAAC;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.
|
|
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
|
-
"
|
|
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, {
|
|
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 =
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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
|
-
|
|
61
|
+
const [height, setHeight] = useState<number | undefined>();
|
|
59
62
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
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
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
useEffect(() => {
|
|
76
|
+
// listen for load complete
|
|
77
|
+
const sub = addListener(
|
|
78
|
+
'paymentMethodMessagingElementConfigureResult',
|
|
79
|
+
({ status: s }) => {
|
|
80
|
+
let state: PaymentMethodMessagingElementState;
|
|
78
81
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
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
|
-
|
|
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
|
|
162
|
-
(
|
|
163
|
-
withLoading((key) =>
|
|
164
|
-
NativeStripeSdk.
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
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
|
-
|
|
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
|
-
|
|
202
|
-
refresh,
|
|
209
|
+
runServerUpdate,
|
|
203
210
|
]
|
|
204
211
|
);
|
|
205
212
|
|