@uptrademedia/site-kit 1.0.37 → 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-EWXFDSZP.js → chunk-MVNUEXP3.js} +7 -6
- package/dist/chunk-MVNUEXP3.js.map +1 -0
- package/dist/{chunk-35ZB446O.mjs → chunk-SONJCT7Z.mjs} +7 -6
- 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-35ZB446O.mjs.map +0 -1
- package/dist/chunk-EWXFDSZP.js.map +0 -1
|
@@ -293,14 +293,15 @@ async function createCheckoutSession(optionsOrOfferingId, legacyOptions) {
|
|
|
293
293
|
});
|
|
294
294
|
if (!response.ok) {
|
|
295
295
|
const text = await response.text();
|
|
296
|
-
let
|
|
296
|
+
let body = {};
|
|
297
297
|
try {
|
|
298
|
-
|
|
298
|
+
body = JSON.parse(text);
|
|
299
299
|
} catch {
|
|
300
300
|
}
|
|
301
|
-
const
|
|
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.";
|
|
302
303
|
if (typeof console !== "undefined" && console.error) {
|
|
303
|
-
console.error("[Commerce] Checkout failed:", response.status, message,
|
|
304
|
+
console.error("[Commerce] Checkout failed:", response.status, message, body);
|
|
304
305
|
}
|
|
305
306
|
return { success: false, error: message };
|
|
306
307
|
}
|
|
@@ -4074,5 +4075,5 @@ exports.getSpotsRemaining = getSpotsRemaining;
|
|
|
4074
4075
|
exports.isEventSoldOut = isEventSoldOut;
|
|
4075
4076
|
exports.registerForEvent = registerForEvent;
|
|
4076
4077
|
exports.useEventModal = useEventModal;
|
|
4077
|
-
//# sourceMappingURL=chunk-
|
|
4078
|
-
//# sourceMappingURL=chunk-
|
|
4078
|
+
//# sourceMappingURL=chunk-MVNUEXP3.js.map
|
|
4079
|
+
//# sourceMappingURL=chunk-MVNUEXP3.js.map
|