@funnelsgrove/payments 0.1.27 → 0.1.29

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.
@@ -217,7 +217,10 @@ function SharedStripeCheckoutV2Form({ amountCents, buttonColor, cardSubmitLabel,
217
217
  setSubmitting(false);
218
218
  return;
219
219
  }
220
- const result = await checkoutState.checkout.confirm(Object.assign(Object.assign({}, (customerEmailEditable ? { email: syncedEmail || undefined } : {})), { redirect: 'if_required' }));
220
+ const result = await checkoutState.checkout.confirm({
221
+ email: syncedEmail || undefined,
222
+ redirect: 'if_required',
223
+ });
221
224
  if (result.type === 'error') {
222
225
  const message = result.error.message || 'Payment failed.';
223
226
  setSharedError(message);
@@ -257,7 +260,7 @@ function SharedStripeCheckoutV2Form({ amountCents, buttonColor, cardSubmitLabel,
257
260
  effectiveSelectedMethod === 'wallet' ? 'is-visible' : '',
258
261
  ]
259
262
  .filter(Boolean)
260
- .join(' '), children: [_jsxs("p", { className: 'shared-checkout-v2-secure-pill', children: [_jsx(SecurityLockIcon, { className: 'shared-checkout-v2-secure-pill-icon' }), secureLabel] }), _jsxs("div", { className: 'shared-checkout-v2-wallet-shell', "aria-label": walletAriaLabel, children: [_jsx(StripeCheckoutExpressCheckoutButton, { amountCents: amountCents, availabilityPaymentMethods: walletPaymentMethods, beforeConfirm: ensureCustomerEmail, className: 'shared-checkout-v2-express-buttons', confirmEmail: customerEmailEditable, customerEmail: resolvedCustomerEmail, customerName: customerName, initialAvailable: initialWalletAvailable, keepInitialAvailableOnReady: initialWalletAvailable === true, onAvailabilityChange: handleWalletAvailabilityChange, onError: setSharedError, onSuccess: onSuccess, options: expressCheckoutOptions, returnUrl: returnUrl, summaryLabel: expressCheckoutSummaryLabel }), _jsx("span", { className: 'shared-checkout-v2-sr-only', children: walletAriaLabel })] })] }), _jsxs("div", { hidden: effectiveSelectedMethod !== 'card', className: [
263
+ .join(' '), children: [_jsxs("p", { className: 'shared-checkout-v2-secure-pill', children: [_jsx(SecurityLockIcon, { className: 'shared-checkout-v2-secure-pill-icon' }), secureLabel] }), _jsxs("div", { className: 'shared-checkout-v2-wallet-shell', "aria-label": walletAriaLabel, children: [_jsx(StripeCheckoutExpressCheckoutButton, { amountCents: amountCents, availabilityPaymentMethods: walletPaymentMethods, beforeConfirm: ensureCustomerEmail, className: 'shared-checkout-v2-express-buttons', confirmEmail: Boolean(resolvedCustomerEmail), customerEmail: resolvedCustomerEmail, customerName: customerName, initialAvailable: initialWalletAvailable, keepInitialAvailableOnReady: initialWalletAvailable === true, onAvailabilityChange: handleWalletAvailabilityChange, onError: setSharedError, onSuccess: onSuccess, options: expressCheckoutOptions, returnUrl: returnUrl, summaryLabel: expressCheckoutSummaryLabel }), _jsx("span", { className: 'shared-checkout-v2-sr-only', children: walletAriaLabel })] })] }), _jsxs("div", { hidden: effectiveSelectedMethod !== 'card', className: [
261
264
  'shared-checkout-v2-card-panel',
262
265
  effectiveSelectedMethod === 'card' ? 'is-visible' : '',
263
266
  ]
@@ -30,6 +30,7 @@ export function useStripeSubscriptionCheckoutSession({ checkoutMode, analyticsMe
30
30
  normalizeRuntimeConfigValue(runtimeConfig === null || runtimeConfig === void 0 ? void 0 : runtimeConfig.funnelVersionId),
31
31
  normalizeRuntimeConfigValue(runtimeConfig === null || runtimeConfig === void 0 ? void 0 : runtimeConfig.funnelSdkPublishableKey),
32
32
  ].join('|');
33
+ const analyticsMetadataSignature = JSON.stringify(analyticsMetadata !== null && analyticsMetadata !== void 0 ? analyticsMetadata : {});
33
34
  const configured = enabled &&
34
35
  (isStripeConfigured(checkoutMode) ||
35
36
  Boolean(normalizeRuntimeConfigValue(runtimeConfig === null || runtimeConfig === void 0 ? void 0 : runtimeConfig.funnelSdkPublishableKey)));
@@ -37,6 +38,7 @@ export function useStripeSubscriptionCheckoutSession({ checkoutMode, analyticsMe
37
38
  'stripe',
38
39
  checkoutMode,
39
40
  runtimeConfigSignature,
41
+ analyticsMetadataSignature,
40
42
  (couponId === null || couponId === void 0 ? void 0 : couponId.trim()) || '',
41
43
  returnUrl.trim(),
42
44
  ].join('|');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funnelsgrove/payments",
3
- "version": "0.1.27",
3
+ "version": "0.1.29",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "main": "./dist/index.js",