diff --git a/app/Classes/Modules/Bookings/ControllersLogic/CreateBookingRefundLogic.php b/app/Classes/Modules/Bookings/ControllersLogic/CreateBookingRefundLogic.php index 8999832d..21cc5406 100644 --- a/app/Classes/Modules/Bookings/ControllersLogic/CreateBookingRefundLogic.php +++ b/app/Classes/Modules/Bookings/ControllersLogic/CreateBookingRefundLogic.php @@ -75,7 +75,7 @@ class CreateBookingRefundLogic extends AbstractControllerLogic $booking = Booking::find($request->route('id')); - $transaction = $this->fetchesTransaction->execute(['id' => $request->input('payment_id')]); + $transaction = $this->fetchesTransaction->execute(['id' => $request->route('payment_id')]); $paymentAttemptLimit = $this->fetchesCompanyPaymentAttemptLimit->execute($booking->company); diff --git a/routes/booking.php b/routes/booking.php index eae751e8..ed188127 100644 --- a/routes/booking.php +++ b/routes/booking.php @@ -17,7 +17,7 @@ Route::group(['prefix' => 'booking', 'as' => 'booking.', 'namespace' => 'Booking }); Route::group(['prefix' => '{id}/refund', 'as' => 'refund.'], function () { - Route::post('create', 'CreateBookingRefundController@create')->name('create'); + Route::post('{payment_id}/create', 'CreateBookingRefundController@create')->name('create'); }); Route::post('{id}/purchase_order/verification', 'ApprovePurchaseOrderController@approve')->name('po.approval');