@stripe/stripe-react-native 0.28.0 → 0.30.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/CHANGELOG.md +95 -68
- package/README.md +2 -2
- package/android/gradle.properties +1 -1
- package/android/src/main/java/com/reactnativestripesdk/GooglePayButtonManager.kt +0 -5
- package/android/src/main/java/com/reactnativestripesdk/GooglePayButtonView.kt +11 -27
- package/android/src/main/java/com/reactnativestripesdk/PaymentLauncherFragment.kt +35 -8
- package/android/src/main/java/com/reactnativestripesdk/PaymentSheetFragment.kt +131 -6
- package/android/src/main/java/com/reactnativestripesdk/StripeSdkModule.kt +42 -7
- package/android/src/main/java/com/reactnativestripesdk/pushprovisioning/TapAndPayProxy.kt +8 -1
- package/android/src/main/java/com/reactnativestripesdk/utils/Errors.kt +2 -0
- package/android/src/main/java/com/reactnativestripesdk/utils/Mappers.kt +14 -1
- package/ios/ApplePayButtonView.swift +4 -18
- package/ios/ApplePayViewController.swift +1 -28
- package/ios/Mappers.swift +1 -0
- package/ios/StripeSdk+PaymentSheet.swift +100 -10
- package/ios/StripeSdk.m +22 -29
- package/ios/StripeSdk.swift +59 -85
- package/jest/mock.js +4 -6
- package/lib/commonjs/NativeStripeSdk.js.map +1 -1
- package/lib/commonjs/components/ApplePayButtonNative.js.map +1 -1
- package/lib/commonjs/components/GooglePayButtonNative.js.map +1 -1
- package/lib/commonjs/functions.js +1 -1
- package/lib/commonjs/functions.js.map +1 -1
- package/lib/commonjs/hooks/useFinancialConnectionsSheet.js +1 -1
- package/lib/commonjs/hooks/useFinancialConnectionsSheet.js.map +1 -1
- package/lib/commonjs/hooks/usePaymentSheet.js +1 -1
- package/lib/commonjs/hooks/usePaymentSheet.js.map +1 -1
- package/lib/commonjs/hooks/useStripe.js +1 -1
- package/lib/commonjs/hooks/useStripe.js.map +1 -1
- package/lib/commonjs/index.js +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/types/ApplePay.js.map +1 -1
- package/lib/commonjs/types/PaymentIntent.js.map +1 -1
- package/lib/commonjs/types/PaymentSheet.js +1 -1
- package/lib/commonjs/types/PaymentSheet.js.map +1 -1
- package/lib/commonjs/types/PlatformPay.js.map +1 -1
- package/lib/commonjs/types/PushProvisioning.js.map +1 -1
- package/lib/commonjs/types/components/GooglePayButtonComponent.js.map +1 -1
- package/lib/commonjs/types/index.js +1 -1
- package/lib/commonjs/types/index.js.map +1 -1
- package/lib/module/NativeStripeSdk.js.map +1 -1
- package/lib/module/components/ApplePayButtonNative.js.map +1 -1
- package/lib/module/components/GooglePayButtonNative.js.map +1 -1
- package/lib/module/functions.js +1 -1
- package/lib/module/functions.js.map +1 -1
- package/lib/module/hooks/useFinancialConnectionsSheet.js +1 -1
- package/lib/module/hooks/useFinancialConnectionsSheet.js.map +1 -1
- package/lib/module/hooks/usePaymentSheet.js +1 -1
- package/lib/module/hooks/usePaymentSheet.js.map +1 -1
- package/lib/module/hooks/useStripe.js +1 -1
- package/lib/module/hooks/useStripe.js.map +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/types/ApplePay.js.map +1 -1
- package/lib/module/types/PaymentIntent.js.map +1 -1
- package/lib/module/types/PaymentSheet.js +1 -1
- package/lib/module/types/PaymentSheet.js.map +1 -1
- package/lib/module/types/PlatformPay.js.map +1 -1
- package/lib/module/types/PushProvisioning.js.map +1 -1
- package/lib/module/types/components/GooglePayButtonComponent.js.map +1 -1
- package/lib/module/types/index.js +1 -1
- package/lib/module/types/index.js.map +1 -1
- package/lib/typescript/src/NativeStripeSdk.d.ts +5 -15
- package/lib/typescript/src/components/ApplePayButtonNative.d.ts +1 -1
- package/lib/typescript/src/components/GooglePayButtonNative.d.ts +1 -1
- package/lib/typescript/src/functions.d.ts +15 -27
- package/lib/typescript/src/hooks/usePlatformPay.d.ts +1 -1
- package/lib/typescript/src/hooks/useStripe.d.ts +3 -18
- package/lib/typescript/src/index.d.ts +0 -7
- package/lib/typescript/src/types/ApplePay.d.ts +0 -52
- package/lib/typescript/src/types/PaymentIntent.d.ts +3 -2
- package/lib/typescript/src/types/PaymentSheet.d.ts +48 -2
- package/lib/typescript/src/types/PlatformPay.d.ts +34 -4
- package/lib/typescript/src/types/PushProvisioning.d.ts +9 -1
- package/lib/typescript/src/types/components/GooglePayButtonComponent.d.ts +0 -1
- package/lib/typescript/src/types/index.d.ts +8 -4
- package/package.json +1 -1
- package/src/NativeStripeSdk.tsx +11 -31
- package/src/components/ApplePayButtonNative.tsx +1 -1
- package/src/components/GooglePayButtonNative.tsx +1 -1
- package/src/functions.ts +87 -197
- package/src/hooks/useFinancialConnectionsSheet.tsx +19 -13
- package/src/hooks/usePaymentSheet.tsx +25 -18
- package/src/hooks/useStripe.tsx +14 -108
- package/src/index.tsx +0 -7
- package/src/types/ApplePay.ts +0 -71
- package/src/types/PaymentIntent.ts +4 -2
- package/src/types/PaymentSheet.ts +86 -2
- package/src/types/PlatformPay.ts +35 -4
- package/src/types/PushProvisioning.ts +9 -1
- package/src/types/components/GooglePayButtonComponent.ts +0 -1
- package/src/types/index.ts +10 -6
- package/stripe-react-native.podspec +1 -1
- package/lib/commonjs/components/ApplePayButton.js +0 -2
- package/lib/commonjs/components/ApplePayButton.js.map +0 -1
- package/lib/commonjs/components/GooglePayButton.js +0 -2
- package/lib/commonjs/components/GooglePayButton.js.map +0 -1
- package/lib/commonjs/hooks/useApplePay.js +0 -2
- package/lib/commonjs/hooks/useApplePay.js.map +0 -1
- package/lib/commonjs/hooks/useGooglePay.js +0 -2
- package/lib/commonjs/hooks/useGooglePay.js.map +0 -1
- package/lib/commonjs/types/GooglePay.js +0 -2
- package/lib/commonjs/types/GooglePay.js.map +0 -1
- package/lib/module/components/ApplePayButton.js +0 -2
- package/lib/module/components/ApplePayButton.js.map +0 -1
- package/lib/module/components/GooglePayButton.js +0 -2
- package/lib/module/components/GooglePayButton.js.map +0 -1
- package/lib/module/hooks/useApplePay.js +0 -2
- package/lib/module/hooks/useApplePay.js.map +0 -1
- package/lib/module/hooks/useGooglePay.js +0 -2
- package/lib/module/hooks/useGooglePay.js.map +0 -1
- package/lib/module/types/GooglePay.js +0 -2
- package/lib/module/types/GooglePay.js.map +0 -1
- package/lib/typescript/src/components/ApplePayButton.d.ts +0 -31
- package/lib/typescript/src/components/GooglePayButton.d.ts +0 -26
- package/lib/typescript/src/hooks/useApplePay.d.ts +0 -54
- package/lib/typescript/src/hooks/useGooglePay.d.ts +0 -11
- package/lib/typescript/src/types/GooglePay.d.ts +0 -47
- package/src/components/ApplePayButton.tsx +0 -108
- package/src/components/GooglePayButton.tsx +0 -58
- package/src/hooks/useApplePay.tsx +0 -161
- package/src/hooks/useGooglePay.tsx +0 -72
- package/src/types/GooglePay.ts +0 -74
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { BillingDetails, AddressDetails } from './Common';
|
|
2
2
|
import type { CartSummaryItem } from './ApplePay';
|
|
3
3
|
import type { ButtonType, RecurringPaymentRequest, AutomaticReloadPaymentRequest, MultiMerchantRequest } from './PlatformPay';
|
|
4
|
-
|
|
4
|
+
import type { FutureUsage } from './PaymentIntent';
|
|
5
|
+
import type { Result } from './PaymentMethod';
|
|
6
|
+
import type { StripeError } from './Errors';
|
|
7
|
+
export declare type SetupParams = IntentParams & {
|
|
5
8
|
/** Your customer-facing business name. On Android, this is required and cannot be an empty string. */
|
|
6
9
|
merchantDisplayName: string;
|
|
7
10
|
/** The identifier of the Stripe Customer object. See https://stripe.com/docs/api/customers/object#customer_object-id */
|
|
@@ -42,12 +45,18 @@ export declare type SetupParams = ClientSecretParams & {
|
|
|
42
45
|
/** The label to use for the primary button. If not set, Payment Sheet will display suitable default labels for payment and setup intents. */
|
|
43
46
|
primaryButtonLabel?: string;
|
|
44
47
|
};
|
|
45
|
-
export declare type
|
|
48
|
+
export declare type IntentParams = {
|
|
46
49
|
paymentIntentClientSecret: string;
|
|
47
50
|
setupIntentClientSecret?: undefined;
|
|
51
|
+
intentConfiguration?: never;
|
|
48
52
|
} | {
|
|
49
53
|
setupIntentClientSecret: string;
|
|
50
54
|
paymentIntentClientSecret?: undefined;
|
|
55
|
+
intentConfiguration?: never;
|
|
56
|
+
} | {
|
|
57
|
+
setupIntentClientSecret?: never;
|
|
58
|
+
paymentIntentClientSecret?: never;
|
|
59
|
+
intentConfiguration: IntentConfiguration;
|
|
51
60
|
};
|
|
52
61
|
export declare type ApplePayParams = {
|
|
53
62
|
/** The two-letter ISO 3166 code of the country of your business, e.g. "US" */
|
|
@@ -264,4 +273,41 @@ export declare enum AddressCollectionMode {
|
|
|
264
273
|
/** Collect the full billing address, regardless of the Payment Method's requirements. */
|
|
265
274
|
FULL = "full"
|
|
266
275
|
}
|
|
276
|
+
export declare type IntentCreationError = StripeError<'Failed'>;
|
|
277
|
+
export declare type IntentCreationCallbackParams = {
|
|
278
|
+
clientSecret: string;
|
|
279
|
+
error?: never;
|
|
280
|
+
} | {
|
|
281
|
+
clientSecret?: never;
|
|
282
|
+
error: IntentCreationError;
|
|
283
|
+
};
|
|
284
|
+
export declare type IntentConfiguration = {
|
|
285
|
+
confirmHandler: (paymentMethod: Result, shouldSavePaymentMethod: boolean, intentCreationCallback: (result: IntentCreationCallbackParams) => void) => void;
|
|
286
|
+
mode: Mode;
|
|
287
|
+
paymentMethodTypes?: Array<string>;
|
|
288
|
+
};
|
|
289
|
+
export declare type Mode = PaymentMode | SetupMode;
|
|
290
|
+
/**
|
|
291
|
+
* Controls when the funds will be captured. Seealso: https://stripe.com/docs/api/payment_intents/create#create_payment_intent-capture_method
|
|
292
|
+
*/
|
|
293
|
+
export declare enum CaptureMethod {
|
|
294
|
+
/** (Default) Stripe automatically captures funds when the customer authorizes the payment. */
|
|
295
|
+
Automatic = "Automatic",
|
|
296
|
+
/** Place a hold on the funds when the customer authorizes the payment, but don’t capture the funds until later. (Not all payment methods support this.) */
|
|
297
|
+
Manual = "Manual",
|
|
298
|
+
/** Asynchronously capture funds when the customer authorizes the payment.
|
|
299
|
+
- Note: Recommended over `CaptureMethod.Automatic` due to improved latency, but may require additional integration changes.
|
|
300
|
+
- Seealso: https://stripe.com/docs/payments/payment-intents/asynchronous-capture-automatic-async */
|
|
301
|
+
AutomaticAsync = "AutomaticAsync"
|
|
302
|
+
}
|
|
303
|
+
export declare type PaymentMode = {
|
|
304
|
+
amount: number;
|
|
305
|
+
currencyCode: string;
|
|
306
|
+
setupFutureUsage?: FutureUsage;
|
|
307
|
+
captureMethod?: CaptureMethod;
|
|
308
|
+
};
|
|
309
|
+
export declare type SetupMode = {
|
|
310
|
+
currencyCode?: string;
|
|
311
|
+
setupFutureUsage: FutureUsage;
|
|
312
|
+
};
|
|
267
313
|
export {};
|
|
@@ -3,8 +3,6 @@ import type { Result as PaymentMethod } from './PaymentMethod';
|
|
|
3
3
|
import type { Result as PaymentIntent } from './PaymentIntent';
|
|
4
4
|
import type { Result as SetupIntent } from './SetupIntent';
|
|
5
5
|
import type { StripeError, PlatformPayError } from './Errors';
|
|
6
|
-
import type { ShippingContact as ApplePayShippingContact } from './ApplePay';
|
|
7
|
-
import type { IsSupportedParams } from './GooglePay';
|
|
8
6
|
export declare type ApplePaySheetError = {
|
|
9
7
|
errorType: ApplePaySheetErrorType.InvalidShippingAddress;
|
|
10
8
|
field: InvalidShippingField;
|
|
@@ -319,10 +317,41 @@ export declare type ShippingMethod = {
|
|
|
319
317
|
/** The unix timestamp of the end date of the expected range of delivery or shipping dates for a package, or the time range when an item is available for pickup. Measured in seconds. */
|
|
320
318
|
endDate?: number;
|
|
321
319
|
};
|
|
320
|
+
interface PostalAddress {
|
|
321
|
+
city?: string;
|
|
322
|
+
country?: string;
|
|
323
|
+
postalCode?: string;
|
|
324
|
+
state?: string;
|
|
325
|
+
street?: string;
|
|
326
|
+
isoCountryCode?: string;
|
|
327
|
+
subAdministrativeArea?: string;
|
|
328
|
+
subLocality?: string;
|
|
329
|
+
}
|
|
330
|
+
interface ContactName {
|
|
331
|
+
familyName?: string;
|
|
332
|
+
namePrefix?: string;
|
|
333
|
+
nameSuffix?: string;
|
|
334
|
+
givenName?: string;
|
|
335
|
+
middleName?: string;
|
|
336
|
+
nickname?: string;
|
|
337
|
+
}
|
|
322
338
|
/** iOS only. */
|
|
323
|
-
export
|
|
339
|
+
export interface ShippingContact {
|
|
340
|
+
emailAddress?: string;
|
|
341
|
+
name: ContactName;
|
|
342
|
+
phoneNumber?: string;
|
|
343
|
+
postalAddress: PostalAddress;
|
|
344
|
+
}
|
|
324
345
|
/** Android only. */
|
|
325
|
-
export declare type IsGooglePaySupportedParams =
|
|
346
|
+
export declare type IsGooglePaySupportedParams = {
|
|
347
|
+
/** Set to true to run in a test environment with relaxed application / merchant requirements. This environment is suggested for early development and for easily testing SDK. Defaults to false. */
|
|
348
|
+
testEnv?: boolean;
|
|
349
|
+
/**
|
|
350
|
+
* If `true`, Google Pay is considered ready if the customer's Google Pay wallet
|
|
351
|
+
* has an existing payment method. Defaults to false.
|
|
352
|
+
*/
|
|
353
|
+
existingPaymentMethodRequired?: boolean;
|
|
354
|
+
};
|
|
326
355
|
export declare type PaymentMethodResult = {
|
|
327
356
|
paymentMethod: PaymentMethod;
|
|
328
357
|
error?: undefined;
|
|
@@ -351,3 +380,4 @@ export declare type ConfirmSetupIntentResult = {
|
|
|
351
380
|
setupIntent?: undefined;
|
|
352
381
|
error: StripeError<PlatformPayError>;
|
|
353
382
|
};
|
|
383
|
+
export {};
|
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
import type { StripeError, GooglePayError } from './Errors';
|
|
2
2
|
export declare type GooglePayCardToken = {
|
|
3
|
+
/** The token reference ID. */
|
|
3
4
|
id: string;
|
|
4
|
-
|
|
5
|
+
/** Last four digits of the FPAN */
|
|
6
|
+
fpanLastFour: string;
|
|
7
|
+
/** Last four digits of the DPAN */
|
|
8
|
+
dpanLastFour: string;
|
|
5
9
|
network: number;
|
|
6
10
|
serviceProvider: number;
|
|
11
|
+
/** The name of the issuer. */
|
|
7
12
|
issuer: string;
|
|
13
|
+
/** The GooglePayCardTokenStatus. */
|
|
8
14
|
status: GooglePayCardTokenStatus;
|
|
15
|
+
/** Deprecated. Use fpanLastFour or dpanLastFour. */
|
|
16
|
+
cardLastFour: string;
|
|
9
17
|
};
|
|
10
18
|
export declare enum GooglePayCardTokenStatus {
|
|
11
19
|
/** */
|
|
@@ -5,16 +5,13 @@ import * as PaymentMethod from './PaymentMethod';
|
|
|
5
5
|
import * as PaymentSheet from './PaymentSheet';
|
|
6
6
|
import * as SetupIntent from './SetupIntent';
|
|
7
7
|
import * as ThreeDSecure from './ThreeDSecure';
|
|
8
|
-
import * as GooglePay from './GooglePay';
|
|
9
|
-
import * as ApplePayButtonComponent from './components/ApplePayButtonComponent';
|
|
10
|
-
import * as GooglePayButtonComponent from './components/GooglePayButtonComponent';
|
|
11
8
|
import * as AuBECSDebitFormComponent from './components/AuBECSDebitFormComponent';
|
|
12
9
|
import * as CardFieldInput from './components/CardFieldInput';
|
|
13
10
|
import * as CardFormView from './components/CardFormView';
|
|
14
11
|
import * as Token from './Token';
|
|
15
12
|
import * as FinancialConnections from './FinancialConnections';
|
|
16
13
|
import * as PlatformPay from './PlatformPay';
|
|
17
|
-
export { ApplePay, PaymentIntent, PaymentMethod, PaymentSheet, SetupIntent, ThreeDSecure,
|
|
14
|
+
export { ApplePay, PaymentIntent, PaymentMethod, PaymentSheet, SetupIntent, ThreeDSecure, AuBECSDebitFormComponent, CardFieldInput, CardFormView, Token, FinancialConnections, PlatformPay, };
|
|
18
15
|
export * from './PushProvisioning';
|
|
19
16
|
export * from './Errors';
|
|
20
17
|
export type { Address, BillingDetails, AddressDetails } from './Common';
|
|
@@ -65,6 +62,13 @@ export declare type HandleNextActionResult = {
|
|
|
65
62
|
paymentIntent?: undefined;
|
|
66
63
|
error: StripeError<CardActionError>;
|
|
67
64
|
};
|
|
65
|
+
export declare type HandleNextActionForSetupResult = {
|
|
66
|
+
setupIntent: SetupIntent.Result;
|
|
67
|
+
error?: undefined;
|
|
68
|
+
} | {
|
|
69
|
+
setupIntent?: undefined;
|
|
70
|
+
error: StripeError<CardActionError>;
|
|
71
|
+
};
|
|
68
72
|
export declare type ConfirmSetupIntentResult = {
|
|
69
73
|
setupIntent: SetupIntent.Result;
|
|
70
74
|
error?: undefined;
|
package/package.json
CHANGED
package/src/NativeStripeSdk.tsx
CHANGED
|
@@ -2,7 +2,6 @@ import { NativeModules } from 'react-native';
|
|
|
2
2
|
import type {
|
|
3
3
|
PaymentMethod,
|
|
4
4
|
PaymentIntent,
|
|
5
|
-
ApplePay,
|
|
6
5
|
PlatformPay,
|
|
7
6
|
PaymentSheet,
|
|
8
7
|
SetupIntent,
|
|
@@ -12,17 +11,13 @@ import type {
|
|
|
12
11
|
RetrieveSetupIntentResult,
|
|
13
12
|
ConfirmPaymentResult,
|
|
14
13
|
HandleNextActionResult,
|
|
14
|
+
HandleNextActionForSetupResult,
|
|
15
15
|
ConfirmSetupIntentResult,
|
|
16
16
|
CreateTokenForCVCUpdateResult,
|
|
17
17
|
InitPaymentSheetResult,
|
|
18
18
|
PresentPaymentSheetResult,
|
|
19
19
|
ConfirmPaymentSheetPaymentResult,
|
|
20
|
-
ApplePayResult,
|
|
21
20
|
CreateTokenResult,
|
|
22
|
-
GooglePayInitResult,
|
|
23
|
-
PayWithGooglePayResult,
|
|
24
|
-
CreateGooglePayPaymentMethodResult,
|
|
25
|
-
GooglePay,
|
|
26
21
|
OpenApplePaySetupResult,
|
|
27
22
|
Token,
|
|
28
23
|
VerifyMicrodepositsParams,
|
|
@@ -42,21 +37,15 @@ type NativeStripeSdkType = {
|
|
|
42
37
|
paymentIntentClientSecret: string,
|
|
43
38
|
returnURL?: string | null
|
|
44
39
|
): Promise<HandleNextActionResult>;
|
|
40
|
+
handleNextActionForSetup(
|
|
41
|
+
setupIntentClientSecret: string,
|
|
42
|
+
returnURL?: string | null
|
|
43
|
+
): Promise<HandleNextActionForSetupResult>;
|
|
45
44
|
confirmPayment(
|
|
46
45
|
paymentIntentClientSecret: string,
|
|
47
46
|
params?: PaymentIntent.ConfirmParams,
|
|
48
47
|
options?: PaymentIntent.ConfirmOptions
|
|
49
48
|
): Promise<ConfirmPaymentResult>;
|
|
50
|
-
isApplePaySupported(): Promise<boolean>;
|
|
51
|
-
presentApplePay(params: ApplePay.PresentParams): Promise<ApplePayResult>;
|
|
52
|
-
confirmApplePayPayment(clientSecret: string): Promise<void>;
|
|
53
|
-
updateApplePaySummaryItems(
|
|
54
|
-
summaryItems: ApplePay.CartSummaryItem[],
|
|
55
|
-
errorAddressFields: Array<{
|
|
56
|
-
field: ApplePay.AddressFields;
|
|
57
|
-
message?: string;
|
|
58
|
-
}>
|
|
59
|
-
): Promise<void>;
|
|
60
49
|
confirmSetupIntent(
|
|
61
50
|
paymentIntentClientSecret: string,
|
|
62
51
|
params: SetupIntent.ConfirmParams,
|
|
@@ -69,10 +58,9 @@ type NativeStripeSdkType = {
|
|
|
69
58
|
initPaymentSheet(
|
|
70
59
|
params: PaymentSheet.SetupParams
|
|
71
60
|
): Promise<InitPaymentSheetResult>;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
): Promise<InitPaymentSheetResult>;
|
|
61
|
+
intentCreationCallback(
|
|
62
|
+
result: PaymentSheet.IntentCreationCallbackParams
|
|
63
|
+
): void;
|
|
76
64
|
presentPaymentSheet(
|
|
77
65
|
options: PaymentSheet.PresentOptions
|
|
78
66
|
): Promise<PresentPaymentSheetResult>;
|
|
@@ -80,14 +68,6 @@ type NativeStripeSdkType = {
|
|
|
80
68
|
createTokenForCVCUpdate(cvc: string): Promise<CreateTokenForCVCUpdateResult>;
|
|
81
69
|
handleURLCallback(url: string): Promise<boolean>;
|
|
82
70
|
createToken(params: Token.CreateParams): Promise<CreateTokenResult>;
|
|
83
|
-
isGooglePaySupported(params: GooglePay.IsSupportedParams): Promise<boolean>;
|
|
84
|
-
initGooglePay(params: GooglePay.InitParams): Promise<GooglePayInitResult>;
|
|
85
|
-
presentGooglePay(
|
|
86
|
-
params: GooglePay.PresentParams
|
|
87
|
-
): Promise<PayWithGooglePayResult>;
|
|
88
|
-
createGooglePayPaymentMethod(
|
|
89
|
-
params: GooglePay.CreatePaymentMethodParams
|
|
90
|
-
): Promise<CreateGooglePayPaymentMethodResult>;
|
|
91
71
|
openApplePaySetup(): Promise<OpenApplePaySetupResult>;
|
|
92
72
|
verifyMicrodeposits(
|
|
93
73
|
isPaymentIntent: boolean,
|
|
@@ -114,7 +94,7 @@ type NativeStripeSdkType = {
|
|
|
114
94
|
): Promise<FinancialConnections.SessionResult>;
|
|
115
95
|
resetPaymentSheetCustomer(): Promise<null>;
|
|
116
96
|
isPlatformPaySupported(params: {
|
|
117
|
-
googlePay?:
|
|
97
|
+
googlePay?: PlatformPay.IsGooglePaySupportedParams;
|
|
118
98
|
}): Promise<boolean>;
|
|
119
99
|
createPlatformPayPaymentMethod(
|
|
120
100
|
params: PlatformPay.PaymentMethodParams,
|
|
@@ -122,8 +102,8 @@ type NativeStripeSdkType = {
|
|
|
122
102
|
): Promise<PlatformPay.PaymentMethodResult | PlatformPay.TokenResult>;
|
|
123
103
|
dismissPlatformPay(): Promise<boolean>;
|
|
124
104
|
updatePlatformPaySheet(
|
|
125
|
-
summaryItems: Array<
|
|
126
|
-
shippingMethods: Array<
|
|
105
|
+
summaryItems: Array<PlatformPay.CartSummaryItem>,
|
|
106
|
+
shippingMethods: Array<PlatformPay.ShippingMethod>,
|
|
127
107
|
errors: Array<PlatformPay.ApplePaySheetError>
|
|
128
108
|
): Promise<void>;
|
|
129
109
|
confirmPlatformPay(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { requireNativeComponent } from 'react-native';
|
|
2
|
-
import type
|
|
2
|
+
import type * as ApplePayButtonComponent from '../types/components/ApplePayButtonComponent';
|
|
3
3
|
const ApplePayButtonNative =
|
|
4
4
|
requireNativeComponent<ApplePayButtonComponent.NativeProps>('ApplePayButton');
|
|
5
5
|
export default ApplePayButtonNative;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { requireNativeComponent } from 'react-native';
|
|
2
|
-
import type
|
|
2
|
+
import type * as GooglePayButtonComponent from '../types/components/GooglePayButtonComponent';
|
|
3
3
|
const GooglePayButtonNative =
|
|
4
4
|
requireNativeComponent<GooglePayButtonComponent.NativeProps>(
|
|
5
5
|
'GooglePayButton'
|