@gomusdev/web-components 4.16.0 → 4.16.1
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/README.md
CHANGED
|
@@ -18796,13 +18796,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18796
18796
|
if (beforeSubmit) await beforeSubmit(form.details.formData);
|
|
18797
18797
|
const meta = checkout.data.meta;
|
|
18798
18798
|
const navigateTo = configStore.config.navigateTo;
|
|
18799
|
+
const checkoutFailure = configStore.config.urls.checkoutFailure ?? shop.urls.checkoutFailure;
|
|
18799
18800
|
if (meta.status === "success") {
|
|
18800
18801
|
const checkoutSuccess = configStore.config.urls.checkoutSuccess ?? shop.urls.checkoutSuccess;
|
|
18801
18802
|
navigateTo?.(checkoutSuccess(checkout.data.order.token));
|
|
18802
|
-
} else if (meta.status === "fail") navigateTo?.(
|
|
18803
|
+
} else if (meta.status === "fail") navigateTo?.(checkoutFailure(""));
|
|
18803
18804
|
else if (meta.payment_url) navigateTo?.(meta.payment_url);
|
|
18804
18805
|
else if (meta.payment_data) postToPaymentProvider(meta.payment_data);
|
|
18805
|
-
else navigateTo?.(
|
|
18806
|
+
else navigateTo?.(checkoutFailure(""));
|
|
18806
18807
|
}
|
|
18807
18808
|
function setupGuestCheckout(host, custom) {
|
|
18808
18809
|
Forms.defineForm({
|
|
@@ -18795,13 +18795,14 @@ async function finalizeCheckout(form, formId) {
|
|
|
18795
18795
|
if (beforeSubmit) await beforeSubmit(form.details.formData);
|
|
18796
18796
|
const meta = checkout.data.meta;
|
|
18797
18797
|
const navigateTo = configStore.config.navigateTo;
|
|
18798
|
+
const checkoutFailure = configStore.config.urls.checkoutFailure ?? shop.urls.checkoutFailure;
|
|
18798
18799
|
if (meta.status === "success") {
|
|
18799
18800
|
const checkoutSuccess = configStore.config.urls.checkoutSuccess ?? shop.urls.checkoutSuccess;
|
|
18800
18801
|
navigateTo?.(checkoutSuccess(checkout.data.order.token));
|
|
18801
|
-
} else if (meta.status === "fail") navigateTo?.(
|
|
18802
|
+
} else if (meta.status === "fail") navigateTo?.(checkoutFailure(""));
|
|
18802
18803
|
else if (meta.payment_url) navigateTo?.(meta.payment_url);
|
|
18803
18804
|
else if (meta.payment_data) postToPaymentProvider(meta.payment_data);
|
|
18804
|
-
else navigateTo?.(
|
|
18805
|
+
else navigateTo?.(checkoutFailure(""));
|
|
18805
18806
|
}
|
|
18806
18807
|
function setupGuestCheckout(host, custom) {
|
|
18807
18808
|
Forms.defineForm({
|