@uptrademedia/site-kit 1.0.36 → 1.0.38
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/{chunk-WTMMXY7S.js → chunk-MVNUEXP3.js} +11 -5
- package/dist/chunk-MVNUEXP3.js.map +1 -0
- package/dist/{chunk-R4OKQVFD.mjs → chunk-SONJCT7Z.mjs} +11 -5
- package/dist/chunk-SONJCT7Z.mjs.map +1 -0
- package/dist/commerce/index.js +40 -40
- package/dist/commerce/index.mjs +1 -1
- package/dist/index.js +25 -25
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-R4OKQVFD.mjs.map +0 -1
- package/dist/chunk-WTMMXY7S.js.map +0 -1
|
@@ -292,10 +292,16 @@ async function createCheckoutSession(optionsOrOfferingId, legacyOptions) {
|
|
|
292
292
|
})
|
|
293
293
|
});
|
|
294
294
|
if (!response.ok) {
|
|
295
|
-
const
|
|
296
|
-
|
|
295
|
+
const text = await response.text();
|
|
296
|
+
let body = {};
|
|
297
|
+
try {
|
|
298
|
+
body = JSON.parse(text);
|
|
299
|
+
} catch {
|
|
300
|
+
}
|
|
301
|
+
const errObj = body?.error && typeof body.error === "object" ? body.error : body;
|
|
302
|
+
const message = (typeof body?.message === "string" ? body.message : null) || (typeof errObj?.message === "string" ? errObj.message : null) || (typeof errObj?.detail === "string" ? errObj.detail : null) || (typeof body?.error === "string" ? body.error : null) || "Payment could not be processed. Please try again or use a different card.";
|
|
297
303
|
if (typeof console !== "undefined" && console.error) {
|
|
298
|
-
console.error("[Commerce] Checkout failed:", response.status, message,
|
|
304
|
+
console.error("[Commerce] Checkout failed:", response.status, message, body);
|
|
299
305
|
}
|
|
300
306
|
return { success: false, error: message };
|
|
301
307
|
}
|
|
@@ -4069,5 +4075,5 @@ exports.getSpotsRemaining = getSpotsRemaining;
|
|
|
4069
4075
|
exports.isEventSoldOut = isEventSoldOut;
|
|
4070
4076
|
exports.registerForEvent = registerForEvent;
|
|
4071
4077
|
exports.useEventModal = useEventModal;
|
|
4072
|
-
//# sourceMappingURL=chunk-
|
|
4073
|
-
//# sourceMappingURL=chunk-
|
|
4078
|
+
//# sourceMappingURL=chunk-MVNUEXP3.js.map
|
|
4079
|
+
//# sourceMappingURL=chunk-MVNUEXP3.js.map
|