@zonos/elements 1.3.147 → 1.3.149
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/cjs/{cart-ff5887f0.js → cart-a19315fd.js} +3 -8
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{paypal-dd767dbc.js → paypal-5d326579.js} +1 -1
- package/dist/cjs/zonos-address_8.cjs.entry.js +1 -1
- package/dist/cjs/zonos-cart-items_13.cjs.entry.js +12 -6
- package/dist/cjs/zonos-checkout.cjs.entry.js +8 -4
- package/dist/cjs/zonos-controller.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +1 -1
- package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +2 -2
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +1 -1
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +10 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +7 -3
- package/dist/collection/components/store/checkout/stripe.js +2 -8
- package/dist/esm/{cart-9de02093.js → cart-260f8518.js} +3 -9
- package/dist/esm/index.js +7 -7
- package/dist/esm/{paypal-1efe64a0.js → paypal-5453a7db.js} +1 -1
- package/dist/esm/zonos-address_8.entry.js +1 -1
- package/dist/esm/zonos-cart-items_13.entry.js +12 -6
- package/dist/esm/zonos-checkout.entry.js +8 -4
- package/dist/esm/zonos-controller.entry.js +1 -1
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_4.entry.js +1 -1
- package/dist/esm/zonos-empty-state-payment_4.entry.js +2 -2
- package/dist/esm/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/{cart-9de02093.js → cart-260f8518.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{paypal-1efe64a0.js → paypal-5453a7db.js} +1 -1
- package/dist/esm-es5/zonos-address_8.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_13.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
- package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-9dd24661.entry.js → p-0728843a.entry.js} +1 -1
- package/dist/zonos-elements/{p-0a0eccae.entry.js → p-08be2f4d.entry.js} +1 -1
- package/dist/zonos-elements/{p-8dc3edd5.system.entry.js → p-1cace07e.system.entry.js} +1 -1
- package/dist/zonos-elements/p-366be853.system.entry.js +1 -0
- package/dist/zonos-elements/{p-ce4e9134.system.js → p-430ac090.system.js} +1 -1
- package/dist/zonos-elements/p-46f6e5e9.system.js +1 -1
- package/dist/zonos-elements/{p-f4929b6e.entry.js → p-50bbb2f5.entry.js} +1 -1
- package/dist/zonos-elements/{p-cfce4fa3.system.entry.js → p-526d2758.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-4b0cb1ce.entry.js → p-7cad853b.entry.js} +1 -1
- package/dist/zonos-elements/{p-da6d01bc.system.entry.js → p-7ccbd8cb.system.entry.js} +1 -1
- package/dist/zonos-elements/p-84bcd390.system.entry.js +1 -0
- package/dist/zonos-elements/{p-afd32c67.system.entry.js → p-85e7f592.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e99dec7d.js → p-92d5df16.js} +1 -1
- package/dist/zonos-elements/{p-00182783.entry.js → p-93eaf4d0.entry.js} +1 -1
- package/dist/zonos-elements/{p-8455a72e.system.entry.js → p-a50c36b5.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-5831e9ba.system.js → p-a5a1a1d9.system.js} +1 -1
- package/dist/zonos-elements/{p-6adea6aa.entry.js → p-c1859837.entry.js} +1 -1
- package/dist/zonos-elements/{p-c8fb55dc.entry.js → p-caf27d12.entry.js} +1 -1
- package/dist/zonos-elements/p-cb4500cc.entry.js +1 -0
- package/dist/zonos-elements/{p-9c6ed828.system.entry.js → p-cc7bcbc2.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-36cd38ba.system.js → p-d512afcf.system.js} +1 -1
- package/dist/zonos-elements/{p-f70b072b.system.entry.js → p-dca47550.system.entry.js} +1 -1
- package/dist/zonos-elements/p-ea5b3c72.js +17 -0
- package/dist/zonos-elements/p-ea866dd3.entry.js +1 -0
- package/dist/zonos-elements/{p-f4958bec.system.entry.js → p-ebe1a0bb.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-fd26a3cc.entry.js → p-fbf89adf.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/zonos-elements/p-056e1930.entry.js +0 -1
- package/dist/zonos-elements/p-4f398271.entry.js +0 -1
- package/dist/zonos-elements/p-5d570a00.system.entry.js +0 -1
- package/dist/zonos-elements/p-9f5789a5.js +0 -17
- package/dist/zonos-elements/p-e3131c5e.system.entry.js +0 -1
|
@@ -11236,6 +11236,8 @@ const stripeStoreGetPaymentIntent = async () => {
|
|
|
11236
11236
|
// update stripe store with updated information
|
|
11237
11237
|
stripeStore.clientSecret =
|
|
11238
11238
|
json.checkoutSessionPaymentIntentCreate.clientSecret;
|
|
11239
|
+
// update cart store checkout session with updated from checkout session payment intent creation call so the checkout session and payment intent are in sync
|
|
11240
|
+
cartStoreSetCheckoutSession(json.checkoutSessionPaymentIntentCreate);
|
|
11239
11241
|
};
|
|
11240
11242
|
/**
|
|
11241
11243
|
* Init checkout session
|
|
@@ -11269,10 +11271,6 @@ const stripeStoreInitCheckoutSession = async () => {
|
|
|
11269
11271
|
});
|
|
11270
11272
|
handleFetch.log('Exchange rate updated for cart items (checkout session create)', 'info', cartStore.exchangeRate);
|
|
11271
11273
|
handleFetch.log('done-init-checkout-session');
|
|
11272
|
-
// get and set payment intent async except for staging mode
|
|
11273
|
-
if (!cartStore.isStagingMode) {
|
|
11274
|
-
void stripeStoreGetPaymentIntent();
|
|
11275
|
-
}
|
|
11276
11274
|
return true;
|
|
11277
11275
|
};
|
|
11278
11276
|
/**
|
|
@@ -11316,10 +11314,6 @@ const stripeStoreUpdateCheckoutSession = async ({ adjustmentsAmount, cartId, cur
|
|
|
11316
11314
|
handleFetch.logError('Error occurs when updating checkout session', JSON.stringify(errors, null, 2));
|
|
11317
11315
|
return { errors, json };
|
|
11318
11316
|
}
|
|
11319
|
-
// get and set payment intent async except for staging mode
|
|
11320
|
-
if (!cartStore.isStagingMode) {
|
|
11321
|
-
void stripeStoreGetPaymentIntent();
|
|
11322
|
-
}
|
|
11323
11317
|
return { errors: [], json };
|
|
11324
11318
|
};
|
|
11325
11319
|
/**
|
|
@@ -11872,6 +11866,7 @@ exports.stripeStoreApplyPromoCode = stripeStoreApplyPromoCode;
|
|
|
11872
11866
|
exports.stripeStoreCleanupDomesticShippingSession = stripeStoreCleanupDomesticShippingSession;
|
|
11873
11867
|
exports.stripeStoreConfirmPayment = stripeStoreConfirmPayment;
|
|
11874
11868
|
exports.stripeStoreGetDomesticShippingSession = stripeStoreGetDomesticShippingSession;
|
|
11869
|
+
exports.stripeStoreGetPaymentIntent = stripeStoreGetPaymentIntent;
|
|
11875
11870
|
exports.stripeStoreHandleInventoryCheck = stripeStoreHandleInventoryCheck;
|
|
11876
11871
|
exports.stripeStoreHandleInventoryRefund = stripeStoreHandleInventoryRefund;
|
|
11877
11872
|
exports.stripeStoreInitCheckoutSession = stripeStoreInitCheckoutSession;
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -129,7 +129,7 @@ const getZonosQaUrl = () => {
|
|
|
129
129
|
return null;
|
|
130
130
|
}
|
|
131
131
|
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
132
|
-
const cdnUrl = "https://v1.3.
|
|
132
|
+
const cdnUrl = "https://v1.3.149.js.zonos.com";
|
|
133
133
|
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
134
134
|
if (!qaUrl &&
|
|
135
135
|
(cdnUrl.includes('test.') ||
|
|
@@ -313,10 +313,10 @@ const zonosLoadUrl = (() => {
|
|
|
313
313
|
}
|
|
314
314
|
return null;
|
|
315
315
|
})();
|
|
316
|
-
const ZONOS_URL = "https://v1.3.
|
|
317
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
318
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
319
|
-
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.
|
|
316
|
+
const ZONOS_URL = "https://v1.3.149.js.zonos.com";
|
|
317
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.149";
|
|
318
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.149";
|
|
319
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.149";
|
|
320
320
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
321
321
|
const GOOGLE_FONT_REGEX = /^https:\/\/fonts\.googleapis\.com/;
|
|
322
322
|
class Zonos {
|
|
@@ -330,7 +330,7 @@ Zonos.zonosConversionTest = typeof window !== 'undefined' &&
|
|
|
330
330
|
!!window.location.search.match(/\?.*(&*)zonosConversionTest/);
|
|
331
331
|
Zonos._paypalMockResponse = null;
|
|
332
332
|
Zonos.isBigCommerce = false;
|
|
333
|
-
Zonos.releaseDate = "
|
|
333
|
+
Zonos.releaseDate = "1736969200575";
|
|
334
334
|
Zonos.isLegacyCheckout = false;
|
|
335
335
|
Zonos.domain = typeof window !== 'undefined'
|
|
336
336
|
? // domain that embeds the iframe
|
|
@@ -346,7 +346,7 @@ Zonos.showBaseForeign = typeof window !== 'undefined' &&
|
|
|
346
346
|
Zonos.isNpm = true;
|
|
347
347
|
Zonos.zonosQaUrl = null;
|
|
348
348
|
Zonos.zonosQaUrlApi = null;
|
|
349
|
-
Zonos.version = `v${"1.3.
|
|
349
|
+
Zonos.version = `v${"1.3.149"}`;
|
|
350
350
|
Zonos.modeAlerted = false;
|
|
351
351
|
Zonos.cartData = null;
|
|
352
352
|
Zonos.paypal = null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const zonosStore = require('./zonosStore-46809186.js');
|
|
4
|
-
const cart = require('./cart-
|
|
4
|
+
const cart = require('./cart-a19315fd.js');
|
|
5
5
|
const handleFetch = require('./handleFetch-3673a0c2.js');
|
|
6
6
|
const isDarkColor = require('./isDarkColor-2acf30d1.js');
|
|
7
7
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-a19315fd.js');
|
|
7
7
|
const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
|
|
8
8
|
const handleFetch = require('./handleFetch-3673a0c2.js');
|
|
9
9
|
const containsNonLatinChars = require('./containsNonLatinChars-2be5129b.js');
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-a19315fd.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
const paypal = require('./paypal-
|
|
8
|
+
const paypal = require('./paypal-5d326579.js');
|
|
9
9
|
const zonosStore = require('./zonosStore-46809186.js');
|
|
10
10
|
const handleFetch = require('./handleFetch-3673a0c2.js');
|
|
11
11
|
const createCustomEvent = require('./createCustomEvent-7b6fad95.js');
|
|
@@ -1387,6 +1387,12 @@ const ZonosCheckoutFinish = class {
|
|
|
1387
1387
|
this.useOverrideSuccessNotification();
|
|
1388
1388
|
// Do nothing, display Zonos success page
|
|
1389
1389
|
this.isLoading = false;
|
|
1390
|
+
if (typeof zonosStore.zonosStore.checkoutSettings.onOrderSuccess === 'function') {
|
|
1391
|
+
/**
|
|
1392
|
+
* Attempt to pull order info even with no redirect behavior need onOrderSuccess to be called. Bigcommerce needs the callback to be called with order id to clear the cart
|
|
1393
|
+
*/
|
|
1394
|
+
await this.getPullOrder();
|
|
1395
|
+
}
|
|
1390
1396
|
break;
|
|
1391
1397
|
}
|
|
1392
1398
|
};
|
|
@@ -1621,17 +1627,17 @@ const ZonosCheckoutFinish = class {
|
|
|
1621
1627
|
}
|
|
1622
1628
|
render() {
|
|
1623
1629
|
const isTestMode = handleFetch.getIsTestMode();
|
|
1624
|
-
return (index.h(index.Host, { key: '
|
|
1630
|
+
return (index.h(index.Host, { key: '83b2f5f6f12dff3ed43382c27d1ed438ba22170f', class: "zonos--checkout-finish zonos--elements", style: {
|
|
1625
1631
|
'--zonos--border-radius': getBorderRadius.getBorderRadius({
|
|
1626
1632
|
overrideBorderStyle: this.borderRadius,
|
|
1627
1633
|
}),
|
|
1628
|
-
} }, !this.isLoading && (index.h("div", { key: '
|
|
1634
|
+
} }, !this.isLoading && (index.h("div", { key: 'caba612654a4895ba6ef43781ca21688c17e32ea', class: "zonos--finish-details" }, index.h("div", { key: 'd18c28b4993f28a2d509b2a9178fed7edfe5de3d', class: "zonos--group" }, this.notificationType === 'success' ? (index.h("zonos-icon", { "aria-label": "Order success", content: SuccessIcon, iconColor: 'blue-800', size: 50 })) : (index.h("zonos-icon", { "aria-label": "Order failed", content: RemoveIcon, iconColor: 'red-800', size: 50 })), index.h("zonos-text", { key: 'af4f9f2178e83d8079950ad44a6b228976e761bc', class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), index.h("zonos-text", { key: 'cc4934a9c86c02d00d381b1d8e3a457ebf4759e3', class: "zonos--subtitle", textColor: "gray-600" }, this.notificationMessages.map(message => (index.h(index.Fragment, null, message, index.h("br", null))))), this.shouldRenderCloseButtonForRedirectBehavior() && (index.h("zonos-button", { key: 'c0f448d9f8fc30d5757714a041b440c48ed8a972',
|
|
1629
1635
|
// Only show loading spinner if it's not an error notification
|
|
1630
1636
|
loading: this.isWaitingToRedirect &&
|
|
1631
1637
|
this.notificationType !== 'error', onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, cart.translate('Close'))), !window.Zonos.isLegacyCheckout &&
|
|
1632
|
-
this.shouldRenderKeepShoppingButton() && (index.h("zonos-button", { key: '
|
|
1638
|
+
this.shouldRenderKeepShoppingButton() && (index.h("zonos-button", { key: '7cd94a0b56dbe608a4c3c9d12c9f9a4fc06c5ec3', onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, this.notificationActionText))), isTestMode &&
|
|
1633
1639
|
cart.cartStore.step === 'finish' &&
|
|
1634
|
-
this.notificationType === 'success' && (index.h("div", { key: '
|
|
1640
|
+
this.notificationType === 'success' && (index.h("div", { key: 'ce7b437229ae19b2a2da2521f8603271ff35af96', class: "zonos--finish-button-wrapper" }, index.h("zonos-button", { key: '9ebb42bb862ffdf8c96c8e8d38174e149ced4d26', backgroundColor: "gray-0", buttonColor: "gray-1000", onClick: () => this.closeClickHandler(), size: "lg", variant: "outline" }, "New test cart"), index.h("zonos-button", { key: '6f9257ad1b3002a373b45ab498271825aea07a00', onClick: () => {
|
|
1635
1641
|
const isZonosDashboard = window.location.hostname.includes('dashboard.zonos.com');
|
|
1636
1642
|
this.redirectToUrl(isZonosDashboard
|
|
1637
1643
|
? '/orders/all'
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const paypal = require('./paypal-
|
|
6
|
+
const cart = require('./cart-a19315fd.js');
|
|
7
|
+
const paypal = require('./paypal-5d326579.js');
|
|
8
8
|
const zonosStore = require('./zonosStore-46809186.js');
|
|
9
9
|
const handleFetch = require('./handleFetch-3673a0c2.js');
|
|
10
10
|
const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
|
|
@@ -503,14 +503,18 @@ const ZonosCheckout = class {
|
|
|
503
503
|
}));
|
|
504
504
|
await cart.cartStoreUpdateItems({ adjustments, cartItems: cartItemsFiltered });
|
|
505
505
|
}
|
|
506
|
-
// if
|
|
507
|
-
if (!cart.
|
|
506
|
+
// if checkoutSessionId is not available, request a new one.
|
|
507
|
+
if (!cart.cartStore.checkoutSessionId) {
|
|
508
508
|
const success = await cart.stripeStoreInitCheckoutSession();
|
|
509
509
|
handleFetch.log(`stripeStoreInitCheckoutSession: ${success}`);
|
|
510
510
|
if (!success) {
|
|
511
511
|
return false;
|
|
512
512
|
}
|
|
513
513
|
}
|
|
514
|
+
// get and set payment intent async except for staging mode
|
|
515
|
+
if (!cart.cartStore.isStagingMode) {
|
|
516
|
+
void cart.stripeStoreGetPaymentIntent();
|
|
517
|
+
}
|
|
514
518
|
// apply theme to stripe elements
|
|
515
519
|
await this.applyStripeTheme();
|
|
516
520
|
this.isRedirectAfterOrder =
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-a19315fd.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-46809186.js');
|
|
8
8
|
const handleFetch = require('./handleFetch-3673a0c2.js');
|
|
9
9
|
require('./isDarkColor-2acf30d1.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-a19315fd.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-46809186.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
9
|
require('./handleFetch-3673a0c2.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-a19315fd.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-46809186.js');
|
|
8
8
|
const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
|
|
9
9
|
const isDarkColor = require('./isDarkColor-2acf30d1.js');
|
|
@@ -6,9 +6,9 @@ const index = require('./index-2f90486e.js');
|
|
|
6
6
|
const zonosStore = require('./zonosStore-46809186.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
8
|
const getBorderRadius = require('./getBorderRadius-7d0772bf.js');
|
|
9
|
-
const cart = require('./cart-
|
|
9
|
+
const cart = require('./cart-a19315fd.js');
|
|
10
10
|
const handleFetch = require('./handleFetch-3673a0c2.js');
|
|
11
|
-
const paypal = require('./paypal-
|
|
11
|
+
const paypal = require('./paypal-5d326579.js');
|
|
12
12
|
require('./isDarkColor-2acf30d1.js');
|
|
13
13
|
|
|
14
14
|
const PaymentEmptyStateDarkIcon = `<svg width="536" height="200" viewBox="0 0 536 200" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-a19315fd.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-46809186.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
9
|
const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
6
|
const zonosStore = require('./zonosStore-46809186.js');
|
|
7
|
-
const cart = require('./cart-
|
|
7
|
+
const cart = require('./cart-a19315fd.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
9
|
const handleFetch = require('./handleFetch-3673a0c2.js');
|
|
10
10
|
const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-4c94667f.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-a19315fd.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-46809186.js');
|
|
8
8
|
const ILanguage = require('./ILanguage-98b04442.js');
|
|
9
9
|
require('./handleFetch-3673a0c2.js');
|
|
@@ -132,6 +132,12 @@ export class ZonosCheckoutFinish {
|
|
|
132
132
|
this.useOverrideSuccessNotification();
|
|
133
133
|
// Do nothing, display Zonos success page
|
|
134
134
|
this.isLoading = false;
|
|
135
|
+
if (typeof zonosStore.checkoutSettings.onOrderSuccess === 'function') {
|
|
136
|
+
/**
|
|
137
|
+
* Attempt to pull order info even with no redirect behavior need onOrderSuccess to be called. Bigcommerce needs the callback to be called with order id to clear the cart
|
|
138
|
+
*/
|
|
139
|
+
await this.getPullOrder();
|
|
140
|
+
}
|
|
135
141
|
break;
|
|
136
142
|
}
|
|
137
143
|
};
|
|
@@ -366,17 +372,17 @@ export class ZonosCheckoutFinish {
|
|
|
366
372
|
}
|
|
367
373
|
render() {
|
|
368
374
|
const isTestMode = getIsTestMode();
|
|
369
|
-
return (h(Host, { key: '
|
|
375
|
+
return (h(Host, { key: '83b2f5f6f12dff3ed43382c27d1ed438ba22170f', class: "zonos--checkout-finish zonos--elements", style: {
|
|
370
376
|
'--zonos--border-radius': getBorderRadius({
|
|
371
377
|
overrideBorderStyle: this.borderRadius,
|
|
372
378
|
}),
|
|
373
|
-
} }, !this.isLoading && (h("div", { key: '
|
|
379
|
+
} }, !this.isLoading && (h("div", { key: 'caba612654a4895ba6ef43781ca21688c17e32ea', class: "zonos--finish-details" }, h("div", { key: 'd18c28b4993f28a2d509b2a9178fed7edfe5de3d', class: "zonos--group" }, this.notificationType === 'success' ? (h("zonos-icon", { "aria-label": "Order success", content: SuccessIcon, iconColor: 'blue-800', size: 50 })) : (h("zonos-icon", { "aria-label": "Order failed", content: RemoveIcon, iconColor: 'red-800', size: 50 })), h("zonos-text", { key: 'af4f9f2178e83d8079950ad44a6b228976e761bc', class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), h("zonos-text", { key: 'cc4934a9c86c02d00d381b1d8e3a457ebf4759e3', class: "zonos--subtitle", textColor: "gray-600" }, this.notificationMessages.map(message => (h(Fragment, null, message, h("br", null))))), this.shouldRenderCloseButtonForRedirectBehavior() && (h("zonos-button", { key: 'c0f448d9f8fc30d5757714a041b440c48ed8a972',
|
|
374
380
|
// Only show loading spinner if it's not an error notification
|
|
375
381
|
loading: this.isWaitingToRedirect &&
|
|
376
382
|
this.notificationType !== 'error', onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, translate('Close'))), !window.Zonos.isLegacyCheckout &&
|
|
377
|
-
this.shouldRenderKeepShoppingButton() && (h("zonos-button", { key: '
|
|
383
|
+
this.shouldRenderKeepShoppingButton() && (h("zonos-button", { key: '7cd94a0b56dbe608a4c3c9d12c9f9a4fc06c5ec3', onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, this.notificationActionText))), isTestMode &&
|
|
378
384
|
cartStore.step === 'finish' &&
|
|
379
|
-
this.notificationType === 'success' && (h("div", { key: '
|
|
385
|
+
this.notificationType === 'success' && (h("div", { key: 'ce7b437229ae19b2a2da2521f8603271ff35af96', class: "zonos--finish-button-wrapper" }, h("zonos-button", { key: '9ebb42bb862ffdf8c96c8e8d38174e149ced4d26', backgroundColor: "gray-0", buttonColor: "gray-1000", onClick: () => this.closeClickHandler(), size: "lg", variant: "outline" }, "New test cart"), h("zonos-button", { key: '6f9257ad1b3002a373b45ab498271825aea07a00', onClick: () => {
|
|
380
386
|
const isZonosDashboard = window.location.hostname.includes('dashboard.zonos.com');
|
|
381
387
|
this.redirectToUrl(isZonosDashboard
|
|
382
388
|
? '/orders/all'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Fragment, h, Host, } from "@stencil/core";
|
|
2
2
|
import { cartStore, cartStoreClearCheckoutInterval, cartStoreNextStep, cartStoreReset, cartStoreResetTabItems, cartStoreSetCheckoutSession, cartStoreStartCheckoutInterval, cartStoreUpdateItems, cartStoreUpdateToErrorState, } from "../../store/checkout/cart";
|
|
3
3
|
import { paypalInitScript, paypalStore, paypalStoreHasPaypalEnabled, } from "../../store/checkout/paypal";
|
|
4
|
-
import { getCheckoutSessionBody, initStripeElements, stripeStore, stripeStoreCleanupDomesticShippingSession, stripeStoreConfirmPayment, stripeStoreHandleInventoryCheck, stripeStoreHandleInventoryRefund, stripeStoreInitCheckoutSession, stripeStorePrefetchLandedCost, stripeStoreReset, stripeStoreRetrievePayment, } from "../../store/checkout/stripe";
|
|
4
|
+
import { getCheckoutSessionBody, initStripeElements, stripeStore, stripeStoreCleanupDomesticShippingSession, stripeStoreConfirmPayment, stripeStoreGetPaymentIntent, stripeStoreHandleInventoryCheck, stripeStoreHandleInventoryRefund, stripeStoreInitCheckoutSession, stripeStorePrefetchLandedCost, stripeStoreReset, stripeStoreRetrievePayment, } from "../../store/checkout/stripe";
|
|
5
5
|
import { localizationStore, localizationStoreOnUpdate, } from "../../store/hello/localization";
|
|
6
6
|
import { translate } from "../../store/translationStore";
|
|
7
7
|
import { getZonosStoreTheme, zonosStore, } from "../../store/zonosStore";
|
|
@@ -293,14 +293,18 @@ export class ZonosCheckout {
|
|
|
293
293
|
}));
|
|
294
294
|
await cartStoreUpdateItems({ adjustments, cartItems: cartItemsFiltered });
|
|
295
295
|
}
|
|
296
|
-
// if
|
|
297
|
-
if (!
|
|
296
|
+
// if checkoutSessionId is not available, request a new one.
|
|
297
|
+
if (!cartStore.checkoutSessionId) {
|
|
298
298
|
const success = await stripeStoreInitCheckoutSession();
|
|
299
299
|
log(`stripeStoreInitCheckoutSession: ${success}`);
|
|
300
300
|
if (!success) {
|
|
301
301
|
return false;
|
|
302
302
|
}
|
|
303
303
|
}
|
|
304
|
+
// get and set payment intent async except for staging mode
|
|
305
|
+
if (!cartStore.isStagingMode) {
|
|
306
|
+
void stripeStoreGetPaymentIntent();
|
|
307
|
+
}
|
|
304
308
|
// apply theme to stripe elements
|
|
305
309
|
await this.applyStripeTheme();
|
|
306
310
|
this.isRedirectAfterOrder =
|
|
@@ -615,6 +615,8 @@ const stripeStoreGetPaymentIntent = async () => {
|
|
|
615
615
|
// update stripe store with updated information
|
|
616
616
|
stripeStore.clientSecret =
|
|
617
617
|
json.checkoutSessionPaymentIntentCreate.clientSecret;
|
|
618
|
+
// update cart store checkout session with updated from checkout session payment intent creation call so the checkout session and payment intent are in sync
|
|
619
|
+
cartStoreSetCheckoutSession(json.checkoutSessionPaymentIntentCreate);
|
|
618
620
|
};
|
|
619
621
|
/**
|
|
620
622
|
* Init checkout session
|
|
@@ -648,10 +650,6 @@ const stripeStoreInitCheckoutSession = async () => {
|
|
|
648
650
|
});
|
|
649
651
|
log('Exchange rate updated for cart items (checkout session create)', 'info', cartStore.exchangeRate);
|
|
650
652
|
log('done-init-checkout-session');
|
|
651
|
-
// get and set payment intent async except for staging mode
|
|
652
|
-
if (!cartStore.isStagingMode) {
|
|
653
|
-
void stripeStoreGetPaymentIntent();
|
|
654
|
-
}
|
|
655
653
|
return true;
|
|
656
654
|
};
|
|
657
655
|
/**
|
|
@@ -695,10 +693,6 @@ const stripeStoreUpdateCheckoutSession = async ({ adjustmentsAmount, cartId, cur
|
|
|
695
693
|
logError('Error occurs when updating checkout session', JSON.stringify(errors, null, 2));
|
|
696
694
|
return { errors, json };
|
|
697
695
|
}
|
|
698
|
-
// get and set payment intent async except for staging mode
|
|
699
|
-
if (!cartStore.isStagingMode) {
|
|
700
|
-
void stripeStoreGetPaymentIntent();
|
|
701
|
-
}
|
|
702
696
|
return { errors: [], json };
|
|
703
697
|
};
|
|
704
698
|
/**
|
|
@@ -11234,6 +11234,8 @@ const stripeStoreGetPaymentIntent = async () => {
|
|
|
11234
11234
|
// update stripe store with updated information
|
|
11235
11235
|
stripeStore.clientSecret =
|
|
11236
11236
|
json.checkoutSessionPaymentIntentCreate.clientSecret;
|
|
11237
|
+
// update cart store checkout session with updated from checkout session payment intent creation call so the checkout session and payment intent are in sync
|
|
11238
|
+
cartStoreSetCheckoutSession(json.checkoutSessionPaymentIntentCreate);
|
|
11237
11239
|
};
|
|
11238
11240
|
/**
|
|
11239
11241
|
* Init checkout session
|
|
@@ -11267,10 +11269,6 @@ const stripeStoreInitCheckoutSession = async () => {
|
|
|
11267
11269
|
});
|
|
11268
11270
|
log('Exchange rate updated for cart items (checkout session create)', 'info', cartStore.exchangeRate);
|
|
11269
11271
|
log('done-init-checkout-session');
|
|
11270
|
-
// get and set payment intent async except for staging mode
|
|
11271
|
-
if (!cartStore.isStagingMode) {
|
|
11272
|
-
void stripeStoreGetPaymentIntent();
|
|
11273
|
-
}
|
|
11274
11272
|
return true;
|
|
11275
11273
|
};
|
|
11276
11274
|
/**
|
|
@@ -11314,10 +11312,6 @@ const stripeStoreUpdateCheckoutSession = async ({ adjustmentsAmount, cartId, cur
|
|
|
11314
11312
|
logError('Error occurs when updating checkout session', JSON.stringify(errors, null, 2));
|
|
11315
11313
|
return { errors, json };
|
|
11316
11314
|
}
|
|
11317
|
-
// get and set payment intent async except for staging mode
|
|
11318
|
-
if (!cartStore.isStagingMode) {
|
|
11319
|
-
void stripeStoreGetPaymentIntent();
|
|
11320
|
-
}
|
|
11321
11315
|
return { errors: [], json };
|
|
11322
11316
|
};
|
|
11323
11317
|
/**
|
|
@@ -11837,4 +11831,4 @@ const cartStoreResetTabItems = () => {
|
|
|
11837
11831
|
cartStoreResetSelectedShippingOption();
|
|
11838
11832
|
};
|
|
11839
11833
|
|
|
11840
|
-
export {
|
|
11834
|
+
export { stripeStoreHandleInventoryRefund as A, stripeStoreReset as B, localizationStoreOnUpdate as C, validateCheckoutSession as D, isValidSelector as E, initLocalizationStore as F, setZCountryUrlParam as G, currencyDisplay as H, currencyConvertAndFormat as I, currencyConvert as J, currencyFormat as K, cartStoreHasOneEligibleItem as L, stripeStoreApplyPromoCode as M, stripeStoreRemovePromoCode as N, stripeStoreResetPromoCode as O, stripeStoreMessageBasedOnStatus as P, stripeStoreTranslateAddressToLatin as Q, cartStoreUpdateSelectedShippingOption as R, cartStoreGetShippingTransitInfo as S, sortServiceLevelOptionsByAmount as T, getFallbackDefaultCountryCode as U, localizationStoreUpdateSelectedLocale as V, localizationStoreUpdateSelectedCountryCode as a, stripeStoreCleanupDomesticShippingSession as b, stripeStoreSaveDomesticShippingSession as c, stripeStoreRetrievePayment as d, cartStore as e, stripeStore as f, cartStoreUpdateItems as g, cartStoreReset as h, initStripeElements as i, cartStoreResetTabItems as j, cartStoreClearCheckoutInterval as k, localizationStore as l, stripeStoreInitCheckoutSession as m, stripeStoreGetPaymentIntent as n, cartStoreStartCheckoutInterval as o, getCheckoutSessionBody as p, cartStoreUpdateToErrorState as q, translate as r, stripeStoreGetDomesticShippingSession as s, trackConversionEvent as t, getZCountryUrlParam as u, cartStoreSetCheckoutSession as v, stripeStorePrefetchLandedCost as w, cartStoreNextStep as x, stripeStoreHandleInventoryCheck as y, stripeStoreConfirmPayment as z };
|
package/dist/esm/index.js
CHANGED
|
@@ -126,7 +126,7 @@ const getZonosQaUrl = () => {
|
|
|
126
126
|
return null;
|
|
127
127
|
}
|
|
128
128
|
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
129
|
-
const cdnUrl = "https://v1.3.
|
|
129
|
+
const cdnUrl = "https://v1.3.149.js.zonos.com";
|
|
130
130
|
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
131
131
|
if (!qaUrl &&
|
|
132
132
|
(cdnUrl.includes('test.') ||
|
|
@@ -310,10 +310,10 @@ const zonosLoadUrl = (() => {
|
|
|
310
310
|
}
|
|
311
311
|
return null;
|
|
312
312
|
})();
|
|
313
|
-
const ZONOS_URL = "https://v1.3.
|
|
314
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
315
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
316
|
-
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.
|
|
313
|
+
const ZONOS_URL = "https://v1.3.149.js.zonos.com";
|
|
314
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.149";
|
|
315
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.149";
|
|
316
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.149";
|
|
317
317
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
318
318
|
const GOOGLE_FONT_REGEX = /^https:\/\/fonts\.googleapis\.com/;
|
|
319
319
|
class Zonos {
|
|
@@ -327,7 +327,7 @@ Zonos.zonosConversionTest = typeof window !== 'undefined' &&
|
|
|
327
327
|
!!window.location.search.match(/\?.*(&*)zonosConversionTest/);
|
|
328
328
|
Zonos._paypalMockResponse = null;
|
|
329
329
|
Zonos.isBigCommerce = false;
|
|
330
|
-
Zonos.releaseDate = "
|
|
330
|
+
Zonos.releaseDate = "1736969200575";
|
|
331
331
|
Zonos.isLegacyCheckout = false;
|
|
332
332
|
Zonos.domain = typeof window !== 'undefined'
|
|
333
333
|
? // domain that embeds the iframe
|
|
@@ -343,7 +343,7 @@ Zonos.showBaseForeign = typeof window !== 'undefined' &&
|
|
|
343
343
|
Zonos.isNpm = true;
|
|
344
344
|
Zonos.zonosQaUrl = null;
|
|
345
345
|
Zonos.zonosQaUrlApi = null;
|
|
346
|
-
Zonos.version = `v${"1.3.
|
|
346
|
+
Zonos.version = `v${"1.3.149"}`;
|
|
347
347
|
Zonos.modeAlerted = false;
|
|
348
348
|
Zonos.cartData = null;
|
|
349
349
|
Zonos.paypal = null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z as zonosStore, c as createStore } from './zonosStore-44efd080.js';
|
|
2
|
-
import {
|
|
2
|
+
import { D as validateCheckoutSession, f as stripeStore, e as cartStore, y as stripeStoreHandleInventoryCheck, r as translate, x as cartStoreNextStep, k as cartStoreClearCheckoutInterval } from './cart-260f8518.js';
|
|
3
3
|
import { h as handleFetch, l as log, b as logError, j as jsonParse } from './handleFetch-b4633675.js';
|
|
4
4
|
import { t as tinycolor } from './isDarkColor-10f38df6.js';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, d as getElement } from './index-d82f06f2.js';
|
|
2
|
-
import { f as stripeStore,
|
|
2
|
+
import { f as stripeStore, U as getFallbackDefaultCountryCode, l as localizationStore, r as translate, e as cartStore } from './cart-260f8518.js';
|
|
3
3
|
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
4
4
|
import { b as logError, l as log } from './handleFetch-b4633675.js';
|
|
5
5
|
import { i as isTextContainsNonLatinChars, c as containsNonLatinChars } from './containsNonLatinChars-2d8810c3.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, a as getAssetPath, h, H as Host, F as Fragment, c as createEvent, d as getElement } from './index-d82f06f2.js';
|
|
2
|
-
import { e as cartStore,
|
|
2
|
+
import { e as cartStore, K as currencyFormat, r as translate, L as cartStoreHasOneEligibleItem, M as stripeStoreApplyPromoCode, N as stripeStoreRemovePromoCode, f as stripeStore, B as stripeStoreReset, d as stripeStoreRetrievePayment, t as trackConversionEvent, O as stripeStoreResetPromoCode, P as stripeStoreMessageBasedOnStatus, l as localizationStore, x as cartStoreNextStep, Q as stripeStoreTranslateAddressToLatin, R as cartStoreUpdateSelectedShippingOption, S as cartStoreGetShippingTransitInfo, T as sortServiceLevelOptionsByAmount } from './cart-260f8518.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
|
-
import { s as submitGtag, c as paypalStoreReset, b as paypalStore, i as isContrastColor } from './paypal-
|
|
4
|
+
import { s as submitGtag, c as paypalStoreReset, b as paypalStore, i as isContrastColor } from './paypal-5453a7db.js';
|
|
5
5
|
import { z as zonosStore, g as getZonosStoreTheme, d as zonosStoreFontFamily } from './zonosStore-44efd080.js';
|
|
6
6
|
import { h as handleFetch, l as log, s as sendErrorLog, j as jsonParse, g as getIsTestMode, d as allLogs, b as logError, a as getIsStagingMode } from './handleFetch-b4633675.js';
|
|
7
7
|
import { c as createCustomEvent } from './createCustomEvent-58159025.js';
|
|
@@ -1383,6 +1383,12 @@ const ZonosCheckoutFinish = class {
|
|
|
1383
1383
|
this.useOverrideSuccessNotification();
|
|
1384
1384
|
// Do nothing, display Zonos success page
|
|
1385
1385
|
this.isLoading = false;
|
|
1386
|
+
if (typeof zonosStore.checkoutSettings.onOrderSuccess === 'function') {
|
|
1387
|
+
/**
|
|
1388
|
+
* Attempt to pull order info even with no redirect behavior need onOrderSuccess to be called. Bigcommerce needs the callback to be called with order id to clear the cart
|
|
1389
|
+
*/
|
|
1390
|
+
await this.getPullOrder();
|
|
1391
|
+
}
|
|
1386
1392
|
break;
|
|
1387
1393
|
}
|
|
1388
1394
|
};
|
|
@@ -1617,17 +1623,17 @@ const ZonosCheckoutFinish = class {
|
|
|
1617
1623
|
}
|
|
1618
1624
|
render() {
|
|
1619
1625
|
const isTestMode = getIsTestMode();
|
|
1620
|
-
return (h(Host, { key: '
|
|
1626
|
+
return (h(Host, { key: '83b2f5f6f12dff3ed43382c27d1ed438ba22170f', class: "zonos--checkout-finish zonos--elements", style: {
|
|
1621
1627
|
'--zonos--border-radius': getBorderRadius({
|
|
1622
1628
|
overrideBorderStyle: this.borderRadius,
|
|
1623
1629
|
}),
|
|
1624
|
-
} }, !this.isLoading && (h("div", { key: '
|
|
1630
|
+
} }, !this.isLoading && (h("div", { key: 'caba612654a4895ba6ef43781ca21688c17e32ea', class: "zonos--finish-details" }, h("div", { key: 'd18c28b4993f28a2d509b2a9178fed7edfe5de3d', class: "zonos--group" }, this.notificationType === 'success' ? (h("zonos-icon", { "aria-label": "Order success", content: SuccessIcon, iconColor: 'blue-800', size: 50 })) : (h("zonos-icon", { "aria-label": "Order failed", content: RemoveIcon, iconColor: 'red-800', size: 50 })), h("zonos-text", { key: 'af4f9f2178e83d8079950ad44a6b228976e761bc', class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), h("zonos-text", { key: 'cc4934a9c86c02d00d381b1d8e3a457ebf4759e3', class: "zonos--subtitle", textColor: "gray-600" }, this.notificationMessages.map(message => (h(Fragment, null, message, h("br", null))))), this.shouldRenderCloseButtonForRedirectBehavior() && (h("zonos-button", { key: 'c0f448d9f8fc30d5757714a041b440c48ed8a972',
|
|
1625
1631
|
// Only show loading spinner if it's not an error notification
|
|
1626
1632
|
loading: this.isWaitingToRedirect &&
|
|
1627
1633
|
this.notificationType !== 'error', onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, translate('Close'))), !window.Zonos.isLegacyCheckout &&
|
|
1628
|
-
this.shouldRenderKeepShoppingButton() && (h("zonos-button", { key: '
|
|
1634
|
+
this.shouldRenderKeepShoppingButton() && (h("zonos-button", { key: '7cd94a0b56dbe608a4c3c9d12c9f9a4fc06c5ec3', onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, this.notificationActionText))), isTestMode &&
|
|
1629
1635
|
cartStore.step === 'finish' &&
|
|
1630
|
-
this.notificationType === 'success' && (h("div", { key: '
|
|
1636
|
+
this.notificationType === 'success' && (h("div", { key: 'ce7b437229ae19b2a2da2521f8603271ff35af96', class: "zonos--finish-button-wrapper" }, h("zonos-button", { key: '9ebb42bb862ffdf8c96c8e8d38174e149ced4d26', backgroundColor: "gray-0", buttonColor: "gray-1000", onClick: () => this.closeClickHandler(), size: "lg", variant: "outline" }, "New test cart"), h("zonos-button", { key: '6f9257ad1b3002a373b45ab498271825aea07a00', onClick: () => {
|
|
1631
1637
|
const isZonosDashboard = window.location.hostname.includes('dashboard.zonos.com');
|
|
1632
1638
|
this.redirectToUrl(isZonosDashboard
|
|
1633
1639
|
? '/orders/all'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, F as Fragment } from './index-d82f06f2.js';
|
|
2
|
-
import { l as localizationStore, s as stripeStoreGetDomesticShippingSession, a as localizationStoreUpdateSelectedCountryCode, b as stripeStoreCleanupDomesticShippingSession, c as stripeStoreSaveDomesticShippingSession, i as initStripeElements, d as stripeStoreRetrievePayment, e as cartStore, f as stripeStore, g as cartStoreUpdateItems, h as cartStoreReset, j as cartStoreResetTabItems, k as cartStoreClearCheckoutInterval, m as stripeStoreInitCheckoutSession, n as cartStoreStartCheckoutInterval, t as trackConversionEvent,
|
|
3
|
-
import { p as paypalStoreHasPaypalEnabled, s as submitGtag, a as paypalInitScript, b as paypalStore } from './paypal-
|
|
2
|
+
import { l as localizationStore, s as stripeStoreGetDomesticShippingSession, a as localizationStoreUpdateSelectedCountryCode, b as stripeStoreCleanupDomesticShippingSession, c as stripeStoreSaveDomesticShippingSession, i as initStripeElements, d as stripeStoreRetrievePayment, e as cartStore, f as stripeStore, g as cartStoreUpdateItems, h as cartStoreReset, j as cartStoreResetTabItems, k as cartStoreClearCheckoutInterval, m as stripeStoreInitCheckoutSession, n as stripeStoreGetPaymentIntent, o as cartStoreStartCheckoutInterval, t as trackConversionEvent, p as getCheckoutSessionBody, q as cartStoreUpdateToErrorState, r as translate, u as getZCountryUrlParam, v as cartStoreSetCheckoutSession, w as stripeStorePrefetchLandedCost, x as cartStoreNextStep, y as stripeStoreHandleInventoryCheck, z as stripeStoreConfirmPayment, A as stripeStoreHandleInventoryRefund, B as stripeStoreReset, C as localizationStoreOnUpdate } from './cart-260f8518.js';
|
|
3
|
+
import { p as paypalStoreHasPaypalEnabled, s as submitGtag, a as paypalInitScript, b as paypalStore } from './paypal-5453a7db.js';
|
|
4
4
|
import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-44efd080.js';
|
|
5
5
|
import { h as handleFetch, l as log, b as logError, s as sendErrorLog, c as getElapsedTime, d as allLogs, g as getIsTestMode, j as jsonParse, a as getIsStagingMode } from './handleFetch-b4633675.js';
|
|
6
6
|
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
@@ -499,14 +499,18 @@ const ZonosCheckout = class {
|
|
|
499
499
|
}));
|
|
500
500
|
await cartStoreUpdateItems({ adjustments, cartItems: cartItemsFiltered });
|
|
501
501
|
}
|
|
502
|
-
// if
|
|
503
|
-
if (!
|
|
502
|
+
// if checkoutSessionId is not available, request a new one.
|
|
503
|
+
if (!cartStore.checkoutSessionId) {
|
|
504
504
|
const success = await stripeStoreInitCheckoutSession();
|
|
505
505
|
log(`stripeStoreInitCheckoutSession: ${success}`);
|
|
506
506
|
if (!success) {
|
|
507
507
|
return false;
|
|
508
508
|
}
|
|
509
509
|
}
|
|
510
|
+
// get and set payment intent async except for staging mode
|
|
511
|
+
if (!cartStore.isStagingMode) {
|
|
512
|
+
void stripeStoreGetPaymentIntent();
|
|
513
|
+
}
|
|
510
514
|
// apply theme to stripe elements
|
|
511
515
|
await this.applyStripeTheme();
|
|
512
516
|
this.isRedirectAfterOrder =
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-d82f06f2.js';
|
|
2
|
-
import {
|
|
2
|
+
import { E as isValidSelector, f as stripeStore, F as initLocalizationStore, e as cartStore, a as localizationStoreUpdateSelectedCountryCode } from './cart-260f8518.js';
|
|
3
3
|
import { z as zonosStore, b as zonosStoreInitSetting, d as zonosStoreFontFamily } from './zonosStore-44efd080.js';
|
|
4
4
|
import { h as handleFetch, b as logError, l as log } from './handleFetch-b4633675.js';
|
|
5
5
|
import './isDarkColor-10f38df6.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, d as getElement } from './index-d82f06f2.js';
|
|
2
|
-
import { l as localizationStore } from './cart-
|
|
2
|
+
import { l as localizationStore } from './cart-260f8518.js';
|
|
3
3
|
import { d as zonosStoreFontFamily } from './zonosStore-44efd080.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
5
|
import './handleFetch-b4633675.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, d as getElement } from './index-d82f06f2.js';
|
|
2
|
-
import { a as localizationStoreUpdateSelectedCountryCode,
|
|
2
|
+
import { a as localizationStoreUpdateSelectedCountryCode, r as translate, l as localizationStore } from './cart-260f8518.js';
|
|
3
3
|
import { d as zonosStoreFontFamily } from './zonosStore-44efd080.js';
|
|
4
4
|
import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
|
|
5
5
|
import { i as isDarkColor } from './isDarkColor-10f38df6.js';
|
|
@@ -2,9 +2,9 @@ import { r as registerInstance, h, H as Host, d as getElement, c as createEvent
|
|
|
2
2
|
import { d as zonosStoreFontFamily } from './zonosStore-44efd080.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
4
|
import { g as getBorderRadius } from './getBorderRadius-b32d4218.js';
|
|
5
|
-
import { f as stripeStore } from './cart-
|
|
5
|
+
import { f as stripeStore } from './cart-260f8518.js';
|
|
6
6
|
import { b as logError, l as log } from './handleFetch-b4633675.js';
|
|
7
|
-
import { d as paypalStoreInitButtons } from './paypal-
|
|
7
|
+
import { d as paypalStoreInitButtons } from './paypal-5453a7db.js';
|
|
8
8
|
import './isDarkColor-10f38df6.js';
|
|
9
9
|
|
|
10
10
|
const PaymentEmptyStateDarkIcon = `<svg width="536" height="200" viewBox="0 0 536 200" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host } from './index-d82f06f2.js';
|
|
2
|
-
import {
|
|
2
|
+
import { r as translate, l as localizationStore, K as currencyFormat } from './cart-260f8518.js';
|
|
3
3
|
import { z as zonosStore } from './zonosStore-44efd080.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
5
|
import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
|