PluginProbe
Yatra – Travel Booking & Tour Operator Software / trunk
Yatra – Travel Booking & Tour Operator Software vtrunk
3.0.15 3.0.14 3.0.14.1 3.0.14.2 3.0.12 3.0.13 3.0.11 3.0.10 3.0.9 3.0.8 3.0.7 3.0.6 3.0.5 3.0.5.1 3.0.4 3.0.3 3.0.2.9 3.0.2.7 3.0.2.8 3.0.2.6 trunk 1.0.0 2.0.0 2.0.1 2.0.10 All 83 releases
← All changes | app/Controllers/PaymentGatewayController.php +8 -5 3.0.14.2trunk View file →
@@ -812,11 +812,11 @@
812 812 }
813 813
814 814 $previousBookingStatus = (string) ($booking->status ?? 'pending');
815 815
816 - // Only auto-confirm when the operator allows it (or the booking is now
817 - // fully paid). A deposit / partial payment leaves the booking pending
818 - // when "Auto-Confirm Bookings" is off, for the operator to confirm.
816 + // Only auto-confirm when "Auto-Confirm Bookings" is on; otherwise the
817 + // booking stays pending for the operator to confirm manually, regardless
818 + // of a successful (full or partial) payment.
819 819 $should_confirm = \yatra_should_confirm_booking_on_payment($new_amount_due <= 0, $bookingId);
820 820
821 821 // Update booking
822 822 $booking_update = [
@@ -829,9 +829,9 @@
829 829 }
830 830 $this->bookingRepository->update($bookingId, $booking_update);
831 831
832 832 if ($should_confirm) {
833 - \yatra_trigger_booking_confirmed($bookingId, $previousBookingStatus);
833 + \yatra_trigger_booking_confirmed($bookingId, $previousBookingStatus, true);
834 834 }
835 835
836 836 // Clear remaining payment session if this was a remaining payment
837 837 if (function_exists('yatra_has_remaining_session') && yatra_has_remaining_session()) {
@@ -1252,9 +1252,12 @@
1252 1252 'trip_duration' => yatra_format_duration(
1253 1253 (int) ($payment->trip_duration_days ?? ($trip->duration_days ?? 0)),
1254 1254 isset($payment->trip_duration_nights)
1255 1255 ? (int) $payment->trip_duration_nights
1256 - : (isset($trip->duration_nights) ? (int) $trip->duration_nights : null)
1256 + : (isset($trip->duration_nights) ? (int) $trip->duration_nights : null),
1257 + // Hour-based day tours: hours come from the loaded trip (the payment
1258 + // join carries only days/nights); a soft-deleted trip falls back to days.
1259 + (int) ($trip->duration_hours ?? 0)
1257 1260 ),
1258 1261 'trip_difficulty' => $trip ? ($trip->difficulty_name ?? '') : '',
1259 1262 'departure_location' => $trip ? ($trip->departure_location ?? '') : '',
1260 1263 'destination' => $trip ? ($trip->destination ?? $payment->destination ?? '') : ($payment->destination ?? ''),