@zonos/elements 1.3.118 → 1.3.120
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/{CheckoutConfig-f2622b6b.js → CheckoutConfig-222be92b.js} +1 -1
- package/dist/cjs/{cart-b3f6a451.js → cart-ae361111.js} +7 -1
- package/dist/cjs/{handleFetch-aa729c61.js → handleFetch-bd39d5cc.js} +4 -1
- package/dist/cjs/index.cjs.js +9 -9
- package/dist/cjs/{paypal-aab541fd.js → paypal-435e221c.js} +2 -2
- package/dist/cjs/zonos-address_7.cjs.entry.js +2 -2
- package/dist/cjs/zonos-cart-items_13.cjs.entry.js +12 -6
- package/dist/cjs/zonos-checkout.cjs.entry.js +5 -4
- package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +2 -2
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
- package/dist/cjs/zonos-hello.cjs.entry.js +2 -2
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +2 -2
- package/dist/cjs/zonos-notification_3.cjs.entry.js +3 -3
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +9 -3
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +1 -0
- package/dist/collection/components/store/checkout/cart.js +5 -0
- package/dist/collection/components/store/checkout/stripe.js +1 -0
- package/dist/collection/components/utils/handleFetch.js +4 -1
- package/dist/esm/{CheckoutConfig-018263e2.js → CheckoutConfig-f3f1d468.js} +1 -1
- package/dist/esm/{cart-fdaeeb8d.js → cart-b3faa2e6.js} +7 -1
- package/dist/esm/{handleFetch-3dea7d46.js → handleFetch-752697c2.js} +4 -1
- package/dist/esm/index.js +10 -10
- package/dist/esm/{paypal-fb68deeb.js → paypal-d5955b3d.js} +2 -2
- package/dist/esm/zonos-address_7.entry.js +2 -2
- package/dist/esm/zonos-cart-items_13.entry.js +12 -6
- package/dist/esm/zonos-checkout.entry.js +5 -4
- package/dist/esm/zonos-controller.entry.js +2 -2
- package/dist/esm/zonos-country-flag.entry.js +2 -2
- package/dist/esm/zonos-country-select_4.entry.js +2 -2
- package/dist/esm/zonos-hello-dialog.entry.js +2 -2
- package/dist/esm/zonos-hello.entry.js +2 -2
- package/dist/esm/zonos-language-select_2.entry.js +2 -2
- package/dist/esm/zonos-notification_3.entry.js +3 -3
- package/dist/esm-es5/{CheckoutConfig-018263e2.js → CheckoutConfig-f3f1d468.js} +1 -1
- package/dist/esm-es5/{cart-fdaeeb8d.js → cart-b3faa2e6.js} +1 -1
- package/dist/esm-es5/{handleFetch-3dea7d46.js → handleFetch-752697c2.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{paypal-fb68deeb.js → paypal-d5955b3d.js} +1 -1
- package/dist/esm-es5/zonos-address_7.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-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/esm-es5/zonos-notification_3.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/assets/RemoveIcon.svg +1 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-3dacae53.system.entry.js → p-1366ed16.system.entry.js} +1 -1
- package/dist/zonos-elements/p-29fe2c4b.entry.js +1 -0
- package/dist/zonos-elements/{p-2628189b.js → p-2d28546f.js} +1 -1
- package/dist/zonos-elements/{p-41b8f283.entry.js → p-2ee60347.entry.js} +1 -1
- package/dist/zonos-elements/{p-8b6293a0.system.entry.js → p-39e703fc.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c325fd7b.entry.js → p-3eff7fa5.entry.js} +1 -1
- package/dist/zonos-elements/{p-6b52ae05.entry.js → p-681d9ad8.entry.js} +1 -1
- package/dist/zonos-elements/{p-dd8fb969.js → p-6a7a8af4.js} +1 -1
- package/dist/zonos-elements/{p-43b3c2ae.system.js → p-6cbcdee3.system.js} +1 -1
- package/dist/zonos-elements/{p-d96360ad.system.js → p-6d654e6b.system.js} +1 -1
- package/dist/zonos-elements/{p-30b1eae9.entry.js → p-8c177526.entry.js} +1 -1
- package/dist/zonos-elements/{p-579932dc.system.js → p-8c3ee8d2.system.js} +2 -2
- package/dist/zonos-elements/{p-f8c88d80.entry.js → p-8fa35500.entry.js} +1 -1
- package/dist/zonos-elements/{p-60e5a6a2.system.entry.js → p-90c14606.system.entry.js} +1 -1
- package/dist/zonos-elements/p-93aef7e7.system.entry.js +1 -0
- package/dist/zonos-elements/{p-b82e527a.entry.js → p-9664f0a7.entry.js} +1 -1
- package/dist/zonos-elements/{p-6e2f4ea1.system.js → p-9b5f28ba.system.js} +1 -1
- package/dist/zonos-elements/{p-383f6e8c.system.entry.js → p-a5789801.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3a410b06.system.entry.js → p-a9646d31.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-15fbb3a5.entry.js → p-aaf4c09d.entry.js} +1 -1
- package/dist/zonos-elements/{p-fbedb337.system.js → p-acd4cf3c.system.js} +1 -1
- package/dist/zonos-elements/{p-f1a5d662.system.entry.js → p-b251cd5d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9e757bf5.system.entry.js → p-bb6a0fdd.system.entry.js} +1 -1
- package/dist/zonos-elements/p-bfc4b34b.entry.js +1 -0
- package/dist/zonos-elements/{p-9eae2294.js → p-c0fc4490.js} +1 -1
- package/dist/zonos-elements/{p-93626c76.entry.js → p-c3e74351.entry.js} +1 -1
- package/dist/zonos-elements/p-c78dd680.system.js +1 -1
- package/dist/zonos-elements/{p-0c57d568.system.entry.js → p-d13ddc1f.system.entry.js} +1 -1
- package/dist/zonos-elements/p-d4110fa4.js +1 -0
- package/dist/zonos-elements/{p-48b42c33.system.entry.js → p-da11684f.system.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/zonos-elements/p-0b4a06cc.entry.js +0 -1
- package/dist/zonos-elements/p-0c868b63.system.entry.js +0 -1
- package/dist/zonos-elements/p-5c37e64d.entry.js +0 -1
- package/dist/zonos-elements/p-970fa103.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const zonosStore = require('./zonosStore-e12d459c.js');
|
|
4
|
-
const handleFetch = require('./handleFetch-
|
|
4
|
+
const handleFetch = require('./handleFetch-bd39d5cc.js');
|
|
5
5
|
const isDarkColor = require('./isDarkColor-d206c6fa.js');
|
|
6
6
|
const getBorderRadius = require('./getBorderRadius-61ed5601.js');
|
|
7
7
|
|
|
@@ -10022,6 +10022,7 @@ const stripeStoreConfirmPayment = async () => {
|
|
|
10022
10022
|
void trackConversionEvent('checkout_paymentInfoCompleted', {
|
|
10023
10023
|
paymentMethod: paymentIntent === null || paymentIntent === void 0 ? void 0 : paymentIntent.payment_method,
|
|
10024
10024
|
});
|
|
10025
|
+
handleFetch.log('Payment intent confirmed', 'info', { error, paymentIntent });
|
|
10025
10026
|
if (error) {
|
|
10026
10027
|
if (error.type === 'card_error' || error.type === 'validation_error') {
|
|
10027
10028
|
throw new Error(error.message);
|
|
@@ -10633,6 +10634,11 @@ const cartStorePreviousStep = () => {
|
|
|
10633
10634
|
// set shipping step to done
|
|
10634
10635
|
cartStore.tabItems = Object.assign(Object.assign({}, cartStore.tabItems), { shipping: Object.assign(Object.assign({}, cartStore.tabItems.shipping), { isDone: false }) });
|
|
10635
10636
|
}
|
|
10637
|
+
else if (cartStore.step === 'finish') {
|
|
10638
|
+
cartStore.step = 'payment';
|
|
10639
|
+
// set shipping step to done
|
|
10640
|
+
cartStore.tabItems = Object.assign(Object.assign({}, cartStore.tabItems), { payment: Object.assign(Object.assign({}, cartStore.tabItems.payment), { isDone: false }) });
|
|
10641
|
+
}
|
|
10636
10642
|
};
|
|
10637
10643
|
const cartStoreNextStep = () => {
|
|
10638
10644
|
if (cartStore.step === 'customer-info') {
|
|
@@ -219,7 +219,10 @@ const handleRequest = async ({ basePathType, options, path, }) => {
|
|
|
219
219
|
const url = baseUrl + path;
|
|
220
220
|
// adding random encoded token to the url so that the request will be cached differently for each store
|
|
221
221
|
const modifiedUrl = new URL(url);
|
|
222
|
-
|
|
222
|
+
const encodeDomain = window.Zonos.cartId
|
|
223
|
+
? `${window.location.hostname}-${window.Zonos.cartId}`
|
|
224
|
+
: window.location.hostname;
|
|
225
|
+
modifiedUrl.searchParams.set('zToken', encodeString(encodeDomain));
|
|
223
226
|
try {
|
|
224
227
|
response = await fetch(modifiedUrl.toString(), options);
|
|
225
228
|
}
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const handleFetch = require('./handleFetch-
|
|
6
|
-
const CheckoutConfig = require('./CheckoutConfig-
|
|
5
|
+
const handleFetch = require('./handleFetch-bd39d5cc.js');
|
|
6
|
+
const CheckoutConfig = require('./CheckoutConfig-222be92b.js');
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Get the load version and url based on the loadScriptSrc and version
|
|
@@ -97,7 +97,7 @@ const getZonosQaUrl = () => {
|
|
|
97
97
|
return null;
|
|
98
98
|
}
|
|
99
99
|
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
100
|
-
const cdnUrl = "https://v1.3.
|
|
100
|
+
const cdnUrl = "https://v1.3.120.js.zonos.com";
|
|
101
101
|
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
102
102
|
if (!qaUrl &&
|
|
103
103
|
(cdnUrl.includes('test.') ||
|
|
@@ -281,10 +281,10 @@ const zonosLoadUrl = (() => {
|
|
|
281
281
|
}
|
|
282
282
|
return null;
|
|
283
283
|
})();
|
|
284
|
-
const ZONOS_URL = "https://v1.3.
|
|
285
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
286
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
287
|
-
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.
|
|
284
|
+
const ZONOS_URL = "https://v1.3.120.js.zonos.com";
|
|
285
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.120";
|
|
286
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.120";
|
|
287
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.120";
|
|
288
288
|
const INTER_FONT_URL = 'https://rsms.me';
|
|
289
289
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
290
290
|
const INTER_FONT_REGEX = /^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;
|
|
@@ -299,7 +299,7 @@ Zonos.zonosConversionTest = typeof window !== 'undefined' &&
|
|
|
299
299
|
!!window.location.search.match(/\?.*(&*)zonosConversionTest/);
|
|
300
300
|
Zonos._paypalMockResponse = null;
|
|
301
301
|
Zonos.isBigCommerce = false;
|
|
302
|
-
Zonos.releaseDate = "
|
|
302
|
+
Zonos.releaseDate = "1730830410393";
|
|
303
303
|
Zonos.isLegacyCheckout = false;
|
|
304
304
|
Zonos.showBaseForeign = typeof window !== 'undefined' &&
|
|
305
305
|
window.location.search.includes('zonosShowBaseForeign');
|
|
@@ -309,7 +309,7 @@ Zonos.showBaseForeign = typeof window !== 'undefined' &&
|
|
|
309
309
|
Zonos.isNpm = true;
|
|
310
310
|
Zonos.zonosQaUrl = null;
|
|
311
311
|
Zonos.zonosQaUrlApi = null;
|
|
312
|
-
Zonos.version = `v${"1.3.
|
|
312
|
+
Zonos.version = `v${"1.3.120"}`;
|
|
313
313
|
Zonos.modeAlerted = false;
|
|
314
314
|
Zonos.cartData = null;
|
|
315
315
|
Zonos.paypal = null;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const zonosStore = require('./zonosStore-e12d459c.js');
|
|
4
|
-
const cart = require('./cart-
|
|
5
|
-
const handleFetch = require('./handleFetch-
|
|
4
|
+
const cart = require('./cart-ae361111.js');
|
|
5
|
+
const handleFetch = require('./handleFetch-bd39d5cc.js');
|
|
6
6
|
const isDarkColor = require('./isDarkColor-d206c6fa.js');
|
|
7
7
|
|
|
8
8
|
/*!
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-ae361111.js');
|
|
7
7
|
const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
|
|
8
|
-
const handleFetch = require('./handleFetch-
|
|
8
|
+
const handleFetch = require('./handleFetch-bd39d5cc.js');
|
|
9
9
|
const containsNonLatinChars = require('./containsNonLatinChars-2be5129b.js');
|
|
10
10
|
const zonosStore = require('./zonosStore-e12d459c.js');
|
|
11
11
|
const classes = require('./classes-b7918f56.js');
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-ae361111.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
const paypal = require('./paypal-
|
|
8
|
+
const paypal = require('./paypal-435e221c.js');
|
|
9
9
|
const zonosStore = require('./zonosStore-e12d459c.js');
|
|
10
10
|
const createCustomEvent = require('./createCustomEvent-3e982e57.js');
|
|
11
11
|
const getBorderRadius = require('./getBorderRadius-61ed5601.js');
|
|
12
|
-
const handleFetch = require('./handleFetch-
|
|
12
|
+
const handleFetch = require('./handleFetch-bd39d5cc.js');
|
|
13
13
|
const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
|
|
14
14
|
const ILanguage = require('./ILanguage-98b04442.js');
|
|
15
15
|
const isDarkColor = require('./isDarkColor-d206c6fa.js');
|
|
@@ -1452,6 +1452,12 @@ const ZonosCheckoutFinish = class {
|
|
|
1452
1452
|
this.notificationTitle = error
|
|
1453
1453
|
? cart.translate('Payment failed')
|
|
1454
1454
|
: cart.translate("You're all set!");
|
|
1455
|
+
handleFetch.log('=== Payment intent retrieve status', 'info', {
|
|
1456
|
+
clientSecret,
|
|
1457
|
+
error,
|
|
1458
|
+
messages,
|
|
1459
|
+
status,
|
|
1460
|
+
});
|
|
1455
1461
|
// Payment doesn't go through
|
|
1456
1462
|
if (error && (messages === null || messages === void 0 ? void 0 : messages.length)) {
|
|
1457
1463
|
paypal.submitGtag('zonos-checkout-payment-fail');
|
|
@@ -1560,12 +1566,12 @@ const ZonosCheckoutFinish = class {
|
|
|
1560
1566
|
}
|
|
1561
1567
|
render() {
|
|
1562
1568
|
const isTestMode = createCustomEvent.getIsTestMode();
|
|
1563
|
-
return (index.h(index.Host, { key: '
|
|
1569
|
+
return (index.h(index.Host, { key: 'be6d82d3f5d2b75cb3ca7676d4e9dc96958b55f9', class: "zonos--checkout-finish zonos--elements", style: {
|
|
1564
1570
|
'--border-radius': getBorderRadius.getBorderRadius({
|
|
1565
1571
|
overrideBorderStyle: this.borderRadius,
|
|
1566
1572
|
}),
|
|
1567
|
-
} }, !this.isLoading && (index.h("div", { key: '
|
|
1568
|
-
this.shouldRenderKeepShoppingButton() && (index.h("zonos-button", { key: '
|
|
1573
|
+
} }, !this.isLoading && (index.h("div", { key: '1e9ae0e3e835e824d3269b76f38601f1f4a4462b', class: "zonos--finish-details" }, index.h("div", { key: '54766c1ee7a8a81616ca1bf0e1da778250a21cec', 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: '310f5df77e5788f287d2815dde6d4a8af0b47370', class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), index.h("zonos-text", { key: 'b6725d31f0613d773e08fa451e74f32aa6708e6b', class: "zonos--subtitle", textColor: "gray-600" }, this.notificationMessages.map(message => (index.h(index.Fragment, null, message, index.h("br", null))))), !window.Zonos.isLegacyCheckout &&
|
|
1574
|
+
this.shouldRenderKeepShoppingButton() && (index.h("zonos-button", { key: '057ce352ad5202e120aa470875d32fca75e22487', onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, this.notificationActionText))), isTestMode && cart.cartStore.step === 'finish' && (index.h("div", { key: '95acf45bb6433d04bf8fb5e36cd7a34b097b4bf9', class: "zonos--finish-button-wrapper" }, index.h("zonos-button", { key: '0a7dc7709b0226cd9011ccbdff2820aecf3aa0f6', backgroundColor: "gray-0", buttonColor: "gray-1000", onClick: () => this.closeClickHandler(), size: "lg", variant: "outline" }, "New test cart"), index.h("zonos-button", { key: '21e38b16330e375e19eb2d70f442316e89daf56f', onClick: () => this.redirectToUrl(`/orders/all`), size: "lg", variant: "primary" }, "View order in Dashboard")))))));
|
|
1569
1575
|
}
|
|
1570
1576
|
static get assetsDirs() { return ["assets"]; }
|
|
1571
1577
|
};
|
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const paypal = require('./paypal-
|
|
6
|
+
const cart = require('./cart-ae361111.js');
|
|
7
|
+
const paypal = require('./paypal-435e221c.js');
|
|
8
8
|
const zonosStore = require('./zonosStore-e12d459c.js');
|
|
9
|
-
const handleFetch = require('./handleFetch-
|
|
9
|
+
const handleFetch = require('./handleFetch-bd39d5cc.js');
|
|
10
10
|
const createCustomEvent = require('./createCustomEvent-3e982e57.js');
|
|
11
11
|
const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
|
|
12
12
|
const classes = require('./classes-b7918f56.js');
|
|
13
13
|
const getBorderRadius = require('./getBorderRadius-61ed5601.js');
|
|
14
14
|
const isDarkColor = require('./isDarkColor-d206c6fa.js');
|
|
15
|
-
const CheckoutConfig = require('./CheckoutConfig-
|
|
15
|
+
const CheckoutConfig = require('./CheckoutConfig-222be92b.js');
|
|
16
16
|
const RemoveIcon = require('./RemoveIcon-081ac073.js');
|
|
17
17
|
|
|
18
18
|
/**
|
|
@@ -778,6 +778,7 @@ const ZonosCheckout = class {
|
|
|
778
778
|
}
|
|
779
779
|
catch (err) {
|
|
780
780
|
handleFetch.logError(err);
|
|
781
|
+
paypal.submitGtag('zonos-checkout-payment-fail');
|
|
781
782
|
cart.stripeStore.hasPaymentError = true;
|
|
782
783
|
// should request inventory refund if there's an error during payment
|
|
783
784
|
if (cart.stripeStore.shouldInventoryRefund) {
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-ae361111.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-e12d459c.js');
|
|
8
|
-
const handleFetch = require('./handleFetch-
|
|
8
|
+
const handleFetch = require('./handleFetch-bd39d5cc.js');
|
|
9
9
|
require('./isDarkColor-d206c6fa.js');
|
|
10
10
|
require('./getBorderRadius-61ed5601.js');
|
|
11
11
|
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-ae361111.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-e12d459c.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
|
-
require('./handleFetch-
|
|
9
|
+
require('./handleFetch-bd39d5cc.js');
|
|
10
10
|
require('./isDarkColor-d206c6fa.js');
|
|
11
11
|
require('./getBorderRadius-61ed5601.js');
|
|
12
12
|
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-ae361111.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-e12d459c.js');
|
|
8
8
|
const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
|
|
9
9
|
const isDarkColor = require('./isDarkColor-d206c6fa.js');
|
|
10
10
|
const ILanguage = require('./ILanguage-98b04442.js');
|
|
11
|
-
require('./handleFetch-
|
|
11
|
+
require('./handleFetch-bd39d5cc.js');
|
|
12
12
|
require('./getBorderRadius-61ed5601.js');
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-ae361111.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-e12d459c.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
9
|
const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
|
|
10
10
|
const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-4c94667f.js');
|
|
11
|
-
require('./handleFetch-
|
|
11
|
+
require('./handleFetch-bd39d5cc.js');
|
|
12
12
|
require('./isDarkColor-d206c6fa.js');
|
|
13
13
|
require('./getBorderRadius-61ed5601.js');
|
|
14
14
|
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
6
|
const zonosStore = require('./zonosStore-e12d459c.js');
|
|
7
|
-
const cart = require('./cart-
|
|
7
|
+
const cart = require('./cart-ae361111.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
|
-
const handleFetch = require('./handleFetch-
|
|
9
|
+
const handleFetch = require('./handleFetch-bd39d5cc.js');
|
|
10
10
|
const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-4c94667f.js');
|
|
11
11
|
require('./isDarkColor-d206c6fa.js');
|
|
12
12
|
require('./getBorderRadius-61ed5601.js');
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-ae361111.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-e12d459c.js');
|
|
8
8
|
const ILanguage = require('./ILanguage-98b04442.js');
|
|
9
|
-
require('./handleFetch-
|
|
9
|
+
require('./handleFetch-bd39d5cc.js');
|
|
10
10
|
require('./isDarkColor-d206c6fa.js');
|
|
11
11
|
require('./getBorderRadius-61ed5601.js');
|
|
12
12
|
|
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
6
|
const zonosStore = require('./zonosStore-e12d459c.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
const cart = require('./cart-
|
|
9
|
-
const handleFetch = require('./handleFetch-
|
|
10
|
-
const paypal = require('./paypal-
|
|
8
|
+
const cart = require('./cart-ae361111.js');
|
|
9
|
+
const handleFetch = require('./handleFetch-bd39d5cc.js');
|
|
10
|
+
const paypal = require('./paypal-435e221c.js');
|
|
11
11
|
require('./isDarkColor-d206c6fa.js');
|
|
12
12
|
require('./getBorderRadius-61ed5601.js');
|
|
13
13
|
|
|
@@ -213,6 +213,12 @@ export class ZonosCheckoutFinish {
|
|
|
213
213
|
this.notificationTitle = error
|
|
214
214
|
? translate('Payment failed')
|
|
215
215
|
: translate("You're all set!");
|
|
216
|
+
log('=== Payment intent retrieve status', 'info', {
|
|
217
|
+
clientSecret,
|
|
218
|
+
error,
|
|
219
|
+
messages,
|
|
220
|
+
status,
|
|
221
|
+
});
|
|
216
222
|
// Payment doesn't go through
|
|
217
223
|
if (error && (messages === null || messages === void 0 ? void 0 : messages.length)) {
|
|
218
224
|
submitGtag('zonos-checkout-payment-fail');
|
|
@@ -321,12 +327,12 @@ export class ZonosCheckoutFinish {
|
|
|
321
327
|
}
|
|
322
328
|
render() {
|
|
323
329
|
const isTestMode = getIsTestMode();
|
|
324
|
-
return (h(Host, { key: '
|
|
330
|
+
return (h(Host, { key: 'be6d82d3f5d2b75cb3ca7676d4e9dc96958b55f9', class: "zonos--checkout-finish zonos--elements", style: {
|
|
325
331
|
'--border-radius': getBorderRadius({
|
|
326
332
|
overrideBorderStyle: this.borderRadius,
|
|
327
333
|
}),
|
|
328
|
-
} }, !this.isLoading && (h("div", { key: '
|
|
329
|
-
this.shouldRenderKeepShoppingButton() && (h("zonos-button", { key: '
|
|
334
|
+
} }, !this.isLoading && (h("div", { key: '1e9ae0e3e835e824d3269b76f38601f1f4a4462b', class: "zonos--finish-details" }, h("div", { key: '54766c1ee7a8a81616ca1bf0e1da778250a21cec', 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: '310f5df77e5788f287d2815dde6d4a8af0b47370', class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), h("zonos-text", { key: 'b6725d31f0613d773e08fa451e74f32aa6708e6b', class: "zonos--subtitle", textColor: "gray-600" }, this.notificationMessages.map(message => (h(Fragment, null, message, h("br", null))))), !window.Zonos.isLegacyCheckout &&
|
|
335
|
+
this.shouldRenderKeepShoppingButton() && (h("zonos-button", { key: '057ce352ad5202e120aa470875d32fca75e22487', onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, this.notificationActionText))), isTestMode && cartStore.step === 'finish' && (h("div", { key: '95acf45bb6433d04bf8fb5e36cd7a34b097b4bf9', class: "zonos--finish-button-wrapper" }, h("zonos-button", { key: '0a7dc7709b0226cd9011ccbdff2820aecf3aa0f6', backgroundColor: "gray-0", buttonColor: "gray-1000", onClick: () => this.closeClickHandler(), size: "lg", variant: "outline" }, "New test cart"), h("zonos-button", { key: '21e38b16330e375e19eb2d70f442316e89daf56f', onClick: () => this.redirectToUrl(`/orders/all`), size: "lg", variant: "primary" }, "View order in Dashboard")))))));
|
|
330
336
|
}
|
|
331
337
|
static get is() { return "zonos-checkout-finish"; }
|
|
332
338
|
static get encapsulation() { return "shadow"; }
|
|
@@ -565,6 +565,7 @@ export class ZonosCheckout {
|
|
|
565
565
|
}
|
|
566
566
|
catch (err) {
|
|
567
567
|
logError(err);
|
|
568
|
+
submitGtag('zonos-checkout-payment-fail');
|
|
568
569
|
stripeStore.hasPaymentError = true;
|
|
569
570
|
// should request inventory refund if there's an error during payment
|
|
570
571
|
if (stripeStore.shouldInventoryRefund) {
|
|
@@ -362,6 +362,11 @@ const cartStorePreviousStep = () => {
|
|
|
362
362
|
// set shipping step to done
|
|
363
363
|
cartStore.tabItems = Object.assign(Object.assign({}, cartStore.tabItems), { shipping: Object.assign(Object.assign({}, cartStore.tabItems.shipping), { isDone: false }) });
|
|
364
364
|
}
|
|
365
|
+
else if (cartStore.step === 'finish') {
|
|
366
|
+
cartStore.step = 'payment';
|
|
367
|
+
// set shipping step to done
|
|
368
|
+
cartStore.tabItems = Object.assign(Object.assign({}, cartStore.tabItems), { payment: Object.assign(Object.assign({}, cartStore.tabItems.payment), { isDone: false }) });
|
|
369
|
+
}
|
|
365
370
|
};
|
|
366
371
|
const cartStoreNextStep = () => {
|
|
367
372
|
if (cartStore.step === 'customer-info') {
|
|
@@ -436,6 +436,7 @@ const stripeStoreConfirmPayment = async () => {
|
|
|
436
436
|
void trackConversionEvent('checkout_paymentInfoCompleted', {
|
|
437
437
|
paymentMethod: paymentIntent === null || paymentIntent === void 0 ? void 0 : paymentIntent.payment_method,
|
|
438
438
|
});
|
|
439
|
+
log('Payment intent confirmed', 'info', { error, paymentIntent });
|
|
439
440
|
if (error) {
|
|
440
441
|
if (error.type === 'card_error' || error.type === 'validation_error') {
|
|
441
442
|
throw new Error(error.message);
|
|
@@ -54,7 +54,10 @@ const handleRequest = async ({ basePathType, options, path, }) => {
|
|
|
54
54
|
const url = baseUrl + path;
|
|
55
55
|
// adding random encoded token to the url so that the request will be cached differently for each store
|
|
56
56
|
const modifiedUrl = new URL(url);
|
|
57
|
-
|
|
57
|
+
const encodeDomain = window.Zonos.cartId
|
|
58
|
+
? `${window.location.hostname}-${window.Zonos.cartId}`
|
|
59
|
+
: window.location.hostname;
|
|
60
|
+
modifiedUrl.searchParams.set('zToken', encodeString(encodeDomain));
|
|
58
61
|
try {
|
|
59
62
|
response = await fetch(modifiedUrl.toString(), options);
|
|
60
63
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as handleFetch, l as log, a as logError } from './handleFetch-
|
|
1
|
+
import { h as handleFetch, l as log, a as logError } from './handleFetch-752697c2.js';
|
|
2
2
|
|
|
3
3
|
const getTempCartById = async ({ cartId, retries, }) => {
|
|
4
4
|
const urlParams = new URLSearchParams(window.location.search);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as createStore, z as zonosStore } from './zonosStore-6b5bd87c.js';
|
|
2
|
-
import { h as handleFetch, a as logError, l as log, f as fallbackApiList, j as jsonParse } from './handleFetch-
|
|
2
|
+
import { h as handleFetch, a as logError, l as log, f as fallbackApiList, j as jsonParse } from './handleFetch-752697c2.js';
|
|
3
3
|
import { i as isDarkColor } from './isDarkColor-dc08fa26.js';
|
|
4
4
|
import { g as getBorderRadius } from './getBorderRadius-008516a4.js';
|
|
5
5
|
|
|
@@ -10020,6 +10020,7 @@ const stripeStoreConfirmPayment = async () => {
|
|
|
10020
10020
|
void trackConversionEvent('checkout_paymentInfoCompleted', {
|
|
10021
10021
|
paymentMethod: paymentIntent === null || paymentIntent === void 0 ? void 0 : paymentIntent.payment_method,
|
|
10022
10022
|
});
|
|
10023
|
+
log('Payment intent confirmed', 'info', { error, paymentIntent });
|
|
10023
10024
|
if (error) {
|
|
10024
10025
|
if (error.type === 'card_error' || error.type === 'validation_error') {
|
|
10025
10026
|
throw new Error(error.message);
|
|
@@ -10631,6 +10632,11 @@ const cartStorePreviousStep = () => {
|
|
|
10631
10632
|
// set shipping step to done
|
|
10632
10633
|
cartStore.tabItems = Object.assign(Object.assign({}, cartStore.tabItems), { shipping: Object.assign(Object.assign({}, cartStore.tabItems.shipping), { isDone: false }) });
|
|
10633
10634
|
}
|
|
10635
|
+
else if (cartStore.step === 'finish') {
|
|
10636
|
+
cartStore.step = 'payment';
|
|
10637
|
+
// set shipping step to done
|
|
10638
|
+
cartStore.tabItems = Object.assign(Object.assign({}, cartStore.tabItems), { payment: Object.assign(Object.assign({}, cartStore.tabItems.payment), { isDone: false }) });
|
|
10639
|
+
}
|
|
10634
10640
|
};
|
|
10635
10641
|
const cartStoreNextStep = () => {
|
|
10636
10642
|
if (cartStore.step === 'customer-info') {
|
|
@@ -217,7 +217,10 @@ const handleRequest = async ({ basePathType, options, path, }) => {
|
|
|
217
217
|
const url = baseUrl + path;
|
|
218
218
|
// adding random encoded token to the url so that the request will be cached differently for each store
|
|
219
219
|
const modifiedUrl = new URL(url);
|
|
220
|
-
|
|
220
|
+
const encodeDomain = window.Zonos.cartId
|
|
221
|
+
? `${window.location.hostname}-${window.Zonos.cartId}`
|
|
222
|
+
: window.location.hostname;
|
|
223
|
+
modifiedUrl.searchParams.set('zToken', encodeString(encodeDomain));
|
|
221
224
|
try {
|
|
222
225
|
response = await fetch(modifiedUrl.toString(), options);
|
|
223
226
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { l as log, a as logError } from './handleFetch-
|
|
2
|
-
import { s as setupCartData, c as checkoutHiddenBtnSelector } from './CheckoutConfig-
|
|
3
|
-
export { c as checkoutHiddenBtnSelector, d as domesticRedirectedBtnSelector } from './CheckoutConfig-
|
|
1
|
+
import { l as log, a as logError } from './handleFetch-752697c2.js';
|
|
2
|
+
import { s as setupCartData, c as checkoutHiddenBtnSelector } from './CheckoutConfig-f3f1d468.js';
|
|
3
|
+
export { c as checkoutHiddenBtnSelector, d as domesticRedirectedBtnSelector } from './CheckoutConfig-f3f1d468.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Get the load version and url based on the loadScriptSrc and version
|
|
@@ -94,7 +94,7 @@ const getZonosQaUrl = () => {
|
|
|
94
94
|
return null;
|
|
95
95
|
}
|
|
96
96
|
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
97
|
-
const cdnUrl = "https://v1.3.
|
|
97
|
+
const cdnUrl = "https://v1.3.120.js.zonos.com";
|
|
98
98
|
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
99
99
|
if (!qaUrl &&
|
|
100
100
|
(cdnUrl.includes('test.') ||
|
|
@@ -278,10 +278,10 @@ const zonosLoadUrl = (() => {
|
|
|
278
278
|
}
|
|
279
279
|
return null;
|
|
280
280
|
})();
|
|
281
|
-
const ZONOS_URL = "https://v1.3.
|
|
282
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
283
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
284
|
-
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.
|
|
281
|
+
const ZONOS_URL = "https://v1.3.120.js.zonos.com";
|
|
282
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.120";
|
|
283
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.120";
|
|
284
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.120";
|
|
285
285
|
const INTER_FONT_URL = 'https://rsms.me';
|
|
286
286
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
287
287
|
const INTER_FONT_REGEX = /^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;
|
|
@@ -296,7 +296,7 @@ Zonos.zonosConversionTest = typeof window !== 'undefined' &&
|
|
|
296
296
|
!!window.location.search.match(/\?.*(&*)zonosConversionTest/);
|
|
297
297
|
Zonos._paypalMockResponse = null;
|
|
298
298
|
Zonos.isBigCommerce = false;
|
|
299
|
-
Zonos.releaseDate = "
|
|
299
|
+
Zonos.releaseDate = "1730830410393";
|
|
300
300
|
Zonos.isLegacyCheckout = false;
|
|
301
301
|
Zonos.showBaseForeign = typeof window !== 'undefined' &&
|
|
302
302
|
window.location.search.includes('zonosShowBaseForeign');
|
|
@@ -306,7 +306,7 @@ Zonos.showBaseForeign = typeof window !== 'undefined' &&
|
|
|
306
306
|
Zonos.isNpm = true;
|
|
307
307
|
Zonos.zonosQaUrl = null;
|
|
308
308
|
Zonos.zonosQaUrlApi = null;
|
|
309
|
-
Zonos.version = `v${"1.3.
|
|
309
|
+
Zonos.version = `v${"1.3.120"}`;
|
|
310
310
|
Zonos.modeAlerted = false;
|
|
311
311
|
Zonos.cartData = null;
|
|
312
312
|
Zonos.paypal = null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z as zonosStore, c as createStore } from './zonosStore-6b5bd87c.js';
|
|
2
|
-
import { d as cartStore, v as stripeStoreHandleInventoryCheck, o as translate, u as cartStoreNextStep, h as cartStoreClearCheckoutInterval } from './cart-
|
|
3
|
-
import { h as handleFetch, l as log, a as logError, j as jsonParse } from './handleFetch-
|
|
2
|
+
import { d as cartStore, v as stripeStoreHandleInventoryCheck, o as translate, u as cartStoreNextStep, h as cartStoreClearCheckoutInterval } from './cart-b3faa2e6.js';
|
|
3
|
+
import { h as handleFetch, l as log, a as logError, j as jsonParse } from './handleFetch-752697c2.js';
|
|
4
4
|
import { t as tinycolor } from './isDarkColor-dc08fa26.js';
|
|
5
5
|
|
|
6
6
|
/*!
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, d as getElement } from './index-86b8247e.js';
|
|
2
|
-
import { j as stripeStore, R as getFallbackDefaultCountryCode, l as localizationStore, o as translate } from './cart-
|
|
2
|
+
import { j as stripeStore, R as getFallbackDefaultCountryCode, l as localizationStore, o as translate } from './cart-b3faa2e6.js';
|
|
3
3
|
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
4
|
-
import { a as logError, l as log } from './handleFetch-
|
|
4
|
+
import { a as logError, l as log } from './handleFetch-752697c2.js';
|
|
5
5
|
import { i as isTextContainsNonLatinChars, c as containsNonLatinChars } from './containsNonLatinChars-2d8810c3.js';
|
|
6
6
|
import { z as zonosStore, d as zonosStoreFontFamily } from './zonosStore-6b5bd87c.js';
|
|
7
7
|
import { c as classes } from './classes-0d95c529.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { r as registerInstance, a as getAssetPath, h, H as Host, F as Fragment, c as createEvent, d as getElement } from './index-86b8247e.js';
|
|
2
|
-
import { d as cartStore, G as currencyFormat, o as translate, H as cartStoreHasOneEligibleItem, I as stripeStoreApplyPromoCode, J as stripeStoreRemovePromoCode, y as stripeStoreReset, j as stripeStore, K as stripeStoreRetrievePayment, t as trackConversionEvent, L as stripeStoreResetPromoCode, M as stripeStoreMessageBasedOnStatus, l as localizationStore, N as stripeStoreTranslateAddressToLatin, O as cartStoreUpdateSelectedShippingOption, P as cartStoreGetShippingTransitInfo, Q as sortServiceLevelOptionsByAmount } from './cart-
|
|
2
|
+
import { d as cartStore, G as currencyFormat, o as translate, H as cartStoreHasOneEligibleItem, I as stripeStoreApplyPromoCode, J as stripeStoreRemovePromoCode, y as stripeStoreReset, j as stripeStore, K as stripeStoreRetrievePayment, t as trackConversionEvent, L as stripeStoreResetPromoCode, M as stripeStoreMessageBasedOnStatus, l as localizationStore, N as stripeStoreTranslateAddressToLatin, O as cartStoreUpdateSelectedShippingOption, P as cartStoreGetShippingTransitInfo, Q as sortServiceLevelOptionsByAmount } from './cart-b3faa2e6.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
|
-
import { s as submitGtag, b as paypalStore, c as paypalStoreReset, i as isContrastColor } from './paypal-
|
|
4
|
+
import { s as submitGtag, b as paypalStore, c as paypalStoreReset, i as isContrastColor } from './paypal-d5955b3d.js';
|
|
5
5
|
import { z as zonosStore, g as getZonosStoreTheme, d as zonosStoreFontFamily } from './zonosStore-6b5bd87c.js';
|
|
6
6
|
import { c as createCustomEvent, g as getIsTestMode } from './createCustomEvent-31a792d3.js';
|
|
7
7
|
import { g as getBorderRadius } from './getBorderRadius-008516a4.js';
|
|
8
|
-
import { h as handleFetch, l as log, s as sendErrorLog, j as jsonParse, b as allLogs } from './handleFetch-
|
|
8
|
+
import { h as handleFetch, l as log, s as sendErrorLog, j as jsonParse, b as allLogs } from './handleFetch-752697c2.js';
|
|
9
9
|
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
10
10
|
import { l as languages } from './ILanguage-cd6acb72.js';
|
|
11
11
|
import { i as isDarkColor, t as tinycolor } from './isDarkColor-dc08fa26.js';
|
|
@@ -1448,6 +1448,12 @@ const ZonosCheckoutFinish = class {
|
|
|
1448
1448
|
this.notificationTitle = error
|
|
1449
1449
|
? translate('Payment failed')
|
|
1450
1450
|
: translate("You're all set!");
|
|
1451
|
+
log('=== Payment intent retrieve status', 'info', {
|
|
1452
|
+
clientSecret,
|
|
1453
|
+
error,
|
|
1454
|
+
messages,
|
|
1455
|
+
status,
|
|
1456
|
+
});
|
|
1451
1457
|
// Payment doesn't go through
|
|
1452
1458
|
if (error && (messages === null || messages === void 0 ? void 0 : messages.length)) {
|
|
1453
1459
|
submitGtag('zonos-checkout-payment-fail');
|
|
@@ -1556,12 +1562,12 @@ const ZonosCheckoutFinish = class {
|
|
|
1556
1562
|
}
|
|
1557
1563
|
render() {
|
|
1558
1564
|
const isTestMode = getIsTestMode();
|
|
1559
|
-
return (h(Host, { key: '
|
|
1565
|
+
return (h(Host, { key: 'be6d82d3f5d2b75cb3ca7676d4e9dc96958b55f9', class: "zonos--checkout-finish zonos--elements", style: {
|
|
1560
1566
|
'--border-radius': getBorderRadius({
|
|
1561
1567
|
overrideBorderStyle: this.borderRadius,
|
|
1562
1568
|
}),
|
|
1563
|
-
} }, !this.isLoading && (h("div", { key: '
|
|
1564
|
-
this.shouldRenderKeepShoppingButton() && (h("zonos-button", { key: '
|
|
1569
|
+
} }, !this.isLoading && (h("div", { key: '1e9ae0e3e835e824d3269b76f38601f1f4a4462b', class: "zonos--finish-details" }, h("div", { key: '54766c1ee7a8a81616ca1bf0e1da778250a21cec', 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: '310f5df77e5788f287d2815dde6d4a8af0b47370', class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), h("zonos-text", { key: 'b6725d31f0613d773e08fa451e74f32aa6708e6b', class: "zonos--subtitle", textColor: "gray-600" }, this.notificationMessages.map(message => (h(Fragment, null, message, h("br", null))))), !window.Zonos.isLegacyCheckout &&
|
|
1570
|
+
this.shouldRenderKeepShoppingButton() && (h("zonos-button", { key: '057ce352ad5202e120aa470875d32fca75e22487', onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, this.notificationActionText))), isTestMode && cartStore.step === 'finish' && (h("div", { key: '95acf45bb6433d04bf8fb5e36cd7a34b097b4bf9', class: "zonos--finish-button-wrapper" }, h("zonos-button", { key: '0a7dc7709b0226cd9011ccbdff2820aecf3aa0f6', backgroundColor: "gray-0", buttonColor: "gray-1000", onClick: () => this.closeClickHandler(), size: "lg", variant: "outline" }, "New test cart"), h("zonos-button", { key: '21e38b16330e375e19eb2d70f442316e89daf56f', onClick: () => this.redirectToUrl(`/orders/all`), size: "lg", variant: "primary" }, "View order in Dashboard")))))));
|
|
1565
1571
|
}
|
|
1566
1572
|
static get assetsDirs() { return ["assets"]; }
|
|
1567
1573
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, F as Fragment } from './index-86b8247e.js';
|
|
2
|
-
import { l as localizationStore, s as stripeStoreGetDomesticShippingSession, a as localizationStoreUpdateSelectedCountryCode, b as stripeStoreCleanupDomesticShippingSession, c as stripeStoreSaveDomesticShippingSession, i as initStripeElements, d as cartStore, e as cartStoreUpdateItems, f as cartStoreReset, g as cartStoreResetTabItems, h as cartStoreClearCheckoutInterval, j as stripeStore, k as stripeStoreInitCheckoutSession, m as cartStoreStartCheckoutInterval, t as trackConversionEvent, n as cartStoreUpdateToErrorState, o as translate, p as getZCountryUrlParam, q as cartStoreSetCheckoutSession, r as stripeStorePrefetchLandedCost, u as cartStoreNextStep, v as stripeStoreHandleInventoryCheck, w as stripeStoreConfirmPayment, x as stripeStoreHandleInventoryRefund, y as stripeStoreReset, z as localizationStoreOnUpdate } from './cart-
|
|
3
|
-
import { p as paypalStoreHasPaypalEnabled, s as submitGtag, a as paypalInitScript } from './paypal-
|
|
2
|
+
import { l as localizationStore, s as stripeStoreGetDomesticShippingSession, a as localizationStoreUpdateSelectedCountryCode, b as stripeStoreCleanupDomesticShippingSession, c as stripeStoreSaveDomesticShippingSession, i as initStripeElements, d as cartStore, e as cartStoreUpdateItems, f as cartStoreReset, g as cartStoreResetTabItems, h as cartStoreClearCheckoutInterval, j as stripeStore, k as stripeStoreInitCheckoutSession, m as cartStoreStartCheckoutInterval, t as trackConversionEvent, n as cartStoreUpdateToErrorState, o as translate, p as getZCountryUrlParam, q as cartStoreSetCheckoutSession, r as stripeStorePrefetchLandedCost, u as cartStoreNextStep, v as stripeStoreHandleInventoryCheck, w as stripeStoreConfirmPayment, x as stripeStoreHandleInventoryRefund, y as stripeStoreReset, z as localizationStoreOnUpdate } from './cart-b3faa2e6.js';
|
|
3
|
+
import { p as paypalStoreHasPaypalEnabled, s as submitGtag, a as paypalInitScript } from './paypal-d5955b3d.js';
|
|
4
4
|
import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-6b5bd87c.js';
|
|
5
|
-
import { h as handleFetch, l as log, a as logError, s as sendErrorLog, g as getElapsedTime, b as allLogs, j as jsonParse } from './handleFetch-
|
|
5
|
+
import { h as handleFetch, l as log, a as logError, s as sendErrorLog, g as getElapsedTime, b as allLogs, j as jsonParse } from './handleFetch-752697c2.js';
|
|
6
6
|
import { c as createCustomEvent, g as getIsTestMode } from './createCustomEvent-31a792d3.js';
|
|
7
7
|
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
8
8
|
import { c as classes } from './classes-0d95c529.js';
|
|
9
9
|
import { g as getBorderRadius } from './getBorderRadius-008516a4.js';
|
|
10
10
|
import { i as isDarkColor } from './isDarkColor-dc08fa26.js';
|
|
11
|
-
import { s as setupCartData, d as domesticRedirectedBtnSelector, c as checkoutHiddenBtnSelector } from './CheckoutConfig-
|
|
11
|
+
import { s as setupCartData, d as domesticRedirectedBtnSelector, c as checkoutHiddenBtnSelector } from './CheckoutConfig-f3f1d468.js';
|
|
12
12
|
import { R as RemoveIcon } from './RemoveIcon-9dc5dd1a.js';
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -774,6 +774,7 @@ const ZonosCheckout = class {
|
|
|
774
774
|
}
|
|
775
775
|
catch (err) {
|
|
776
776
|
logError(err);
|
|
777
|
+
submitGtag('zonos-checkout-payment-fail');
|
|
777
778
|
stripeStore.hasPaymentError = true;
|
|
778
779
|
// should request inventory refund if there's an error during payment
|
|
779
780
|
if (stripeStore.shouldInventoryRefund) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-86b8247e.js';
|
|
2
|
-
import { A as isValidSelector, j as stripeStore, B as initLocalizationStore, d as cartStore, a as localizationStoreUpdateSelectedCountryCode } from './cart-
|
|
2
|
+
import { A as isValidSelector, j as stripeStore, B as initLocalizationStore, d as cartStore, a as localizationStoreUpdateSelectedCountryCode } from './cart-b3faa2e6.js';
|
|
3
3
|
import { z as zonosStore, b as zonosStoreInitSetting, d as zonosStoreFontFamily } from './zonosStore-6b5bd87c.js';
|
|
4
|
-
import { h as handleFetch, a as logError, l as log } from './handleFetch-
|
|
4
|
+
import { h as handleFetch, a as logError, l as log } from './handleFetch-752697c2.js';
|
|
5
5
|
import './isDarkColor-dc08fa26.js';
|
|
6
6
|
import './getBorderRadius-008516a4.js';
|
|
7
7
|
|