@zonos/elements 1.3.135 → 1.3.137
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-0f32f556.js → cart-dea3242e.js} +75 -2
- package/dist/cjs/index.cjs.js +13 -10
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{paypal-045033fb.js → paypal-729f9ed3.js} +1 -2
- package/dist/cjs/zonos-address_7.cjs.entry.js +1 -1
- package/dist/cjs/zonos-cart-items_13.cjs.entry.js +21 -8
- package/dist/cjs/zonos-checkout.cjs.entry.js +108 -11
- 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-elements.cjs.js +1 -1
- 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/cjs/zonos-notification_3.cjs.entry.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +19 -6
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +108 -10
- package/dist/collection/components/store/checkout/paypal.js +0 -1
- package/dist/collection/components/store/checkout/stripe.js +15 -2
- package/dist/collection/components/store/translationStore/strings.arabic.js +3 -0
- package/dist/collection/components/store/translationStore/strings.base.js +3 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +3 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +3 -0
- package/dist/collection/components/store/translationStore/strings.french.js +3 -0
- package/dist/collection/components/store/translationStore/strings.german.js +3 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +3 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +3 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +3 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +3 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +3 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +3 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +3 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +3 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +3 -0
- package/dist/collection/scripts/_zonosBase.js +6 -3
- package/dist/collection/types/generated/graphql.frontend.types.js +2 -3
- package/dist/collection/types/generated/graphql.internal.types.js +1 -0
- package/dist/esm/{cart-3e0e4d5c.js → cart-c15cb7dd.js} +76 -3
- package/dist/esm/index.js +13 -10
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{paypal-7f41ff20.js → paypal-de439a93.js} +1 -2
- package/dist/esm/zonos-address_7.entry.js +1 -1
- package/dist/esm/zonos-cart-items_13.entry.js +21 -8
- package/dist/esm/zonos-checkout.entry.js +109 -12
- 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-elements.js +1 -1
- 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/zonos-notification_3.entry.js +2 -2
- package/dist/esm-es5/cart-c15cb7dd.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{paypal-7f41ff20.js → paypal-de439a93.js} +2 -2
- 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-elements.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/types/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.d.ts +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +5 -0
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +3 -0
- package/dist/types/components/store/translationStore.d.ts +1 -1
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
- package/dist/types/types/generated/graphql.frontend.types.d.ts +3 -23
- package/dist/types/types/generated/graphql.frontend.types.ts +3 -36
- package/dist/types/types/generated/graphql.internal.types.d.ts +1 -0
- package/dist/types/types/generated/graphql.internal.types.ts +1 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-3f2ea446.entry.js → p-0867e94a.entry.js} +1 -1
- package/dist/zonos-elements/p-1af38265.system.js +1 -0
- package/dist/zonos-elements/{p-887b05eb.system.entry.js → p-1faa4294.system.entry.js} +1 -1
- package/dist/zonos-elements/p-2de631c4.system.entry.js +1 -0
- package/dist/zonos-elements/{p-49cecdf9.system.entry.js → p-3039f460.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3a5fb01a.system.entry.js → p-35ccf9d8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-aaa3addd.system.entry.js → p-374680fd.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-897c809a.entry.js → p-43ac026b.entry.js} +1 -1
- package/dist/zonos-elements/{p-6b8db2d3.entry.js → p-4aecf7fc.entry.js} +1 -1
- package/dist/zonos-elements/{p-b1bb00a8.entry.js → p-51f8719d.entry.js} +1 -1
- package/dist/zonos-elements/{p-b6fea87a.entry.js → p-56e63659.entry.js} +1 -1
- package/dist/zonos-elements/p-611842b5.entry.js +1 -0
- package/dist/zonos-elements/{p-4b680c1e.system.entry.js → p-765ddab5.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-85fbb5f0.entry.js → p-77b2acf4.entry.js} +1 -1
- package/dist/zonos-elements/p-7838aa96.entry.js +1 -0
- package/dist/zonos-elements/p-7c08bf7d.system.js +1 -0
- package/dist/zonos-elements/{p-a28f3298.system.entry.js → p-7eceaa3a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-05826697.system.entry.js → p-910c1247.system.entry.js} +1 -1
- package/dist/zonos-elements/p-938b2b70.js +17 -0
- package/dist/zonos-elements/p-940e327f.system.entry.js +1 -0
- package/dist/zonos-elements/{p-e9db73d9.entry.js → p-a5d35e84.entry.js} +1 -1
- package/dist/zonos-elements/p-afa5c13c.js +1 -0
- package/dist/zonos-elements/{p-16e5df29.system.entry.js → p-c710bde9.system.entry.js} +1 -1
- package/dist/zonos-elements/p-c78dd680.system.js +1 -1
- package/dist/zonos-elements/{p-bec4d2c7.entry.js → p-cb6baa14.entry.js} +1 -1
- package/dist/zonos-elements/{p-1856c3fa.system.js → p-e9b39df1.system.js} +2 -2
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/cart-3e0e4d5c.js +0 -1
- package/dist/zonos-elements/p-69045ca3.js +0 -1
- package/dist/zonos-elements/p-8759f66b.js +0 -17
- package/dist/zonos-elements/p-99d47e1c.entry.js +0 -1
- package/dist/zonos-elements/p-a0de6e0f.system.entry.js +0 -1
- package/dist/zonos-elements/p-acb45eb6.system.entry.js +0 -1
- package/dist/zonos-elements/p-fa41d3e4.system.js +0 -1
- package/dist/zonos-elements/p-fa790aaf.system.js +0 -1
- package/dist/zonos-elements/p-fb7d8b52.entry.js +0 -1
|
@@ -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, paypalStoreHasPaypalEnabled, } from "../../store/checkout/paypal";
|
|
4
|
-
import { getCheckoutSessionBody, initStripeElements, stripeStore, stripeStoreCleanupDomesticShippingSession, stripeStoreConfirmPayment, stripeStoreHandleInventoryCheck, stripeStoreHandleInventoryRefund, stripeStoreInitCheckoutSession, stripeStorePrefetchLandedCost, stripeStoreReset, } from "../../store/checkout/stripe";
|
|
4
|
+
import { getCheckoutSessionBody, initStripeElements, stripeStore, stripeStoreCleanupDomesticShippingSession, stripeStoreConfirmPayment, 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";
|
|
@@ -85,6 +85,52 @@ export class ZonosCheckout {
|
|
|
85
85
|
}
|
|
86
86
|
return false;
|
|
87
87
|
};
|
|
88
|
+
/**
|
|
89
|
+
* Check if stripe payment intent is succeeded or in a good state to move forward
|
|
90
|
+
*/
|
|
91
|
+
this.checkStripePaymentIntentStatus = async ({ triggeredButton, }) => {
|
|
92
|
+
const isImmediatelyTriggered = triggeredButton === null || triggeredButton === void 0 ? void 0 : triggeredButton.matches(`#${checkoutHiddenBtnSelector}`);
|
|
93
|
+
const isCartDataAvailable = !!window.Zonos.cartData;
|
|
94
|
+
const searchParams = new URL(window.location.href).searchParams;
|
|
95
|
+
const stripeClientSecret = searchParams.get('payment_intent_client_secret');
|
|
96
|
+
const zonosCheckoutSessionId = searchParams.get('zonosCheckoutSessionId');
|
|
97
|
+
// Allow to proceed to order if Checkout is triggered by Checkout button click by user
|
|
98
|
+
if (!isImmediatelyTriggered) {
|
|
99
|
+
log('Checkout is triggered by user, no need to check stripe payment intent status');
|
|
100
|
+
return { shouldAllowOrder: true };
|
|
101
|
+
}
|
|
102
|
+
log('Payment intent exist, checking stripe payment intent status');
|
|
103
|
+
// Allow to proceed to order if there's no stripe client secret and cart data is available
|
|
104
|
+
if (!stripeClientSecret) {
|
|
105
|
+
log('No stripe client secret found in the URL, proceed to order if cart data is available');
|
|
106
|
+
return { shouldAllowOrder: isCartDataAvailable };
|
|
107
|
+
}
|
|
108
|
+
const { error, status } = await stripeStoreRetrievePayment({
|
|
109
|
+
clientSecret: stripeClientSecret,
|
|
110
|
+
});
|
|
111
|
+
// check if this is redirect after order
|
|
112
|
+
const isJustRedirected = new URLSearchParams(window.location.search).get('redirect_status');
|
|
113
|
+
// If just redirected from Payment provider, show the success screen or error screen based on the status
|
|
114
|
+
if (isJustRedirected) {
|
|
115
|
+
if (!error) {
|
|
116
|
+
log('Payment intent is succeeded or in a good state to move forward, show success screen');
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
log('Payment intent failed, show status from error');
|
|
120
|
+
}
|
|
121
|
+
this.open = true;
|
|
122
|
+
cartStore.checkoutSessionId = zonosCheckoutSessionId;
|
|
123
|
+
stripeStore.clientSecret = stripeClientSecret;
|
|
124
|
+
void this.setToFinishStep(status);
|
|
125
|
+
return { shouldAllowOrder: false };
|
|
126
|
+
}
|
|
127
|
+
if (!isCartDataAvailable) {
|
|
128
|
+
log('Cart data is not available, only check payment intent status, skip order.');
|
|
129
|
+
return { shouldAllowOrder: false };
|
|
130
|
+
}
|
|
131
|
+
log('Payment intent is not succeeded, proceed to order');
|
|
132
|
+
return { shouldAllowOrder: true };
|
|
133
|
+
};
|
|
88
134
|
this.formatDate = (timestamp) => {
|
|
89
135
|
if (!timestamp) {
|
|
90
136
|
return '';
|
|
@@ -118,6 +164,7 @@ export class ZonosCheckout {
|
|
|
118
164
|
this.mobile = false;
|
|
119
165
|
this.defaultAddress = null;
|
|
120
166
|
this.forceDialogOpen = false;
|
|
167
|
+
this.defaultAddressParams = null;
|
|
121
168
|
this.open = this.forceDialogOpen;
|
|
122
169
|
this.stripe = window.Zonos.stripe;
|
|
123
170
|
this.submitLoading = false;
|
|
@@ -323,7 +370,7 @@ export class ZonosCheckout {
|
|
|
323
370
|
buttonAnchorSelector,
|
|
324
371
|
// hidden button for domestic redirected
|
|
325
372
|
`#${domesticRedirectedBtnSelector}`,
|
|
326
|
-
// hidden button for legacy checkout facade
|
|
373
|
+
// hidden button for legacy checkout facade and when client secret is provided in the query param or session storage when user is redirected from stripe
|
|
327
374
|
`#${checkoutHiddenBtnSelector}`,
|
|
328
375
|
].filter(Boolean);
|
|
329
376
|
// also attach event to hidden button if user was redirected with shipping address session
|
|
@@ -348,6 +395,20 @@ export class ZonosCheckout {
|
|
|
348
395
|
e.preventDefault();
|
|
349
396
|
e.stopPropagation();
|
|
350
397
|
log('zonos checkout button clicked');
|
|
398
|
+
/**
|
|
399
|
+
* Check to see if there is any payment intent that's succeeded and got reload/redirected to the current on approved or authorized by Stripe
|
|
400
|
+
* User stories:
|
|
401
|
+
* - Some 3DS or "Buy Now Pay Later" payments might need to reload the page or redirect to return_url from Stripe after completing the payment.
|
|
402
|
+
* - `return_url` sometimes has client_secret in the query param, but not always. We need to check the payment intent status to see if it's succeeded or not.
|
|
403
|
+
*
|
|
404
|
+
**/
|
|
405
|
+
const { shouldAllowOrder } = await this.checkStripePaymentIntentStatus({
|
|
406
|
+
triggeredButton: e.target,
|
|
407
|
+
});
|
|
408
|
+
// Only allow order to proceed if payment intent is not succeeded
|
|
409
|
+
if (!shouldAllowOrder) {
|
|
410
|
+
return;
|
|
411
|
+
}
|
|
351
412
|
// start loading
|
|
352
413
|
stripeStore.isFetchingSession = true;
|
|
353
414
|
this.open = true;
|
|
@@ -418,7 +479,7 @@ export class ZonosCheckout {
|
|
|
418
479
|
// remove the button after it's clicked
|
|
419
480
|
button.remove();
|
|
420
481
|
}
|
|
421
|
-
// For legacy checkout facade and in case the cart is provided in the query param, open Checkout right away
|
|
482
|
+
// For legacy checkout facade and in case the cart or stripe client secret is provided in the query param, open Checkout right away
|
|
422
483
|
if (button.matches(`#${checkoutHiddenBtnSelector}`)) {
|
|
423
484
|
// trigger the click event on the button
|
|
424
485
|
button.dispatchEvent(createCustomEvent('click'));
|
|
@@ -472,7 +533,7 @@ export class ZonosCheckout {
|
|
|
472
533
|
.join(', '));
|
|
473
534
|
return;
|
|
474
535
|
}
|
|
475
|
-
this.
|
|
536
|
+
this.defaultAddressParams = {
|
|
476
537
|
address: {
|
|
477
538
|
city: city || '',
|
|
478
539
|
country,
|
|
@@ -680,6 +741,9 @@ export class ZonosCheckout {
|
|
|
680
741
|
// redirect to vendor store url if this is legacy checkout.
|
|
681
742
|
if (window.Zonos.isLegacyCheckout && window.Zonos.cartData) {
|
|
682
743
|
const storeBaseUrl = window.Zonos.cartData.storeBaseUrl;
|
|
744
|
+
if (window.parent) {
|
|
745
|
+
window.parent.location.href = storeBaseUrl;
|
|
746
|
+
}
|
|
683
747
|
window.location.href = storeBaseUrl;
|
|
684
748
|
return;
|
|
685
749
|
}
|
|
@@ -687,14 +751,17 @@ export class ZonosCheckout {
|
|
|
687
751
|
const url = window.location.href;
|
|
688
752
|
// Remove query parameters
|
|
689
753
|
const cleanUrl = url.split('?')[0];
|
|
690
|
-
const isTestMode = getIsTestMode();
|
|
691
754
|
this.open = false;
|
|
692
|
-
|
|
755
|
+
const isDashboard = window.location.hostname.includes('dashboard.zonos.com');
|
|
756
|
+
/**
|
|
757
|
+
* Update the URL without query parameters only when checkout is not running in dashboard.zonos.com.
|
|
758
|
+
* We don't want to reload the page when dashboard is running it. Test mode should do what live mode does.
|
|
759
|
+
*/
|
|
693
760
|
/**
|
|
694
761
|
* Setting the state to null in window.history.replaceState can cause issues with rendering when using next/link and pressing the back button.
|
|
695
762
|
* @ref https://github.com/vercel/next.js/issues/33233#issuecomment-1052349396
|
|
696
763
|
**/
|
|
697
|
-
if (!
|
|
764
|
+
if (!isDashboard) {
|
|
698
765
|
window.history.replaceState(window.history.state, document.title, cleanUrl);
|
|
699
766
|
// Reload the page
|
|
700
767
|
window.location.reload();
|
|
@@ -723,12 +790,42 @@ export class ZonosCheckout {
|
|
|
723
790
|
stripeStoreReset();
|
|
724
791
|
}
|
|
725
792
|
handleOpenChange() {
|
|
793
|
+
const overflowAttrKey = 'data-zonos-overflow-origin';
|
|
794
|
+
const body = document.body;
|
|
795
|
+
const html = document.documentElement;
|
|
726
796
|
// disable scroll on the body when dialog is open
|
|
727
797
|
if (this.open) {
|
|
728
|
-
|
|
798
|
+
// record overflow state to data-zonos-overflow-origin in body/html element so we can reset it later
|
|
799
|
+
if (body.style.overflow) {
|
|
800
|
+
body.setAttribute(overflowAttrKey, body.style.overflow);
|
|
801
|
+
}
|
|
802
|
+
body.style.overflow = 'hidden';
|
|
803
|
+
if (html.style.overflow) {
|
|
804
|
+
html.setAttribute(overflowAttrKey, html.style.overflow);
|
|
805
|
+
}
|
|
806
|
+
html.style.overflow = 'hidden';
|
|
729
807
|
}
|
|
730
808
|
else {
|
|
731
|
-
|
|
809
|
+
const bodyOverflow = body.getAttribute(overflowAttrKey);
|
|
810
|
+
const htmlOverflow = html.getAttribute(overflowAttrKey);
|
|
811
|
+
// reset overflow state to original state
|
|
812
|
+
if (bodyOverflow) {
|
|
813
|
+
body.removeAttribute(overflowAttrKey);
|
|
814
|
+
body.style.overflow = bodyOverflow;
|
|
815
|
+
}
|
|
816
|
+
else {
|
|
817
|
+
// just remove the overflow style if it's not set
|
|
818
|
+
body.style.removeProperty('overflow');
|
|
819
|
+
}
|
|
820
|
+
// reset overflow state to original state
|
|
821
|
+
if (htmlOverflow) {
|
|
822
|
+
html.removeAttribute(overflowAttrKey);
|
|
823
|
+
html.style.overflow = htmlOverflow;
|
|
824
|
+
}
|
|
825
|
+
else {
|
|
826
|
+
// just remove the overflow style if it's not set
|
|
827
|
+
html.style.removeProperty('overflow');
|
|
828
|
+
}
|
|
732
829
|
}
|
|
733
830
|
}
|
|
734
831
|
componentWillLoad() {
|
|
@@ -805,7 +902,7 @@ export class ZonosCheckout {
|
|
|
805
902
|
'--zonos--primary-color': !this.isMobile
|
|
806
903
|
? colorPrimary
|
|
807
904
|
: undefined,
|
|
808
|
-
}) }, !this.isMobile && renderTopHeader(), cartStore.step === 'customer-info' && (h("zonos-customer-info", { continueLoading: this.submitLoading, defaultAddress: this.defaultAddress, isMobile: this.isMobile, onContinueClicked: () => this.handleCustomerInfoContinue(), submitBtnColor: submitButtonColor })), cartStore.step === 'shipping' && (h("zonos-shipping", { continueLoading: this.submitLoading, onContinueClicked: () => this.handleShippingContinue(), submitBtnColor: submitButtonColor })), cartStore.step === 'payment' && (h("zonos-checkout-payment", { continueLoading: this.submitLoading, onContinueClicked: async () => {
|
|
905
|
+
}) }, !this.isMobile && renderTopHeader(), cartStore.step === 'customer-info' && (h("zonos-customer-info", { continueLoading: this.submitLoading, defaultAddress: this.defaultAddress || this.defaultAddressParams, isMobile: this.isMobile, onContinueClicked: () => this.handleCustomerInfoContinue(), submitBtnColor: submitButtonColor })), cartStore.step === 'shipping' && (h("zonos-shipping", { continueLoading: this.submitLoading, onContinueClicked: () => this.handleShippingContinue(), submitBtnColor: submitButtonColor })), cartStore.step === 'payment' && (h("zonos-checkout-payment", { continueLoading: this.submitLoading, onContinueClicked: async () => {
|
|
809
906
|
await this.handleStripePaymentContinue();
|
|
810
907
|
}, submitBtnColor: submitButtonColor }))), h("div", { class: "zonos--right", "data-theme": rightSideTheme }, this.isMobile && renderTopHeader(), h("div", { class: "zonos--right-actions" }, window.Zonos.showBaseForeign && (h("zonos-currency-toggle", null)), !this.isLegacyCheckout && (h("zonos-button", { class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close checkout dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.closeDialogHandler() }))), h("div", { class: "flex--wrapper" }, h("div", { class: "zonos--wrapper" }, h("zonos-review", { collapsed: this.collapseReviewMobile, mobile: this.isMobile, onClick: () => {
|
|
811
908
|
// do nothing if it's not mobile
|
|
@@ -989,6 +1086,7 @@ export class ZonosCheckout {
|
|
|
989
1086
|
}
|
|
990
1087
|
static get states() {
|
|
991
1088
|
return {
|
|
1089
|
+
"defaultAddressParams": {},
|
|
992
1090
|
"open": {},
|
|
993
1091
|
"stripe": {},
|
|
994
1092
|
"submitLoading": {},
|
|
@@ -31,7 +31,6 @@ const paypalStoreCreaterOrder = async ({ checkoutSessionId, }) => {
|
|
|
31
31
|
};
|
|
32
32
|
const paypalStoreCaptureOrder = async ({ checkoutSessionId, paypalMockResponse, }) => {
|
|
33
33
|
var _a, _b;
|
|
34
|
-
const {} = new URL(window.location.href);
|
|
35
34
|
const { errors, json } = await paypalCaptureOrder({
|
|
36
35
|
checkoutSessionId,
|
|
37
36
|
paypalMockResponse,
|
|
@@ -359,6 +359,12 @@ const stripeStoreMessageBasedOnStatus = (status) => {
|
|
|
359
359
|
];
|
|
360
360
|
break;
|
|
361
361
|
}
|
|
362
|
+
case 'requires_action': {
|
|
363
|
+
isError = false;
|
|
364
|
+
messages = [
|
|
365
|
+
translate('Your selected payment method requires additional verification. Please follow the instructions provided by your payment provider to complete the transaction.'),
|
|
366
|
+
];
|
|
367
|
+
}
|
|
362
368
|
default: {
|
|
363
369
|
messages = [translate('Something went wrong.')];
|
|
364
370
|
break;
|
|
@@ -457,10 +463,17 @@ const stripeStoreConfirmPayment = async () => {
|
|
|
457
463
|
if (!((_b = cartStore.selectedLandedCost) === null || _b === void 0 ? void 0 : _b.landedCost.id)) {
|
|
458
464
|
throw new Error('Attempted to confirm the payment when no landed cost is found in store');
|
|
459
465
|
}
|
|
460
|
-
if (stripe &&
|
|
466
|
+
if (stripe &&
|
|
467
|
+
stripeElements &&
|
|
468
|
+
stripePaymentReady &&
|
|
469
|
+
stripeClientSecret &&
|
|
470
|
+
cartStore.checkoutSessionId) {
|
|
471
|
+
const buildUrl = new URL(window.location.href);
|
|
472
|
+
buildUrl.searchParams.set('payment_intent_client_secret', stripeClientSecret);
|
|
473
|
+
buildUrl.searchParams.set('zonosCheckoutSessionId', cartStore.checkoutSessionId);
|
|
461
474
|
const { error, paymentIntent } = await stripe.confirmPayment({
|
|
462
475
|
confirmParams: {
|
|
463
|
-
return_url:
|
|
476
|
+
return_url: buildUrl.toString(),
|
|
464
477
|
},
|
|
465
478
|
elements: stripeElements,
|
|
466
479
|
redirect: 'if_required',
|
|
@@ -407,6 +407,9 @@ export const stringsArabic = {
|
|
|
407
407
|
'Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us.': {
|
|
408
408
|
value: 'تمت عملية الدفع بنجاح! شكرا لتسوقك معنا! نأمل أن تكون قد استمتعت بتجربة رائعة ودعمك يعني لنا الكثير.',
|
|
409
409
|
},
|
|
410
|
+
'Your selected payment method requires additional verification. Please follow the instructions provided by your payment provider to complete the transaction.': {
|
|
411
|
+
value: 'طريقة الدفع التي اخترتها تتطلب تحققًا إضافيًا. يرجى اتباع التعليمات المقدمة من مزود الدفع الخاص بك لإكمال المعاملة.',
|
|
412
|
+
},
|
|
410
413
|
'[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.': {
|
|
411
414
|
value: '[percentage] ضريبة القيمة المضافة مستحقة على أي طلب يتجاوز [threshold] بالإضافة إلى رسوم معاملة إدخال الاستيراد ورسوم MPI.',
|
|
412
415
|
},
|
|
@@ -407,6 +407,9 @@ export const stringsBase = {
|
|
|
407
407
|
'Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us.': {
|
|
408
408
|
value: 'Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us.',
|
|
409
409
|
},
|
|
410
|
+
'Your selected payment method requires additional verification. Please follow the instructions provided by your payment provider to complete the transaction.': {
|
|
411
|
+
value: 'Your selected payment method requires additional verification. Please follow the instructions provided by your payment provider to complete the transaction.',
|
|
412
|
+
},
|
|
410
413
|
'[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.': {
|
|
411
414
|
value: '[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.',
|
|
412
415
|
},
|
|
@@ -407,6 +407,9 @@ export const stringsChinese = {
|
|
|
407
407
|
'Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us.': {
|
|
408
408
|
value: '您的付款已成功完成!感谢您与我们购物!我们希望您拥有愉快的购物体验,您的支持对我们来说意义非凡。',
|
|
409
409
|
},
|
|
410
|
+
'Your selected payment method requires additional verification. Please follow the instructions provided by your payment provider to complete the transaction.': {
|
|
411
|
+
value: '您选择的付款方式需要额外验证。请按照您的付款提供商提供的说明完成交易。',
|
|
412
|
+
},
|
|
410
413
|
'[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.': {
|
|
411
414
|
value: '任何订单超过[threshold],除了需缴纳[percentage]的商品及服务税外,还包括进口货物申报费和MPI征费。',
|
|
412
415
|
},
|
|
@@ -407,6 +407,9 @@ export const stringsDanish = {
|
|
|
407
407
|
'Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us.': {
|
|
408
408
|
value: 'Din betaling gik igennem! Tak fordi du handler hos os! Vi håber, du havde en god oplevelse, og din støtte betyder meget for os.',
|
|
409
409
|
},
|
|
410
|
+
'Your selected payment method requires additional verification. Please follow the instructions provided by your payment provider to complete the transaction.': {
|
|
411
|
+
value: 'Din valgte betalingsmetode kræver yderligere verifikation. Følg venligst instruktionerne fra din betalingsudbyder for at fuldføre transaktionen.',
|
|
412
|
+
},
|
|
410
413
|
'[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.': {
|
|
411
414
|
value: '[percentage] GST skyldig på enhver ordre over [threshold], sammen med et import indgangstransaktionsgebyr og MPI-afgift.',
|
|
412
415
|
},
|
|
@@ -407,6 +407,9 @@ export const stringsDutch = {
|
|
|
407
407
|
'Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us.': {
|
|
408
408
|
value: 'Je betaling is succesvol verwerkt! Bedankt voor het winkelen bij ons! We hopen dat je een prettige ervaring hebt gehad en je steun betekent veel voor ons.',
|
|
409
409
|
},
|
|
410
|
+
'Your selected payment method requires additional verification. Please follow the instructions provided by your payment provider to complete the transaction.': {
|
|
411
|
+
value: 'Uw geselecteerde betaalmethode vereist aanvullende verificatie. Volg de instructies van uw betalingsprovider om de transactie te voltooien.',
|
|
412
|
+
},
|
|
410
413
|
'[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.': {
|
|
411
414
|
value: '[percentage] BTW verschuldigd op elke bestelling boven [threshold], inclusief een invoertransactiekosten en MPI-heffing.',
|
|
412
415
|
},
|
|
@@ -407,6 +407,9 @@ export const stringsFrench = {
|
|
|
407
407
|
'Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us.': {
|
|
408
408
|
value: 'Votre paiement a bien été effectué ! Merci de votre achat chez nous ! Nous espérons que vous avez passé un bon moment et votre soutien compte beaucoup pour nous.',
|
|
409
409
|
},
|
|
410
|
+
'Your selected payment method requires additional verification. Please follow the instructions provided by your payment provider to complete the transaction.': {
|
|
411
|
+
value: 'Votre méthode de paiement sélectionnée nécessite une vérification supplémentaire. Veuillez suivre les instructions fournies par votre fournisseur de paiement pour compléter la transaction.',
|
|
412
|
+
},
|
|
410
413
|
'[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.': {
|
|
411
414
|
value: "[percentage] de TVA due sur toute commande supérieure à [threshold], ainsi qu'une taxe de transaction d'entrée d'importation et une cotisation MPI.",
|
|
412
415
|
},
|
|
@@ -407,6 +407,9 @@ export const stringsGerman = {
|
|
|
407
407
|
'Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us.': {
|
|
408
408
|
value: 'Ihre Zahlung war erfolgreich! Vielen Dank, dass Sie bei uns eingekauft haben! Wir hoffen, Sie hatten eine angenehme Erfahrung und Ihre Unterstützung bedeutet uns sehr viel.',
|
|
409
409
|
},
|
|
410
|
+
'Your selected payment method requires additional verification. Please follow the instructions provided by your payment provider to complete the transaction.': {
|
|
411
|
+
value: 'Ihre ausgewählte Zahlungsmethode erfordert eine zusätzliche Verifizierung. Bitte folgen Sie den Anweisungen Ihres Zahlungsanbieters, um die Transaktion abzuschließen.',
|
|
412
|
+
},
|
|
410
413
|
'[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.': {
|
|
411
414
|
value: '[percentage] MwSt. fällig bei jeder Bestellung über [threshold], zuzüglich einer Einfuhrabwicklungskosten und MPI-Abgabe.',
|
|
412
415
|
},
|
|
@@ -407,6 +407,9 @@ export const stringsHebrew = {
|
|
|
407
407
|
'Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us.': {
|
|
408
408
|
value: 'התשלום שלך התבצע בהצלחה! תודה שקנית אצלנו! אנו מקווים שנהנית והתמיכה שלך חשובה לנו מאוד.',
|
|
409
409
|
},
|
|
410
|
+
'Your selected payment method requires additional verification. Please follow the instructions provided by your payment provider to complete the transaction.': {
|
|
411
|
+
value: 'שיטת התשלום שבחרת דורשת אימות נוסף. אנא עקוב אחר ההוראות שסופקו על ידי ספק התשלומים שלך כדי להשלים את העסקה.',
|
|
412
|
+
},
|
|
410
413
|
'[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.': {
|
|
411
414
|
value: '[percentage] מע"מ חל על כל הזמנה מעל [threshold], יחד עם עמלת עסקת כניסת ייבוא ומס MPI.',
|
|
412
415
|
},
|
|
@@ -407,6 +407,9 @@ export const stringsIndonesian = {
|
|
|
407
407
|
'Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us.': {
|
|
408
408
|
value: 'Pembayaran Anda berhasil! Terima kasih telah berbelanja bersama kami! Kami berharap Anda memiliki pengalaman yang menyenangkan dan dukungan Anda sangat berarti bagi kami.',
|
|
409
409
|
},
|
|
410
|
+
'Your selected payment method requires additional verification. Please follow the instructions provided by your payment provider to complete the transaction.': {
|
|
411
|
+
value: 'Metode pembayaran yang Anda pilih memerlukan verifikasi tambahan. Silakan ikuti instruksi yang diberikan oleh penyedia pembayaran Anda untuk menyelesaikan transaksi.',
|
|
412
|
+
},
|
|
410
413
|
'[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.': {
|
|
411
414
|
value: '[percentage] PPN yang harus dibayar untuk setiap pesanan di atas [threshold], termasuk biaya transaksi masuk impor dan pajak MPI.',
|
|
412
415
|
},
|
|
@@ -407,6 +407,9 @@ export const stringsItalian = {
|
|
|
407
407
|
'Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us.': {
|
|
408
408
|
value: "Il tuo pagamento è andato a buon fine! Grazie per aver acquistato da noi! Speriamo tu abbia avuto un'esperienza piacevole e il tuo supporto significa molto per noi.",
|
|
409
409
|
},
|
|
410
|
+
'Your selected payment method requires additional verification. Please follow the instructions provided by your payment provider to complete the transaction.': {
|
|
411
|
+
value: 'Il metodo di pagamento selezionato richiede una verifica aggiuntiva. Si prega di seguire le istruzioni fornite dal proprio fornitore di pagamenti per completare la transazione.',
|
|
412
|
+
},
|
|
410
413
|
'[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.': {
|
|
411
414
|
value: "[percentage] di IVA dovuta su qualsiasi ordine superiore a [threshold], oltre a una tassa di transazione di entrata importazione e un'imposta MPI.",
|
|
412
415
|
},
|
|
@@ -407,6 +407,9 @@ export const stringsJapanese = {
|
|
|
407
407
|
'Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us.': {
|
|
408
408
|
value: 'お支払いが正常に完了しました! ご利用いただきありがとうございます!楽しんでいただけましたら幸いです。あなたのご支援は私たちにとって大変重要な意味を持ちます。',
|
|
409
409
|
},
|
|
410
|
+
'Your selected payment method requires additional verification. Please follow the instructions provided by your payment provider to complete the transaction.': {
|
|
411
|
+
value: '選択した支払い方法には追加の確認が必要です。取引を完了するには、支払いプロバイダーから提供された指示に従ってください。',
|
|
412
|
+
},
|
|
410
413
|
'[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.': {
|
|
411
414
|
value: '[threshold]を超えるすべての注文には、[percentage]の消費税に加えて、輸入エントリー取引手数料とMPI課税が適用されます。',
|
|
412
415
|
},
|
|
@@ -407,6 +407,9 @@ export const stringsKorean = {
|
|
|
407
407
|
'Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us.': {
|
|
408
408
|
value: '결제가 성공적으로 완료되었습니다! 저희와 함께 쇼핑해 주셔서 감사합니다! 즐거운 경험을 하셨기를 바라며, 귀하의 지원은 저희에게 매우 소중합니다.',
|
|
409
409
|
},
|
|
410
|
+
'Your selected payment method requires additional verification. Please follow the instructions provided by your payment provider to complete the transaction.': {
|
|
411
|
+
value: '선택한 결제 방법은 추가 확인이 필요합니다. 거래를 완료하려면 결제 제공업체에서 제공한 지침을 따르십시오.',
|
|
412
|
+
},
|
|
410
413
|
'[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.': {
|
|
411
414
|
value: '[threshold] 이상의 모든 주문에 대해 [percentage]의 부가가치세와 함께 수입 통관 수수료 및 MPI 부담금이 부과됩니다.',
|
|
412
415
|
},
|
|
@@ -407,6 +407,9 @@ export const stringsNorwegian = {
|
|
|
407
407
|
'Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us.': {
|
|
408
408
|
value: 'Betalingen din gikk igjennom! Takk for at du handler hos oss! Vi håper du hadde en hyggelig opplevelse og din støtte betyr utrolig mye for oss.',
|
|
409
409
|
},
|
|
410
|
+
'Your selected payment method requires additional verification. Please follow the instructions provided by your payment provider to complete the transaction.': {
|
|
411
|
+
value: 'Din valgte betalingsmetode krever ytterligere verifisering. Vennligst følg instruksjonene fra din betalingsleverandør for å fullføre transaksjonen.',
|
|
412
|
+
},
|
|
410
413
|
'[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.': {
|
|
411
414
|
value: '[percentage] GST skyldig for enhver ordre over [threshold], sammen med et importinngangstransaksjonsgebyr og MPI-avgift.',
|
|
412
415
|
},
|
|
@@ -407,6 +407,9 @@ export const stringsPolish = {
|
|
|
407
407
|
'Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us.': {
|
|
408
408
|
value: 'Twoja płatność została pomyślnie zrealizowana! Dziękujemy za zakupy u nas! Mamy nadzieję, że miałeś przyjemne doświadczenie, a Twoje wsparcie wiele dla nas znaczy.',
|
|
409
409
|
},
|
|
410
|
+
'Your selected payment method requires additional verification. Please follow the instructions provided by your payment provider to complete the transaction.': {
|
|
411
|
+
value: 'Wybrana metoda płatności wymaga dodatkowej weryfikacji. Proszę postępować zgodnie z instrukcjami dostarczonymi przez dostawcę płatności, aby zakończyć transakcję.',
|
|
412
|
+
},
|
|
410
413
|
'[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.': {
|
|
411
414
|
value: '[percentage] VAT należny od każdego zamówienia powyżej [threshold], wraz z opłatą za transakcję wprowadzania importu i opłatą MPI.',
|
|
412
415
|
},
|
|
@@ -407,6 +407,9 @@ export const stringsPortuguese = {
|
|
|
407
407
|
'Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us.': {
|
|
408
408
|
value: 'Seu pagamento foi processado com sucesso! Obrigado por comprar conosco! Esperamos que tenha tido uma experiência agradável e seu apoio significa muito para nós.',
|
|
409
409
|
},
|
|
410
|
+
'Your selected payment method requires additional verification. Please follow the instructions provided by your payment provider to complete the transaction.': {
|
|
411
|
+
value: 'Seu método de pagamento selecionado requer verificação adicional. Por favor, siga as instruções fornecidas pelo seu provedor de pagamento para completar a transação.',
|
|
412
|
+
},
|
|
410
413
|
'[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.': {
|
|
411
414
|
value: '[percentage] de GST devido em qualquer pedido acima de [threshold], juntamente com uma taxa de transação de entrada de importação e cobrança de MPI.',
|
|
412
415
|
},
|
|
@@ -407,6 +407,9 @@ export const stringsRussian = {
|
|
|
407
407
|
'Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us.': {
|
|
408
408
|
value: 'Оплата прошла успешно! Благодарим вас за покупку! Надеемся, вам понравилось, и ваша поддержка очень важна для нас.',
|
|
409
409
|
},
|
|
410
|
+
'Your selected payment method requires additional verification. Please follow the instructions provided by your payment provider to complete the transaction.': {
|
|
411
|
+
value: 'Ваш выбранный способ оплаты требует дополнительной проверки. Пожалуйста, следуйте инструкциям, предоставленным вашим поставщиком платежей, чтобы завершить транзакцию.',
|
|
412
|
+
},
|
|
410
413
|
'[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.': {
|
|
411
414
|
value: '[percentage] НДС за любой заказ свыше [threshold], включая комиссию за ввозную транзакцию и сбор MPI.',
|
|
412
415
|
},
|
|
@@ -407,6 +407,9 @@ export const stringsSpanish = {
|
|
|
407
407
|
'Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us.': {
|
|
408
408
|
value: '¡Su pago se realizó exitosamente! Gracias por comprar con nosotros. Esperamos que haya tenido una experiencia agradable y su apoyo significa mucho para nosotros.',
|
|
409
409
|
},
|
|
410
|
+
'Your selected payment method requires additional verification. Please follow the instructions provided by your payment provider to complete the transaction.': {
|
|
411
|
+
value: 'Su método de pago seleccionado requiere verificación adicional. Por favor, siga las instrucciones proporcionadas por su proveedor de pagos para completar la transacción.',
|
|
412
|
+
},
|
|
410
413
|
'[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.': {
|
|
411
414
|
value: '[percentage] del IVA debido en cualquier pedido superior a [threshold], junto con una tarifa de transacción de entrada de importación y un gravamen MPI.',
|
|
412
415
|
},
|
|
@@ -407,6 +407,9 @@ export const stringsSwedish = {
|
|
|
407
407
|
'Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us.': {
|
|
408
408
|
value: 'Din betalning gick igenom framgångsrikt! Tack för att du handlar med oss! Vi hoppas att du har haft en trevlig upplevelse och ditt stöd betyder mycket för oss.',
|
|
409
409
|
},
|
|
410
|
+
'Your selected payment method requires additional verification. Please follow the instructions provided by your payment provider to complete the transaction.': {
|
|
411
|
+
value: 'Din valda betalningsmetod kräver ytterligare verifiering. Vänligen följ instruktionerna från din betalningsleverantör för att slutföra transaktionen.',
|
|
412
|
+
},
|
|
410
413
|
'[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.': {
|
|
411
414
|
value: '[percentage] moms på varje beställning över [threshold], inklusive en importtransaktionsavgift och MPI-avgift.',
|
|
412
415
|
},
|
|
@@ -407,6 +407,9 @@ export const stringsTurkish = {
|
|
|
407
407
|
'Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us.': {
|
|
408
408
|
value: 'Ödemeniz başarıyla tamamlandı! Bizimle alışveriş yaptığınız için teşekkür ederiz! Keyifli bir deneyim yaşadığınızı umuyoruz ve desteğiniz bizim için çok değerli.',
|
|
409
409
|
},
|
|
410
|
+
'Your selected payment method requires additional verification. Please follow the instructions provided by your payment provider to complete the transaction.': {
|
|
411
|
+
value: 'Seçtiğiniz ödeme yöntemi ek doğrulama gerektirir. İşlemi tamamlamak için lütfen ödeme sağlayıcınız tarafından sağlanan talimatları izleyin.',
|
|
412
|
+
},
|
|
410
413
|
'[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.': {
|
|
411
414
|
value: '[threshold] üzerindeki her sipariş için [percentage] KDV, ithalat giriş işlem ücreti ve MPI vergisi ile birlikte ödenir.',
|
|
412
415
|
},
|
|
@@ -407,6 +407,9 @@ export const stringsVietnamese = {
|
|
|
407
407
|
'Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us.': {
|
|
408
408
|
value: 'Thanh toán của bạn thành công! Cảm ơn bạn đã mua sắm với chúng tôi! Chúng tôi hy vọng bạn có trải nghiệm thú vị và sự ủng hộ của bạn thật sự ý nghĩa với chúng tôi.',
|
|
409
409
|
},
|
|
410
|
+
'Your selected payment method requires additional verification. Please follow the instructions provided by your payment provider to complete the transaction.': {
|
|
411
|
+
value: 'Phương thức thanh toán bạn chọn yêu cầu xác minh bổ sung. Vui lòng làm theo hướng dẫn của nhà cung cấp thanh toán của bạn để hoàn tất giao dịch.',
|
|
412
|
+
},
|
|
410
413
|
'[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.': {
|
|
411
414
|
value: '[percentage] GST phải trả cho bất kỳ đơn hàng nào trên [threshold], cùng với phí giao dịch nhập khẩu và thuế MPI.',
|
|
412
415
|
},
|
|
@@ -124,9 +124,12 @@ Zonos.init = async (params) => {
|
|
|
124
124
|
_a.zonosApiKey = testPublicCredential;
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
|
-
// inject hidden button to
|
|
128
|
-
|
|
129
|
-
|
|
127
|
+
// Check if the stripe client secret is available in the url or session storage, inject hidden button to trigger checkout right away to check status of client secret
|
|
128
|
+
const clientSecretUrlParam = new URL(window.location.href).searchParams.get('payment_intent_client_secret') || sessionStorage.getItem('zonos--client-secret');
|
|
129
|
+
const shouldAttemptImmediatelyOpenCheckout = (_a.cartId && _a.cartData) || !!clientSecretUrlParam;
|
|
130
|
+
// inject hidden button to body to trigger checkout right away if we have cartData or stripe client secret
|
|
131
|
+
if (shouldAttemptImmediatelyOpenCheckout) {
|
|
132
|
+
log('Cart data or stripe client secret is available, inject hidden button and trigger checkout');
|
|
130
133
|
const hiddenButton = document.createElement('button');
|
|
131
134
|
hiddenButton.style.display = 'none';
|
|
132
135
|
hiddenButton.id = `${checkoutHiddenBtnSelector}`;
|
|
@@ -29,6 +29,7 @@ export const featureAspectKeyEnum = {
|
|
|
29
29
|
NewPayoutReport: 'new_payout_report',
|
|
30
30
|
PageAuditor: 'page_auditor',
|
|
31
31
|
PromptExplorer: 'prompt_explorer',
|
|
32
|
+
RulesUiCreate: 'rules_ui_create',
|
|
32
33
|
SupportTicketSystem: 'support_ticket_system',
|
|
33
34
|
TeamAuditor: 'team_auditor',
|
|
34
35
|
};
|
|
@@ -55,6 +56,7 @@ export const featureAudienceNameEnum = {
|
|
|
55
56
|
PrincipalEngineer: 'principal_engineer',
|
|
56
57
|
ProServeHead: 'pro_serve_head',
|
|
57
58
|
ProductManager: 'product_manager',
|
|
59
|
+
RulesUiCreateMerchant: 'rules_ui_create_merchant',
|
|
58
60
|
SupportTicketMerchants: 'support_ticket_merchants',
|
|
59
61
|
TechLead: 'tech_lead',
|
|
60
62
|
};
|
|
@@ -488,9 +490,6 @@ export function getSdk(client, withWrapper = defaultWrapper) {
|
|
|
488
490
|
failToGetQuoteErrors(variables, requestHeaders) {
|
|
489
491
|
return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'failToGetQuoteErrors', 'query');
|
|
490
492
|
},
|
|
491
|
-
failedToGetOrder(variables, requestHeaders) {
|
|
492
|
-
return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'failedToGetOrder', 'query');
|
|
493
|
-
},
|
|
494
493
|
getAudienceByAspectKey(variables, requestHeaders) {
|
|
495
494
|
return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'getAudienceByAspectKey', 'query');
|
|
496
495
|
},
|
|
@@ -1203,6 +1203,7 @@ export const emailTemplateStatus = {
|
|
|
1203
1203
|
};
|
|
1204
1204
|
export const emailTemplateType = {
|
|
1205
1205
|
AbandonedCart: 'ABANDONED_CART',
|
|
1206
|
+
AccountOrderReceipt: 'ACCOUNT_ORDER_RECEIPT',
|
|
1206
1207
|
CatalogExport: 'CATALOG_EXPORT',
|
|
1207
1208
|
ClassificationExport: 'CLASSIFICATION_EXPORT',
|
|
1208
1209
|
Custom: 'CUSTOM',
|