@ticketboothapp/booking 1.2.69 → 1.2.70

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ticketboothapp/booking",
3
- "version": "1.2.69",
3
+ "version": "1.2.70",
4
4
  "private": false,
5
5
  "sideEffects": [
6
6
  "**/*.css",
@@ -4836,22 +4836,31 @@ export function AdminChangeBookingFlow({
4836
4836
  reservationExpiration: undefined,
4837
4837
  customerLastName: lastName.trim(),
4838
4838
  bookingDate: datePart,
4839
- // Paid change: always return to stable ref+lastName + explicit intent (not reservationRef).
4840
- // /manage-booking runs bounded refresh only when `from=change_payment` (see manage-booking page).
4839
+ // Paid change: customer site returns to /manage-booking with change_payment intent.
4840
+ // Provider dashboard embed uses getSuccessUrl (same as main booking tab) so Stripe does not 404 on /manage-booking.
4841
4841
  successUrlOverride:
4842
4842
  isCustomerSelfServeChange && changeBookingReferenceForPaidFlow
4843
- ? (() => {
4844
- const origin = typeof window !== 'undefined' ? window.location.origin : '';
4845
- const ref = encodeURIComponent(
4846
- formatBookingRefForDisplay(changeBookingReferenceForPaidFlow) || changeBookingReferenceForPaidFlow,
4847
- );
4848
- const ln = encodeURIComponent(lastName.trim());
4849
- const fromQ = `${MANAGE_BOOKING_QUERY_FROM}=${encodeURIComponent(MANAGE_BOOKING_FROM_CHANGE_PAYMENT)}`;
4850
- const intentQ = changeIntentIdForCheckout
4851
- ? `&changeIntentId=${encodeURIComponent(changeIntentIdForCheckout)}`
4852
- : '';
4853
- return `${origin}/manage-booking?ref=${ref}&lastName=${ln}&${fromQ}${intentQ}`;
4854
- })()
4843
+ ? bookingAppMode === 'provider-dashboard' && getSuccessUrl
4844
+ ? getSuccessUrl({
4845
+ reservationRef:
4846
+ formatBookingRefForDisplay(changeBookingReferenceForPaidFlow) ||
4847
+ changeBookingReferenceForPaidFlow,
4848
+ lastName: lastName.trim(),
4849
+ focusDate: datePart,
4850
+ })
4851
+ : (() => {
4852
+ const origin = typeof window !== 'undefined' ? window.location.origin : '';
4853
+ const ref = encodeURIComponent(
4854
+ formatBookingRefForDisplay(changeBookingReferenceForPaidFlow) ||
4855
+ changeBookingReferenceForPaidFlow,
4856
+ );
4857
+ const ln = encodeURIComponent(lastName.trim());
4858
+ const fromQ = `${MANAGE_BOOKING_QUERY_FROM}=${encodeURIComponent(MANAGE_BOOKING_FROM_CHANGE_PAYMENT)}`;
4859
+ const intentQ = changeIntentIdForCheckout
4860
+ ? `&changeIntentId=${encodeURIComponent(changeIntentIdForCheckout)}`
4861
+ : '';
4862
+ return `${origin}/manage-booking?ref=${ref}&lastName=${ln}&${fromQ}${intentQ}`;
4863
+ })()
4855
4864
  : undefined,
4856
4865
  ticketLines: ticketLinesForModal,
4857
4866
  feeLineItems: feeLineItemsWithAddOns,
@@ -4992,6 +5001,7 @@ export function AdminChangeBookingFlow({
4992
5001
  previousAvailabilityId: initialValues?.availabilityId ?? null,
4993
5002
  previousReturnAvailabilityId: initialValues?.returnAvailabilityId ?? null,
4994
5003
  },
5004
+ deferPaymentToBalance: true,
4995
5005
  });
4996
5006
  const bookRef = initialValues?.bookingReference?.trim() || adminChoiceData.reservationReference;
4997
5007
  setShowAdminPaymentChoice(false);
@@ -28,6 +28,11 @@ export type ProviderDashboardChangeBookingPayload = {
28
28
  previousAvailabilityId?: string | null;
29
29
  previousReturnAvailabilityId?: string | null;
30
30
  } | null;
31
+ /**
32
+ * When true, apply the change now but do not run an immediate card charge: record the amount still
33
+ * owed (e.g. pending charge on file) and update the receipt. Provider /change API must support this.
34
+ */
35
+ deferPaymentToBalance?: boolean;
31
36
  };
32
37
 
33
38
  /** Seeds the flow when opening provider change-booking (matches TicketBooth `BookingWidget` `initialBooking`). */