@funnelsgrove/payments 0.1.23 → 0.1.24
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/dist/components/shared/SharedStripeCheckoutDialog.d.ts +1 -1
- package/dist/components/shared/SharedStripeCheckoutDialog.js +1 -1
- package/dist/components/shared/SharedStripeCheckoutV2Dialog.d.ts +1 -1
- package/dist/components/shared/SharedStripeCheckoutV2Dialog.js +1 -1
- package/dist/components/shared/StripeCheckoutExpressCheckoutButton.d.ts +1 -1
- package/dist/components/shared/StripeCheckoutExpressCheckoutButton.js +1 -1
- package/dist/components/shared/StripeExpressCheckoutButton.d.ts +1 -1
- package/dist/components/shared/StripeExpressCheckoutButton.js +1 -1
- package/dist/providers/stripe/WalletSubscriptionCheckoutSlot.d.ts +1 -1
- package/package.json +1 -1
|
@@ -21,7 +21,7 @@ export type SharedStripeCheckoutDialogProps = {
|
|
|
21
21
|
onCustomerEmailChange?: (value: string) => void;
|
|
22
22
|
onCustomerEmailCommit?: (email: string) => Promise<string | null | void>;
|
|
23
23
|
onError?: (message: string | null) => void;
|
|
24
|
-
onSuccess?: () => void
|
|
24
|
+
onSuccess?: () => void | Promise<void>;
|
|
25
25
|
paymentMethodLabels?: readonly string[];
|
|
26
26
|
poweredByLabel: string;
|
|
27
27
|
processingLabel: string;
|
|
@@ -210,7 +210,7 @@ function SharedStripeCheckoutForm({ amountCents, clientSecret, closeAriaLabel, c
|
|
|
210
210
|
}
|
|
211
211
|
if (typeof window !== 'undefined' &&
|
|
212
212
|
isSuccessfulIntentStatus((_a = result.paymentIntent) === null || _a === void 0 ? void 0 : _a.status)) {
|
|
213
|
-
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
|
|
213
|
+
await (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess());
|
|
214
214
|
window.location.assign(returnUrl);
|
|
215
215
|
return;
|
|
216
216
|
}
|
|
@@ -22,7 +22,7 @@ export type SharedStripeCheckoutV2DialogProps = {
|
|
|
22
22
|
onCustomerEmailCommit?: (email: string) => Promise<string | null | void>;
|
|
23
23
|
onError?: (message: string | null) => void;
|
|
24
24
|
onInactiveCheckoutSession?: () => void;
|
|
25
|
-
onSuccess?: () => void
|
|
25
|
+
onSuccess?: () => void | Promise<void>;
|
|
26
26
|
paymentMethodLabels?: readonly string[];
|
|
27
27
|
paypalButtonLabel: string;
|
|
28
28
|
paypalLabel: string;
|
|
@@ -228,7 +228,7 @@ function SharedStripeCheckoutV2Form({ amountCents, buttonColor, cardSubmitLabel,
|
|
|
228
228
|
return;
|
|
229
229
|
}
|
|
230
230
|
if (typeof window !== 'undefined') {
|
|
231
|
-
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
|
|
231
|
+
await (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess());
|
|
232
232
|
window.location.assign(returnUrl);
|
|
233
233
|
return;
|
|
234
234
|
}
|
|
@@ -15,6 +15,6 @@ export type StripeCheckoutExpressCheckoutButtonProps = {
|
|
|
15
15
|
onServerUpdate?: () => Promise<boolean>;
|
|
16
16
|
onAvailabilityChange?: (available: boolean) => void;
|
|
17
17
|
onError?: (message: string | null) => void;
|
|
18
|
-
onSuccess?: () => void
|
|
18
|
+
onSuccess?: () => void | Promise<void>;
|
|
19
19
|
};
|
|
20
20
|
export declare function StripeCheckoutExpressCheckoutButton({ beforeConfirm, returnUrl, customerEmail, className, options, availabilityPaymentMethods, initialAvailable, keepInitialAvailableOnReady, serverUpdateKey, onServerUpdate, onAvailabilityChange, onError, onSuccess, }: StripeCheckoutExpressCheckoutButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -135,7 +135,7 @@ export function StripeCheckoutExpressCheckoutButton({ beforeConfirm, returnUrl,
|
|
|
135
135
|
}
|
|
136
136
|
onError === null || onError === void 0 ? void 0 : onError(null);
|
|
137
137
|
if (typeof window !== 'undefined') {
|
|
138
|
-
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
|
|
138
|
+
await (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess());
|
|
139
139
|
window.location.assign(returnUrl);
|
|
140
140
|
}
|
|
141
141
|
};
|
|
@@ -13,6 +13,6 @@ export type StripeExpressCheckoutButtonProps = {
|
|
|
13
13
|
keepInitialAvailableOnReady?: boolean;
|
|
14
14
|
onAvailabilityChange?: (available: boolean) => void;
|
|
15
15
|
onError?: (message: string | null) => void;
|
|
16
|
-
onSuccess?: () => void
|
|
16
|
+
onSuccess?: () => void | Promise<void>;
|
|
17
17
|
};
|
|
18
18
|
export declare function StripeExpressCheckoutButton({ amountCents, beforeConfirm, summaryLabel, returnUrl, customerEmail, customerName, className, options, availabilityPaymentMethods, initialAvailable, keepInitialAvailableOnReady, onAvailabilityChange, onError, onSuccess, }: StripeExpressCheckoutButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -129,7 +129,7 @@ export function StripeExpressCheckoutButton({ amountCents, beforeConfirm, summar
|
|
|
129
129
|
onError === null || onError === void 0 ? void 0 : onError(null);
|
|
130
130
|
if (typeof window !== 'undefined' &&
|
|
131
131
|
isSuccessfulIntentStatus((_a = result.paymentIntent) === null || _a === void 0 ? void 0 : _a.status)) {
|
|
132
|
-
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
|
|
132
|
+
await (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess());
|
|
133
133
|
window.location.assign(returnUrl);
|
|
134
134
|
}
|
|
135
135
|
};
|
|
@@ -18,7 +18,7 @@ export type WalletSubscriptionCheckoutSlotProps = {
|
|
|
18
18
|
expressCheckoutAllowed?: boolean;
|
|
19
19
|
onAvailabilityChange?: (available: boolean) => void;
|
|
20
20
|
onError?: (message: string | null) => void;
|
|
21
|
-
onSuccess?: () => void
|
|
21
|
+
onSuccess?: () => void | Promise<void>;
|
|
22
22
|
onUnavailableClick?: () => Promise<void> | void;
|
|
23
23
|
options?: Partial<StripeCheckoutExpressCheckoutElementOptions>;
|
|
24
24
|
placeholderLabel: string;
|