Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgergo committed Jan 13, 2024
1 parent 8154dff commit a6fe7cd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
2 changes: 1 addition & 1 deletion src/BazarServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ protected function registerRoutes(): void
->prefix('bazar')
->as('bazar.')
->group(function (): void {
$this->loadRoutesFrom(__DIR__.'/../routes/auth.php');
$this->loadRoutesFrom(__DIR__.'/../routes/web.php');
});
}

Expand Down
20 changes: 0 additions & 20 deletions src/Gateway/Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,33 +159,13 @@ public function capture(Request $request, Order $order): Order
return $order;
}

/**
* Resolve the order model for notification.
*/
public function resolveOrderForNotification(Request $request): Order
{
return Order::proxy()->newQuery()->where('uuid', $request->input('order'))->firstOrFail();
}

/**
* Handle the notification request.
*/
public function handleNotification(Request $request): Response
{
$order = $this->resolveOrderForNotification($request);

$this->notification($request, $order);

return (new Response())->respondWith(function (string $url, array $data): HttpResponse {
return new HttpResponse('', HttpResponse::HTTP_NO_CONTENT);
});
}

/**
* Update the order update after the notification.
*/
public function notification(Request $request, Order $order): Order
{
return $order;
}
}

0 comments on commit a6fe7cd

Please sign in to comment.