@uptrademedia/site-kit 1.0.36 → 1.0.37

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.
@@ -286,8 +286,13 @@ async function createCheckoutSession(optionsOrOfferingId, legacyOptions) {
286
286
  })
287
287
  });
288
288
  if (!response.ok) {
289
- const error = await response.json().catch(() => ({}));
290
- const message = error?.message || (typeof error?.error === "string" ? error.error : null) || "Checkout failed";
289
+ const text = await response.text();
290
+ let error = {};
291
+ try {
292
+ error = JSON.parse(text);
293
+ } catch {
294
+ }
295
+ const message = (typeof error?.message === "string" ? error.message : null) || (typeof error?.error === "string" ? error.error : null) || "Payment could not be processed. Please try again or use a different card.";
291
296
  if (typeof console !== "undefined" && console.error) {
292
297
  console.error("[Commerce] Checkout failed:", response.status, message, error);
293
298
  }
@@ -4025,5 +4030,5 @@ function getApiKey() {
4025
4030
  }
4026
4031
 
4027
4032
  export { CalendarView, CheckoutForm, EventCalendar, EventEmbed, EventModal, EventTile, EventsWidget, OfferingCard, OfferingList, ProductDetail, ProductEmbed, ProductGrid, ProductPage, RegistrationForm, UpcomingEvents, createCheckoutSession, fetchActiveProcessor, fetchCategories, fetchLatestOffering, fetchNextEvent, fetchOffering, fetchOfferings, fetchProcessorConfig, fetchProductBySlug, fetchProducts, fetchProductsPublic, fetchServices, fetchUpcomingEvents, formatDate, formatDateRange, formatDateTime, formatPrice, formatTime, getOfferingUrl, getRelativeTimeUntil, getSpotsRemaining, isEventSoldOut, registerForEvent, useEventModal };
4028
- //# sourceMappingURL=chunk-R4OKQVFD.mjs.map
4029
- //# sourceMappingURL=chunk-R4OKQVFD.mjs.map
4033
+ //# sourceMappingURL=chunk-35ZB446O.mjs.map
4034
+ //# sourceMappingURL=chunk-35ZB446O.mjs.map