@zonos/elements 1.3.249 → 1.3.250
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-eca56521.js → cart-fcd1359c.js} +318 -19
- package/dist/cjs/{hasInclusivePrice-e7d67b45.js → hasInclusivePrice-745a8f29.js} +1 -1
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{invoice-918f2c2b.js → invoice-f040e147.js} +2 -2
- package/dist/cjs/{isCollectMobileTablet-89911215.js → isCollectMobileTablet-cf92852e.js} +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{localization-878ef681.js → localization-523b793a.js} +660 -0
- package/dist/cjs/{paypal-6acca678.js → paypal-8c98c0a1.js} +29 -2
- package/dist/cjs/{placeTestOrder-f1c1e939.js → placeTestOrder-9b1e09f0.js} +2 -2
- package/dist/cjs/{renderCheckoutCurrency-d9590e81.js → renderCheckoutCurrency-94b6e51d.js} +2 -2
- package/dist/cjs/{zonos-address-display_9.cjs.entry.js → zonos-address-display_8.cjs.entry.js} +3 -79
- package/dist/cjs/zonos-address_4.cjs.entry.js +2 -2
- package/dist/cjs/zonos-card_5.cjs.entry.js +3 -3
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +74 -20
- package/dist/cjs/zonos-checkbox_2.cjs.entry.js +113 -0
- package/dist/cjs/zonos-checkout.cjs.entry.js +52 -3
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +2 -2
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +6 -6
- package/dist/cjs/zonos-collect.cjs.entry.js +4 -4
- package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
- 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 +2 -2
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +4 -4
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +6 -6
- package/dist/cjs/zonos-invoice.cjs.entry.js +4 -4
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-store-credit.cjs.entry.js +113 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +3 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +49 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +18 -10
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-store-credit/assets/StoreCreditIcon.svg +3 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-store-credit/zonos-store-credit.css +139 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-store-credit/zonos-store-credit.js +137 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +52 -1
- package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +1 -1
- package/dist/collection/components/main/zonos-controller.js +1 -1
- package/dist/collection/components/store/checkout/cart.js +62 -4
- package/dist/collection/components/store/checkout/paypal.js +28 -0
- package/dist/collection/components/store/checkout/storeCredit.js +237 -0
- package/dist/collection/components/store/checkout/stripe.js +2 -1
- package/dist/collection/components/store/translationStore/strings.arabic.js +33 -0
- package/dist/collection/components/store/translationStore/strings.base.js +33 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +33 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +33 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +33 -0
- package/dist/collection/components/store/translationStore/strings.french.js +33 -0
- package/dist/collection/components/store/translationStore/strings.german.js +33 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +33 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +33 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +33 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +33 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +33 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +33 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +33 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +33 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +33 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +33 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +33 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +33 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +33 -0
- package/dist/collection/types/generated/graphql.internal.types.js +589 -0
- package/dist/esm/{cart-efb30253.js → cart-6e465f7b.js} +309 -21
- package/dist/esm/{hasInclusivePrice-565ddbe5.js → hasInclusivePrice-c49d384d.js} +1 -1
- package/dist/esm/index.js +7 -7
- package/dist/esm/{invoice-0e462fcc.js → invoice-d416ba65.js} +2 -2
- package/dist/esm/{isCollectMobileTablet-0bcba25a.js → isCollectMobileTablet-48040572.js} +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{localization-c1aff677.js → localization-f4a7fb5a.js} +660 -0
- package/dist/esm/{paypal-06b67be0.js → paypal-6af6b978.js} +29 -2
- package/dist/esm/{placeTestOrder-6c9a6c8a.js → placeTestOrder-d19ac166.js} +2 -2
- package/dist/esm/{renderCheckoutCurrency-910fea67.js → renderCheckoutCurrency-c8aa8e7e.js} +2 -2
- package/dist/esm/{zonos-address-display_9.entry.js → zonos-address-display_8.entry.js} +4 -79
- package/dist/esm/zonos-address_4.entry.js +2 -2
- package/dist/esm/zonos-card_5.entry.js +3 -3
- package/dist/esm/zonos-cart-items_12.entry.js +74 -20
- package/dist/esm/zonos-checkbox_2.entry.js +108 -0
- package/dist/esm/zonos-checkout.entry.js +52 -3
- package/dist/esm/zonos-collect-cart-items_3.entry.js +2 -2
- package/dist/esm/zonos-collect-finish_6.entry.js +6 -6
- package/dist/esm/zonos-collect.entry.js +4 -4
- package/dist/esm/zonos-controller.entry.js +2 -2
- 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 +2 -2
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-invoice-cart-items_2.entry.js +4 -4
- package/dist/esm/zonos-invoice-finish_5.entry.js +6 -6
- package/dist/esm/zonos-invoice.entry.js +4 -4
- package/dist/esm/zonos-language-select_2.entry.js +1 -1
- package/dist/esm/zonos-store-credit.entry.js +109 -0
- package/dist/esm-es5/cart-6e465f7b.js +1 -0
- package/dist/esm-es5/hasInclusivePrice-c49d384d.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{invoice-0e462fcc.js → invoice-d416ba65.js} +1 -1
- package/dist/esm-es5/{isCollectMobileTablet-0bcba25a.js → isCollectMobileTablet-48040572.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/localization-f4a7fb5a.js +1 -0
- package/dist/esm-es5/paypal-6af6b978.js +17 -0
- package/dist/esm-es5/{placeTestOrder-6c9a6c8a.js → placeTestOrder-d19ac166.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-910fea67.js → renderCheckoutCurrency-c8aa8e7e.js} +1 -1
- package/dist/esm-es5/zonos-address-display_8.entry.js +1 -0
- package/dist/esm-es5/zonos-address_4.entry.js +1 -1
- package/dist/esm-es5/zonos-card_5.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
- package/dist/esm-es5/zonos-checkbox_2.entry.js +1 -0
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
- package/dist/esm-es5/zonos-collect.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-invoice-cart-items_2.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-store-credit.entry.js +1 -0
- package/dist/scripts/index.d.ts +58 -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 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-store-credit/zonos-store-credit.d.ts +17 -0
- package/dist/types/components/store/checkout/cart.d.ts +8 -1
- package/dist/types/components/store/checkout/storeCredit.d.ts +111 -0
- package/dist/types/components/store/checkout/stripe.d.ts +1 -1
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +33 -0
- package/dist/types/components.d.ts +21 -0
- package/dist/types/types/checkout/api/CheckoutSession.d.ts +9 -1
- package/dist/types/types/generated/graphql.internal.types.d.ts +713 -4
- package/dist/types/types/generated/graphql.internal.types.ts +956 -4
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-456c0e52.js → p-13ed3789.js} +1 -1
- package/dist/zonos-elements/{p-0a2abbab.system.entry.js → p-17fbfda0.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-8a424412.entry.js → p-1b56814d.entry.js} +1 -1
- package/dist/zonos-elements/p-1e6509d7.js +1 -0
- package/dist/zonos-elements/{p-3ad2a9a3.system.entry.js → p-1f63615f.system.entry.js} +1 -1
- package/dist/zonos-elements/p-2435f196.entry.js +1 -0
- package/dist/zonos-elements/{p-4d4b7faa.entry.js → p-26848428.entry.js} +1 -1
- package/dist/zonos-elements/p-28d62fc8.system.entry.js +1 -0
- package/dist/zonos-elements/p-29b60bf3.system.js +1 -1
- package/dist/zonos-elements/p-2b7ef406.system.js +18 -0
- package/dist/zonos-elements/{p-54c95926.entry.js → p-3827041d.entry.js} +1 -1
- package/dist/zonos-elements/{p-321d2963.js → p-48228d76.js} +1 -1
- package/dist/zonos-elements/p-4d5932ac.system.entry.js +1 -0
- package/dist/zonos-elements/{p-4d081ce8.entry.js → p-59fe8416.entry.js} +1 -1
- package/dist/zonos-elements/{p-101226f3.system.entry.js → p-5ca50862.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-36bea5d5.system.entry.js → p-5fceccc3.system.entry.js} +1 -1
- package/dist/zonos-elements/p-64ad0854.entry.js +1 -0
- package/dist/zonos-elements/{p-c87d3d50.system.js → p-65892fa7.system.js} +1 -1
- package/dist/zonos-elements/{p-b9a4430c.entry.js → p-66e1dc55.entry.js} +1 -1
- package/dist/zonos-elements/{p-09110bb7.system.entry.js → p-7042c6da.system.entry.js} +1 -1
- package/dist/zonos-elements/p-741e07e1.system.entry.js +1 -0
- package/dist/zonos-elements/{p-0aeba2c7.system.js → p-77113201.system.js} +1 -1
- package/dist/zonos-elements/{p-6d37f669.entry.js → p-77c0a02b.entry.js} +1 -1
- package/dist/zonos-elements/{p-a75b3efc.system.entry.js → p-85529818.system.entry.js} +1 -1
- package/dist/zonos-elements/p-8f1ab25c.system.entry.js +1 -0
- package/dist/zonos-elements/{p-1b5f89d5.system.js → p-90b8c428.system.js} +1 -1
- package/dist/zonos-elements/p-997b7eef.js +1 -0
- package/dist/zonos-elements/{p-4c087a8e.system.entry.js → p-9bc5e944.system.entry.js} +1 -1
- package/dist/zonos-elements/p-9c6917ab.system.js +1 -0
- package/dist/zonos-elements/{p-358dfb9e.entry.js → p-9d64783a.entry.js} +1 -1
- package/dist/zonos-elements/{p-1f1bf95c.system.entry.js → p-9f49e35a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3ece0f96.system.entry.js → p-a026b5ad.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-4a395eea.system.entry.js → p-a1a3657e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-079bc009.system.entry.js → p-a1b0e9a5.system.entry.js} +1 -1
- package/dist/zonos-elements/p-a6a401e5.system.entry.js +1 -0
- package/dist/zonos-elements/{p-302b7105.system.entry.js → p-b07da3e8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f31fbbf0.entry.js → p-b08bf843.entry.js} +1 -1
- package/dist/zonos-elements/p-b334c76c.entry.js +1 -0
- package/dist/zonos-elements/{p-bc6b33fa.entry.js → p-b9581a92.entry.js} +1 -1
- package/dist/zonos-elements/p-c30a155e.js +1 -0
- package/dist/zonos-elements/{p-9c64ca98.system.entry.js → p-cad67b10.system.entry.js} +1 -1
- package/dist/zonos-elements/p-cc78c9d4.js +17 -0
- package/dist/zonos-elements/{p-5eaa0de1.entry.js → p-d2301d8a.entry.js} +1 -1
- package/dist/zonos-elements/p-d46484aa.entry.js +1 -0
- package/dist/zonos-elements/{p-b589f621.system.entry.js → p-d634f954.system.entry.js} +1 -1
- package/dist/zonos-elements/p-df316670.system.js +1 -0
- package/dist/zonos-elements/p-e331a235.js +1 -0
- package/dist/zonos-elements/p-e4d58bd7.js +1 -0
- package/dist/zonos-elements/{p-8d1efd7b.entry.js → p-e9ca4447.entry.js} +1 -1
- package/dist/zonos-elements/{p-c9e3bc98.system.js → p-f0855df3.system.js} +1 -1
- package/dist/zonos-elements/{p-06e2bc14.entry.js → p-f25e7f5a.entry.js} +1 -1
- package/dist/zonos-elements/{p-b360ee5b.entry.js → p-f4cc124f.entry.js} +1 -1
- package/dist/zonos-elements/{p-bd004403.system.js → p-fa0139c3.system.js} +1 -1
- package/dist/zonos-elements/{p-8b206982.system.js → p-fa5767c3.system.js} +1 -1
- package/dist/zonos-elements/{p-26718a78.entry.js → p-fbfaa4f9.entry.js} +1 -1
- package/dist/zonos-elements/p-fe6cc354.entry.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/zonos-toggle.cjs.entry.js +0 -35
- package/dist/esm/zonos-toggle.entry.js +0 -31
- package/dist/esm-es5/cart-efb30253.js +0 -1
- package/dist/esm-es5/hasInclusivePrice-565ddbe5.js +0 -1
- package/dist/esm-es5/localization-c1aff677.js +0 -1
- package/dist/esm-es5/paypal-06b67be0.js +0 -17
- package/dist/esm-es5/zonos-address-display_9.entry.js +0 -1
- package/dist/esm-es5/zonos-toggle.entry.js +0 -1
- package/dist/zonos-elements/p-096182f0.system.js +0 -1
- package/dist/zonos-elements/p-127e0395.js +0 -17
- package/dist/zonos-elements/p-197d9b23.system.entry.js +0 -1
- package/dist/zonos-elements/p-25dd58f8.system.entry.js +0 -1
- package/dist/zonos-elements/p-445072f8.js +0 -1
- package/dist/zonos-elements/p-507f00d2.js +0 -1
- package/dist/zonos-elements/p-5fd0cd66.system.js +0 -1
- package/dist/zonos-elements/p-661cd4ce.system.entry.js +0 -1
- package/dist/zonos-elements/p-777e0a81.entry.js +0 -1
- package/dist/zonos-elements/p-7e77b055.system.entry.js +0 -1
- package/dist/zonos-elements/p-80524eac.entry.js +0 -1
- package/dist/zonos-elements/p-9eea270b.entry.js +0 -1
- package/dist/zonos-elements/p-c4e358f2.js +0 -1
- package/dist/zonos-elements/p-cda52300.js +0 -1
- package/dist/zonos-elements/p-d233ef0d.entry.js +0 -1
- package/dist/zonos-elements/p-f8f7d491.js +0 -1
- package/dist/zonos-elements/p-fc0aa91e.system.js +0 -18
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { loadScript, } from "@paypal/paypal-js";
|
|
2
2
|
import { createStore } from "@stencil/store";
|
|
3
3
|
import { cartStore, cartStoreClearCheckoutInterval, cartStoreNextStep, } from "./cart";
|
|
4
|
+
import { storeCreditStoreApplyCredit, storeCreditStoreCoversFullAmount, storeCreditStoreCreateOrder, storeCreditStoreGetEffectiveAmount, } from "./storeCredit";
|
|
4
5
|
import { stripeStore, stripeStoreHandleInventoryCheck, } from "./stripe";
|
|
5
6
|
import { storageStore } from "../storageStore";
|
|
6
7
|
import { translate } from "../translationStore";
|
|
@@ -121,6 +122,33 @@ const paypalButtonOptions = ({ checkoutSessionId, onPaypalFail, onPaypalSessionD
|
|
|
121
122
|
if (cartStore.inventoryCheckErrorMessage) {
|
|
122
123
|
return '';
|
|
123
124
|
}
|
|
125
|
+
// Apply store credit if customer has selected an amount
|
|
126
|
+
const storeCreditAmount = storeCreditStoreGetEffectiveAmount();
|
|
127
|
+
if (storeCreditAmount > 0) {
|
|
128
|
+
const storeCreditResult = await storeCreditStoreApplyCredit();
|
|
129
|
+
if (!storeCreditResult.success) {
|
|
130
|
+
paypalStore.paypalErrorMessage =
|
|
131
|
+
storeCreditResult.error ||
|
|
132
|
+
translate('Unable to apply store credit. Please try again.');
|
|
133
|
+
onPaypalFail === null || onPaypalFail === void 0 ? void 0 : onPaypalFail();
|
|
134
|
+
return '';
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
// If store credit covers the full order, create order directly
|
|
138
|
+
if (storeCreditStoreCoversFullAmount()) {
|
|
139
|
+
const orderResult = await storeCreditStoreCreateOrder();
|
|
140
|
+
if (!orderResult.success) {
|
|
141
|
+
paypalStore.paypalErrorMessage =
|
|
142
|
+
orderResult.error ||
|
|
143
|
+
translate('Unable to place order with store credit. Please try again.');
|
|
144
|
+
onPaypalFail === null || onPaypalFail === void 0 ? void 0 : onPaypalFail();
|
|
145
|
+
return '';
|
|
146
|
+
}
|
|
147
|
+
onPaypalSessionDone === null || onPaypalSessionDone === void 0 ? void 0 : onPaypalSessionDone({ orderId: orderResult.orderId || '' });
|
|
148
|
+
cartStoreNextStep();
|
|
149
|
+
cartStoreClearCheckoutInterval();
|
|
150
|
+
return '';
|
|
151
|
+
}
|
|
124
152
|
const paypalOrderId = await paypalStoreCreaterOrder({
|
|
125
153
|
checkoutSessionId,
|
|
126
154
|
});
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import { createStore } from "@stencil/store";
|
|
2
|
+
import { cartStore } from "./cart";
|
|
3
|
+
import { storageStore } from "../storageStore";
|
|
4
|
+
import { getCheckoutSession } from "../../utils/api/getCheckoutSession";
|
|
5
|
+
import { handleFetch } from "../../utils/handleFetch";
|
|
6
|
+
import { log } from "../../utils/logging/log";
|
|
7
|
+
import { logError } from "../../utils/logging/logError";
|
|
8
|
+
const { onChange: storeCreditStoreOnChange, reset, state: storeCreditStore, } = createStore(() => ({
|
|
9
|
+
amountToApply: null,
|
|
10
|
+
appliedAmount: null,
|
|
11
|
+
availableBalance: null,
|
|
12
|
+
error: null,
|
|
13
|
+
isApplying: false,
|
|
14
|
+
isEnabled: false,
|
|
15
|
+
orderIdCreated: null,
|
|
16
|
+
remainingBalance: null,
|
|
17
|
+
useFullBalance: true,
|
|
18
|
+
}));
|
|
19
|
+
/**
|
|
20
|
+
* Reset store credit store to initial state
|
|
21
|
+
*/
|
|
22
|
+
const storeCreditStoreReset = () => {
|
|
23
|
+
reset();
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Set the available balance from the checkout session's customerProfile.storeCreditBalance
|
|
27
|
+
*/
|
|
28
|
+
const storeCreditStoreSetBalanceFromSession = (balance) => {
|
|
29
|
+
log('Store credit balance from session', 'info', balance);
|
|
30
|
+
storeCreditStore.availableBalance = balance;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Re-fetch the store credit balance from the checkout session.
|
|
34
|
+
* Called when the payment step loads to ensure the balance is fresh.
|
|
35
|
+
*/
|
|
36
|
+
const storeCreditStoreRefreshBalance = async () => {
|
|
37
|
+
var _a, _b;
|
|
38
|
+
const { errors, json } = await getCheckoutSession();
|
|
39
|
+
if (errors.length || !json) {
|
|
40
|
+
logError('Failed to refresh store credit balance');
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
const balance = (_b = (_a = json.checkoutSession.customerProfile) === null || _a === void 0 ? void 0 : _a.storeCreditBalance) !== null && _b !== void 0 ? _b : null;
|
|
44
|
+
storeCreditStoreSetBalanceFromSession(balance);
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Apply store credit to the checkout session.
|
|
48
|
+
* This must be called BEFORE payment confirmation.
|
|
49
|
+
* The amount/mode are already set via checkout session update with storeCreditApplication.
|
|
50
|
+
*/
|
|
51
|
+
const storeCreditStoreApplyCredit = async () => {
|
|
52
|
+
var _a;
|
|
53
|
+
const checkoutSessionId = storageStore.checkoutSessionId;
|
|
54
|
+
if (!checkoutSessionId) {
|
|
55
|
+
const error = 'No checkout session found';
|
|
56
|
+
logError(error);
|
|
57
|
+
storeCreditStore.error = error;
|
|
58
|
+
return { error, success: false };
|
|
59
|
+
}
|
|
60
|
+
log('Applying store credit', 'info', { checkoutSessionId });
|
|
61
|
+
storeCreditStore.isApplying = true;
|
|
62
|
+
storeCreditStore.error = null;
|
|
63
|
+
try {
|
|
64
|
+
const { errors, json } = await handleFetch('/api/zonos-elements/store-credit/apply', {
|
|
65
|
+
body: {
|
|
66
|
+
checkoutSessionId,
|
|
67
|
+
},
|
|
68
|
+
method: 'POST',
|
|
69
|
+
});
|
|
70
|
+
if (errors.length > 0 || !json) {
|
|
71
|
+
const errorMessage = ((_a = errors[0]) === null || _a === void 0 ? void 0 : _a.message) || 'Failed to apply store credit';
|
|
72
|
+
logError(errorMessage);
|
|
73
|
+
storeCreditStore.error = errorMessage;
|
|
74
|
+
storeCreditStore.isApplying = false;
|
|
75
|
+
return { error: errorMessage, success: false };
|
|
76
|
+
}
|
|
77
|
+
storeCreditStore.appliedAmount = json.amountApplied;
|
|
78
|
+
storeCreditStore.remainingBalance = json.remainingBalance;
|
|
79
|
+
storeCreditStore.isApplying = false;
|
|
80
|
+
log('Store credit applied', 'info', {
|
|
81
|
+
amountApplied: json.amountApplied,
|
|
82
|
+
remainingBalance: json.remainingBalance,
|
|
83
|
+
});
|
|
84
|
+
return { error: null, success: true };
|
|
85
|
+
}
|
|
86
|
+
catch (e) {
|
|
87
|
+
const errorMessage = e instanceof Error ? e.message : 'Failed to apply store credit';
|
|
88
|
+
logError(errorMessage);
|
|
89
|
+
storeCreditStore.error = errorMessage;
|
|
90
|
+
storeCreditStore.isApplying = false;
|
|
91
|
+
return { error: errorMessage, success: false };
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* Enable or disable store credit usage.
|
|
96
|
+
* When enabling, defaults to full balance mode.
|
|
97
|
+
* When disabling, clears the amount.
|
|
98
|
+
*/
|
|
99
|
+
const storeCreditStoreSetEnabled = (enabled) => {
|
|
100
|
+
storeCreditStore.isEnabled = enabled;
|
|
101
|
+
storeCreditStore.error = null;
|
|
102
|
+
if (!enabled) {
|
|
103
|
+
storeCreditStore.amountToApply = null;
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* Set the amount of store credit to apply
|
|
108
|
+
* Validates against available balance and cart total
|
|
109
|
+
*/
|
|
110
|
+
const storeCreditStoreSetAmount = (amount) => {
|
|
111
|
+
if (amount === null) {
|
|
112
|
+
storeCreditStore.amountToApply = null;
|
|
113
|
+
storeCreditStore.error = null;
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
// Validate amount
|
|
117
|
+
if (amount <= 0) {
|
|
118
|
+
storeCreditStore.error = 'Amount must be greater than zero';
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
if (storeCreditStore.availableBalance !== null &&
|
|
122
|
+
amount > storeCreditStore.availableBalance) {
|
|
123
|
+
storeCreditStore.error = 'Amount exceeds available balance';
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
const orderTotal = cartStore.total + (cartStore.storeCredit || 0);
|
|
127
|
+
if (amount > orderTotal) {
|
|
128
|
+
storeCreditStore.error = 'Amount exceeds order total';
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
storeCreditStore.error = null;
|
|
132
|
+
storeCreditStore.amountToApply = amount;
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
* Toggle whether to use full balance or custom amount.
|
|
136
|
+
* When switching to custom mode, clears the applied amount so the user
|
|
137
|
+
* must explicitly apply via the Apply button.
|
|
138
|
+
*/
|
|
139
|
+
const storeCreditStoreSetUseFullBalance = (useFullBalance) => {
|
|
140
|
+
storeCreditStore.useFullBalance = useFullBalance;
|
|
141
|
+
storeCreditStore.error = null;
|
|
142
|
+
if (useFullBalance && storeCreditStore.availableBalance !== null) {
|
|
143
|
+
const orderTotal = cartStore.total + (cartStore.storeCredit || 0);
|
|
144
|
+
const maxAmount = Math.min(storeCreditStore.availableBalance, orderTotal);
|
|
145
|
+
storeCreditStore.amountToApply = maxAmount;
|
|
146
|
+
}
|
|
147
|
+
else if (!useFullBalance) {
|
|
148
|
+
storeCreditStore.amountToApply = null;
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
/**
|
|
152
|
+
* Get the storeCreditApplication input for checkout session update.
|
|
153
|
+
* Sends mode: 'NONE' when store credit is not being used to clear any
|
|
154
|
+
* previously applied store credit on the backend.
|
|
155
|
+
*/
|
|
156
|
+
const storeCreditStoreGetInput = () => {
|
|
157
|
+
if (!storeCreditStore.isEnabled || storeCreditStore.amountToApply === null) {
|
|
158
|
+
return { mode: 'NONE' };
|
|
159
|
+
}
|
|
160
|
+
if (storeCreditStore.useFullBalance) {
|
|
161
|
+
return { mode: 'FULL' };
|
|
162
|
+
}
|
|
163
|
+
return {
|
|
164
|
+
amount: storeCreditStore.amountToApply,
|
|
165
|
+
mode: 'PARTIAL',
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
/**
|
|
169
|
+
* Get the effective amount to apply based on settings
|
|
170
|
+
*/
|
|
171
|
+
const storeCreditStoreGetEffectiveAmount = () => {
|
|
172
|
+
if (!storeCreditStore.isEnabled ||
|
|
173
|
+
storeCreditStore.availableBalance === null) {
|
|
174
|
+
return 0;
|
|
175
|
+
}
|
|
176
|
+
if (storeCreditStore.useFullBalance) {
|
|
177
|
+
return Math.min(storeCreditStore.availableBalance, cartStore.total + (cartStore.storeCredit || 0));
|
|
178
|
+
}
|
|
179
|
+
return storeCreditStore.amountToApply || 0;
|
|
180
|
+
};
|
|
181
|
+
/**
|
|
182
|
+
* Check whether the effective store credit amount covers the full order total.
|
|
183
|
+
* When true, the Stripe/PayPal payment flow should be skipped and
|
|
184
|
+
* `storeCreditStoreCreateOrder` should be used instead.
|
|
185
|
+
*
|
|
186
|
+
* Relies on the backend's computed `cartStore.total` (remaining amount to pay
|
|
187
|
+
* after store credit) rather than a client-side comparison, which avoids issues
|
|
188
|
+
* with currency mismatches or rounding.
|
|
189
|
+
*/
|
|
190
|
+
const storeCreditStoreCoversFullAmount = () => {
|
|
191
|
+
// Only consider full coverage after the backend has confirmed store credit
|
|
192
|
+
// was applied (cartStore.storeCredit > 0) and the remaining total is 0.
|
|
193
|
+
return (storeCreditStore.amountToApply !== null &&
|
|
194
|
+
storeCreditStore.amountToApply > 0 &&
|
|
195
|
+
cartStore.storeCredit > 0 &&
|
|
196
|
+
cartStore.total <= 0);
|
|
197
|
+
};
|
|
198
|
+
/**
|
|
199
|
+
* Create an order paid entirely by store credit.
|
|
200
|
+
* Should only be called when `storeCreditStoreCoversFullAmount()` is true.
|
|
201
|
+
*/
|
|
202
|
+
const storeCreditStoreCreateOrder = async () => {
|
|
203
|
+
var _a, _b, _c;
|
|
204
|
+
const checkoutSessionId = storageStore.checkoutSessionId;
|
|
205
|
+
if (!checkoutSessionId) {
|
|
206
|
+
const error = 'No checkout session found';
|
|
207
|
+
logError(error);
|
|
208
|
+
storeCreditStore.error = error;
|
|
209
|
+
return { error, orderId: null, success: false };
|
|
210
|
+
}
|
|
211
|
+
log('Creating store credit order', 'info', { checkoutSessionId });
|
|
212
|
+
try {
|
|
213
|
+
const { errors, json } = await handleFetch('/api/zonos-elements/store-credit/order-create', {
|
|
214
|
+
body: {
|
|
215
|
+
checkoutSessionId,
|
|
216
|
+
},
|
|
217
|
+
method: 'POST',
|
|
218
|
+
});
|
|
219
|
+
if (errors.length > 0 || !json) {
|
|
220
|
+
const errorMessage = ((_a = errors[0]) === null || _a === void 0 ? void 0 : _a.message) || 'Failed to create store credit order';
|
|
221
|
+
logError(errorMessage);
|
|
222
|
+
storeCreditStore.error = errorMessage;
|
|
223
|
+
return { error: errorMessage, orderId: null, success: false };
|
|
224
|
+
}
|
|
225
|
+
const orderId = ((_c = (_b = json.checkoutSessionStoreCreditOrderCreate) === null || _b === void 0 ? void 0 : _b.order) === null || _c === void 0 ? void 0 : _c.id) || null;
|
|
226
|
+
storeCreditStore.orderIdCreated = orderId;
|
|
227
|
+
log('Store credit order created', 'info', { orderId });
|
|
228
|
+
return { error: null, orderId, success: true };
|
|
229
|
+
}
|
|
230
|
+
catch (e) {
|
|
231
|
+
const errorMessage = e instanceof Error ? e.message : 'Failed to create store credit order';
|
|
232
|
+
logError(errorMessage);
|
|
233
|
+
storeCreditStore.error = errorMessage;
|
|
234
|
+
return { error: errorMessage, orderId: null, success: false };
|
|
235
|
+
}
|
|
236
|
+
};
|
|
237
|
+
export { storeCreditStore, storeCreditStoreApplyCredit, storeCreditStoreCoversFullAmount, storeCreditStoreCreateOrder, storeCreditStoreGetEffectiveAmount, storeCreditStoreGetInput, storeCreditStoreOnChange, storeCreditStoreRefreshBalance, storeCreditStoreReset, storeCreditStoreSetAmount, storeCreditStoreSetBalanceFromSession, storeCreditStoreSetEnabled, storeCreditStoreSetUseFullBalance, };
|
|
@@ -1025,7 +1025,7 @@ const stripeStoreUpdateCheckoutSessionBaseCurrency = async () => {
|
|
|
1025
1025
|
/**
|
|
1026
1026
|
* Update checkout session. Use for updating amount with landed cost id, or update session when cart items change
|
|
1027
1027
|
*/
|
|
1028
|
-
const stripeStoreUpdateCheckoutSession = async ({ adjustmentsAmount, cartId, currency, id, itemsAmount, landedCostId, presentmentCountryCode, }) => {
|
|
1028
|
+
const stripeStoreUpdateCheckoutSession = async ({ adjustmentsAmount, cartId, currency, id, itemsAmount, landedCostId, presentmentCountryCode, storeCreditApplication, }) => {
|
|
1029
1029
|
const varianceTestInput = storageStore.enabledVariantTestKeys || [];
|
|
1030
1030
|
// No need to set loading state here because this function will be called under the hood to update
|
|
1031
1031
|
// landed cost id for the section.
|
|
@@ -1048,6 +1048,7 @@ const stripeStoreUpdateCheckoutSession = async ({ adjustmentsAmount, cartId, cur
|
|
|
1048
1048
|
presentmentCountryCode,
|
|
1049
1049
|
shipToPartyId: stripeStore.partyShippingId,
|
|
1050
1050
|
skipPaymentIntent: stripeStore.skipPaymentIntent,
|
|
1051
|
+
storeCreditApplication,
|
|
1051
1052
|
varianceTestInput,
|
|
1052
1053
|
},
|
|
1053
1054
|
method: 'POST',
|
|
@@ -44,18 +44,27 @@ export const stringsArabic = {
|
|
|
44
44
|
'Adresa vulytsi': {
|
|
45
45
|
value: 'عنوان الشارع',
|
|
46
46
|
},
|
|
47
|
+
'Amount to apply: [amount]': {
|
|
48
|
+
value: 'Amount to apply: [amount]',
|
|
49
|
+
},
|
|
47
50
|
'An unexpected error occurred when processing PayPal order.': {
|
|
48
51
|
value: 'حدث خطأ غير متوقع عند معالجة طلب PayPal.',
|
|
49
52
|
},
|
|
50
53
|
Apply: {
|
|
51
54
|
value: 'تطبيق',
|
|
52
55
|
},
|
|
56
|
+
'Apply full balance': {
|
|
57
|
+
value: 'Apply full balance',
|
|
58
|
+
},
|
|
53
59
|
'Are you sure?': {
|
|
54
60
|
value: 'هل أنت متأكد؟',
|
|
55
61
|
},
|
|
56
62
|
Area: {
|
|
57
63
|
value: 'منطقة',
|
|
58
64
|
},
|
|
65
|
+
'Available balance: [amount]': {
|
|
66
|
+
value: 'Available balance: [amount]',
|
|
67
|
+
},
|
|
59
68
|
Back: {
|
|
60
69
|
value: 'رجوع',
|
|
61
70
|
},
|
|
@@ -224,6 +233,9 @@ export const stringsArabic = {
|
|
|
224
233
|
Emirate: {
|
|
225
234
|
value: 'إمارة',
|
|
226
235
|
},
|
|
236
|
+
'Enter amount': {
|
|
237
|
+
value: 'Enter amount',
|
|
238
|
+
},
|
|
227
239
|
'Error creating Checkout': {
|
|
228
240
|
value: 'خطأ في إنشاء جلسة الخروج',
|
|
229
241
|
},
|
|
@@ -347,6 +359,9 @@ export const stringsArabic = {
|
|
|
347
359
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
348
360
|
value: 'لم يتم العثور على طرق شحن - جرب تحرير عنوانك أو الاتصال بالدعم إذا استمر الخطأ',
|
|
349
361
|
},
|
|
362
|
+
'No store credit available': {
|
|
363
|
+
value: 'No store credit available',
|
|
364
|
+
},
|
|
350
365
|
'Nothing due at delivery': {
|
|
351
366
|
value: 'لا شيء مستحق عند التسليم',
|
|
352
367
|
},
|
|
@@ -413,6 +428,9 @@ export const stringsArabic = {
|
|
|
413
428
|
'Phone number': {
|
|
414
429
|
value: 'رقم الهاتف',
|
|
415
430
|
},
|
|
431
|
+
'Place order': {
|
|
432
|
+
value: 'تقديم الطلب',
|
|
433
|
+
},
|
|
416
434
|
'Place test order': {
|
|
417
435
|
value: 'إجراء طلب اختبار',
|
|
418
436
|
},
|
|
@@ -569,6 +587,12 @@ export const stringsArabic = {
|
|
|
569
587
|
'State/Province/Region/Prefecture': {
|
|
570
588
|
value: 'ولاية/مقاطعة/منطقة/محافظة',
|
|
571
589
|
},
|
|
590
|
+
'Store credit': {
|
|
591
|
+
value: 'Store credit',
|
|
592
|
+
},
|
|
593
|
+
'Store credit covers your full order': {
|
|
594
|
+
value: 'يغطي رصيد المتجر طلبك بالكامل',
|
|
595
|
+
},
|
|
572
596
|
'Street address': {
|
|
573
597
|
value: 'عنوان الشارع',
|
|
574
598
|
},
|
|
@@ -656,12 +680,18 @@ export const stringsArabic = {
|
|
|
656
680
|
Ulica: {
|
|
657
681
|
value: 'شارع',
|
|
658
682
|
},
|
|
683
|
+
'Unable to apply store credit. Please try again.': {
|
|
684
|
+
value: 'Unable to apply store credit. Please try again.',
|
|
685
|
+
},
|
|
659
686
|
'Unable to check inventory. Please try again.': {
|
|
660
687
|
value: 'تعذر التحقق من المخزون. حاول مرة أخرى.',
|
|
661
688
|
},
|
|
662
689
|
'Unable to complete payment in [currency]. Please try again or select a different currency. If the issue persists, contact our support team for assistance.': {
|
|
663
690
|
value: 'غير قادر على إتمام الدفع بعملة [currency]. يرجى المحاولة مرة أخرى أو اختيار عملة مختلفة. إذا استمرت المشكلة، اتصل بفريق الدعم لدينا للحصول على المساعدة.',
|
|
664
691
|
},
|
|
692
|
+
'Unable to place order with store credit. Please try again.': {
|
|
693
|
+
value: 'تعذر إتمام الطلب باستخدام رصيد المتجر. يرجى المحاولة مرة أخرى.',
|
|
694
|
+
},
|
|
665
695
|
'Unable to retrieve the checkout session at the moment. Please try again or contact our support team.': {
|
|
666
696
|
value: 'غير قادر على استرداد جلسة الدفع في الوقت الحالي. يرجى المحاولة مرة أخرى أو الاتصال بفريق الدعم لدينا.',
|
|
667
697
|
},
|
|
@@ -674,6 +704,9 @@ export const stringsArabic = {
|
|
|
674
704
|
'Update your address': {
|
|
675
705
|
value: 'قم بتحديث عنوانك',
|
|
676
706
|
},
|
|
707
|
+
'Use store credit': {
|
|
708
|
+
value: 'Use store credit',
|
|
709
|
+
},
|
|
677
710
|
'View GAA Form.': {
|
|
678
711
|
value: 'عرض نموذج GAA.',
|
|
679
712
|
},
|
|
@@ -44,18 +44,27 @@ export const stringsBase = {
|
|
|
44
44
|
'Adresa vulytsi': {
|
|
45
45
|
value: 'Adresa vulytsi',
|
|
46
46
|
},
|
|
47
|
+
'Amount to apply: [amount]': {
|
|
48
|
+
value: 'Amount to apply: [amount]',
|
|
49
|
+
},
|
|
47
50
|
'An unexpected error occurred when processing PayPal order.': {
|
|
48
51
|
value: 'An unexpected error occurred when processing PayPal order.',
|
|
49
52
|
},
|
|
50
53
|
Apply: {
|
|
51
54
|
value: 'Apply',
|
|
52
55
|
},
|
|
56
|
+
'Apply full balance': {
|
|
57
|
+
value: 'Apply full balance',
|
|
58
|
+
},
|
|
53
59
|
'Are you sure?': {
|
|
54
60
|
value: 'Are you sure?',
|
|
55
61
|
},
|
|
56
62
|
Area: {
|
|
57
63
|
value: 'Area',
|
|
58
64
|
},
|
|
65
|
+
'Available balance: [amount]': {
|
|
66
|
+
value: 'Available balance: [amount]',
|
|
67
|
+
},
|
|
59
68
|
Back: {
|
|
60
69
|
value: 'Back',
|
|
61
70
|
},
|
|
@@ -225,6 +234,9 @@ export const stringsBase = {
|
|
|
225
234
|
Emirate: {
|
|
226
235
|
value: 'Emirate',
|
|
227
236
|
},
|
|
237
|
+
'Enter amount': {
|
|
238
|
+
value: 'Enter amount',
|
|
239
|
+
},
|
|
228
240
|
'Error creating Checkout': {
|
|
229
241
|
value: 'Error creating Checkout',
|
|
230
242
|
},
|
|
@@ -348,6 +360,9 @@ export const stringsBase = {
|
|
|
348
360
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
349
361
|
value: 'No shipping methods found - try editing your address or contacting support if the error persists',
|
|
350
362
|
},
|
|
363
|
+
'No store credit available': {
|
|
364
|
+
value: 'No store credit available',
|
|
365
|
+
},
|
|
351
366
|
'Nothing due at delivery': {
|
|
352
367
|
value: 'Nothing due at delivery',
|
|
353
368
|
},
|
|
@@ -414,6 +429,9 @@ export const stringsBase = {
|
|
|
414
429
|
'Phone number': {
|
|
415
430
|
value: 'Phone number',
|
|
416
431
|
},
|
|
432
|
+
'Place order': {
|
|
433
|
+
value: 'Place order',
|
|
434
|
+
},
|
|
417
435
|
'Place test order': {
|
|
418
436
|
value: 'Place test order',
|
|
419
437
|
},
|
|
@@ -570,6 +588,12 @@ export const stringsBase = {
|
|
|
570
588
|
'State/Province/Region/Prefecture': {
|
|
571
589
|
value: 'State/Province/Region/Prefecture',
|
|
572
590
|
},
|
|
591
|
+
'Store credit': {
|
|
592
|
+
value: 'Store credit',
|
|
593
|
+
},
|
|
594
|
+
'Store credit covers your full order': {
|
|
595
|
+
value: 'Store credit covers your full order',
|
|
596
|
+
},
|
|
573
597
|
'Street address': {
|
|
574
598
|
value: 'Street address',
|
|
575
599
|
},
|
|
@@ -657,12 +681,18 @@ export const stringsBase = {
|
|
|
657
681
|
Ulica: {
|
|
658
682
|
value: 'Ulica',
|
|
659
683
|
},
|
|
684
|
+
'Unable to apply store credit. Please try again.': {
|
|
685
|
+
value: 'Unable to apply store credit. Please try again.',
|
|
686
|
+
},
|
|
660
687
|
'Unable to check inventory. Please try again.': {
|
|
661
688
|
value: 'Unable to check inventory. Please try again.',
|
|
662
689
|
},
|
|
663
690
|
'Unable to complete payment in [currency]. Please try again or select a different currency. If the issue persists, contact our support team for assistance.': {
|
|
664
691
|
value: 'Unable to complete payment in [currency]. Please try again or select a different currency. If the issue persists, contact our support team for assistance.',
|
|
665
692
|
},
|
|
693
|
+
'Unable to place order with store credit. Please try again.': {
|
|
694
|
+
value: 'Unable to place order with store credit. Please try again.',
|
|
695
|
+
},
|
|
666
696
|
'Unable to retrieve the checkout session at the moment. Please try again or contact our support team.': {
|
|
667
697
|
value: 'Unable to retrieve the checkout session at the moment. Please try again or contact our support team.',
|
|
668
698
|
},
|
|
@@ -675,6 +705,9 @@ export const stringsBase = {
|
|
|
675
705
|
'Update your address': {
|
|
676
706
|
value: 'Update your address',
|
|
677
707
|
},
|
|
708
|
+
'Use store credit': {
|
|
709
|
+
value: 'Use store credit',
|
|
710
|
+
},
|
|
678
711
|
'View GAA Form.': {
|
|
679
712
|
value: 'View GAA Form.',
|
|
680
713
|
},
|
|
@@ -44,18 +44,27 @@ export const stringsChinese = {
|
|
|
44
44
|
'Adresa vulytsi': {
|
|
45
45
|
value: '街道地址',
|
|
46
46
|
},
|
|
47
|
+
'Amount to apply: [amount]': {
|
|
48
|
+
value: 'Amount to apply: [amount]',
|
|
49
|
+
},
|
|
47
50
|
'An unexpected error occurred when processing PayPal order.': {
|
|
48
51
|
value: '处理PayPal订单时发生意外错误。',
|
|
49
52
|
},
|
|
50
53
|
Apply: {
|
|
51
54
|
value: '应用',
|
|
52
55
|
},
|
|
56
|
+
'Apply full balance': {
|
|
57
|
+
value: 'Apply full balance',
|
|
58
|
+
},
|
|
53
59
|
'Are you sure?': {
|
|
54
60
|
value: '你确定吗?',
|
|
55
61
|
},
|
|
56
62
|
Area: {
|
|
57
63
|
value: '区域',
|
|
58
64
|
},
|
|
65
|
+
'Available balance: [amount]': {
|
|
66
|
+
value: 'Available balance: [amount]',
|
|
67
|
+
},
|
|
59
68
|
Back: {
|
|
60
69
|
value: '返回',
|
|
61
70
|
},
|
|
@@ -224,6 +233,9 @@ export const stringsChinese = {
|
|
|
224
233
|
Emirate: {
|
|
225
234
|
value: '酋长国',
|
|
226
235
|
},
|
|
236
|
+
'Enter amount': {
|
|
237
|
+
value: 'Enter amount',
|
|
238
|
+
},
|
|
227
239
|
'Error creating Checkout': {
|
|
228
240
|
value: '创建结账时出错',
|
|
229
241
|
},
|
|
@@ -347,6 +359,9 @@ export const stringsChinese = {
|
|
|
347
359
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
348
360
|
value: '未找到运输方法 - 如果错误仍然存在,请尝试编辑您的地址或联系支持',
|
|
349
361
|
},
|
|
362
|
+
'No store credit available': {
|
|
363
|
+
value: 'No store credit available',
|
|
364
|
+
},
|
|
350
365
|
'Nothing due at delivery': {
|
|
351
366
|
value: '交货时无需付款',
|
|
352
367
|
},
|
|
@@ -413,6 +428,9 @@ export const stringsChinese = {
|
|
|
413
428
|
'Phone number': {
|
|
414
429
|
value: '电话号码',
|
|
415
430
|
},
|
|
431
|
+
'Place order': {
|
|
432
|
+
value: '下单',
|
|
433
|
+
},
|
|
416
434
|
'Place test order': {
|
|
417
435
|
value: '下测试订单',
|
|
418
436
|
},
|
|
@@ -569,6 +587,12 @@ export const stringsChinese = {
|
|
|
569
587
|
'State/Province/Region/Prefecture': {
|
|
570
588
|
value: '州/省/地区/府',
|
|
571
589
|
},
|
|
590
|
+
'Store credit': {
|
|
591
|
+
value: 'Store credit',
|
|
592
|
+
},
|
|
593
|
+
'Store credit covers your full order': {
|
|
594
|
+
value: '商店积分已覆盖您的全部订单',
|
|
595
|
+
},
|
|
572
596
|
'Street address': {
|
|
573
597
|
value: '街道地址',
|
|
574
598
|
},
|
|
@@ -656,12 +680,18 @@ export const stringsChinese = {
|
|
|
656
680
|
Ulica: {
|
|
657
681
|
value: '街道',
|
|
658
682
|
},
|
|
683
|
+
'Unable to apply store credit. Please try again.': {
|
|
684
|
+
value: 'Unable to apply store credit. Please try again.',
|
|
685
|
+
},
|
|
659
686
|
'Unable to check inventory. Please try again.': {
|
|
660
687
|
value: '无法检查库存。请再试一次。',
|
|
661
688
|
},
|
|
662
689
|
'Unable to complete payment in [currency]. Please try again or select a different currency. If the issue persists, contact our support team for assistance.': {
|
|
663
690
|
value: '无法完成[currency]的付款。请重试或选择其他货币。如果问题仍然存在,请联系支持团队以获得帮助。',
|
|
664
691
|
},
|
|
692
|
+
'Unable to place order with store credit. Please try again.': {
|
|
693
|
+
value: '无法使用商店积分下单,请重试。',
|
|
694
|
+
},
|
|
665
695
|
'Unable to retrieve the checkout session at the moment. Please try again or contact our support team.': {
|
|
666
696
|
value: '目前无法检索结账会话。请重试或联系我们的支持团队。',
|
|
667
697
|
},
|
|
@@ -674,6 +704,9 @@ export const stringsChinese = {
|
|
|
674
704
|
'Update your address': {
|
|
675
705
|
value: '更新您的地址',
|
|
676
706
|
},
|
|
707
|
+
'Use store credit': {
|
|
708
|
+
value: 'Use store credit',
|
|
709
|
+
},
|
|
677
710
|
'View GAA Form.': {
|
|
678
711
|
value: '查看GAA表格。',
|
|
679
712
|
},
|
|
@@ -44,18 +44,27 @@ export const stringsDanish = {
|
|
|
44
44
|
'Adresa vulytsi': {
|
|
45
45
|
value: 'Gadeadresse',
|
|
46
46
|
},
|
|
47
|
+
'Amount to apply: [amount]': {
|
|
48
|
+
value: 'Amount to apply: [amount]',
|
|
49
|
+
},
|
|
47
50
|
'An unexpected error occurred when processing PayPal order.': {
|
|
48
51
|
value: 'Der opstod en uventet fejl ved behandling af PayPal-ordren.',
|
|
49
52
|
},
|
|
50
53
|
Apply: {
|
|
51
54
|
value: 'Anvend',
|
|
52
55
|
},
|
|
56
|
+
'Apply full balance': {
|
|
57
|
+
value: 'Apply full balance',
|
|
58
|
+
},
|
|
53
59
|
'Are you sure?': {
|
|
54
60
|
value: 'Er du sikker?',
|
|
55
61
|
},
|
|
56
62
|
Area: {
|
|
57
63
|
value: 'Område',
|
|
58
64
|
},
|
|
65
|
+
'Available balance: [amount]': {
|
|
66
|
+
value: 'Available balance: [amount]',
|
|
67
|
+
},
|
|
59
68
|
Back: {
|
|
60
69
|
value: 'Tilbage',
|
|
61
70
|
},
|
|
@@ -224,6 +233,9 @@ export const stringsDanish = {
|
|
|
224
233
|
Emirate: {
|
|
225
234
|
value: 'Emirat',
|
|
226
235
|
},
|
|
236
|
+
'Enter amount': {
|
|
237
|
+
value: 'Enter amount',
|
|
238
|
+
},
|
|
227
239
|
'Error creating Checkout': {
|
|
228
240
|
value: 'Fejl ved oprettelse af betalingssession',
|
|
229
241
|
},
|
|
@@ -347,6 +359,9 @@ export const stringsDanish = {
|
|
|
347
359
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
348
360
|
value: 'Ingen forsendelsesmetoder fundet - prøv at redigere din adresse eller kontakte support, hvis fejlen fortsætter',
|
|
349
361
|
},
|
|
362
|
+
'No store credit available': {
|
|
363
|
+
value: 'No store credit available',
|
|
364
|
+
},
|
|
350
365
|
'Nothing due at delivery': {
|
|
351
366
|
value: 'Intet at betale ved levering',
|
|
352
367
|
},
|
|
@@ -413,6 +428,9 @@ export const stringsDanish = {
|
|
|
413
428
|
'Phone number': {
|
|
414
429
|
value: 'Telefonnummer',
|
|
415
430
|
},
|
|
431
|
+
'Place order': {
|
|
432
|
+
value: 'Afgiv ordre',
|
|
433
|
+
},
|
|
416
434
|
'Place test order': {
|
|
417
435
|
value: 'Afgiv testordre',
|
|
418
436
|
},
|
|
@@ -569,6 +587,12 @@ export const stringsDanish = {
|
|
|
569
587
|
'State/Province/Region/Prefecture': {
|
|
570
588
|
value: 'Stat/Provins/Region/Præfektur',
|
|
571
589
|
},
|
|
590
|
+
'Store credit': {
|
|
591
|
+
value: 'Store credit',
|
|
592
|
+
},
|
|
593
|
+
'Store credit covers your full order': {
|
|
594
|
+
value: 'Butikskreditten dækker hele din ordre',
|
|
595
|
+
},
|
|
572
596
|
'Street address': {
|
|
573
597
|
value: 'Gadeadresse',
|
|
574
598
|
},
|
|
@@ -656,12 +680,18 @@ export const stringsDanish = {
|
|
|
656
680
|
Ulica: {
|
|
657
681
|
value: 'Gade',
|
|
658
682
|
},
|
|
683
|
+
'Unable to apply store credit. Please try again.': {
|
|
684
|
+
value: 'Unable to apply store credit. Please try again.',
|
|
685
|
+
},
|
|
659
686
|
'Unable to check inventory. Please try again.': {
|
|
660
687
|
value: 'Kunne ikke tjekke lagerbeholdningen. Prøv venligst igen.',
|
|
661
688
|
},
|
|
662
689
|
'Unable to complete payment in [currency]. Please try again or select a different currency. If the issue persists, contact our support team for assistance.': {
|
|
663
690
|
value: 'Kan ikke gennemføre betaling i [currency]. Prøv igen eller vælg en anden valuta. Hvis problemet fortsætter, kontakt vores supportteam for hjælp.',
|
|
664
691
|
},
|
|
692
|
+
'Unable to place order with store credit. Please try again.': {
|
|
693
|
+
value: 'Kan ikke gennemføre ordren med butikskredit. Prøv igen.',
|
|
694
|
+
},
|
|
665
695
|
'Unable to retrieve the checkout session at the moment. Please try again or contact our support team.': {
|
|
666
696
|
value: 'Kan ikke hente betalingssessionen i øjeblikket. Prøv venligst igen eller kontakt vores supportteam.',
|
|
667
697
|
},
|
|
@@ -674,6 +704,9 @@ export const stringsDanish = {
|
|
|
674
704
|
'Update your address': {
|
|
675
705
|
value: 'Opdater din adresse',
|
|
676
706
|
},
|
|
707
|
+
'Use store credit': {
|
|
708
|
+
value: 'Use store credit',
|
|
709
|
+
},
|
|
677
710
|
'View GAA Form.': {
|
|
678
711
|
value: 'Se GAA-formular.',
|
|
679
712
|
},
|