diff --git a/Middleware/EventDispatchMiddleware.php b/Middleware/EventDispatchMiddleware.php index 3b95ecf..5f7c2ce 100644 --- a/Middleware/EventDispatchMiddleware.php +++ b/Middleware/EventDispatchMiddleware.php @@ -66,7 +66,7 @@ function (ResponseInterface $response) { $this->eventDispatcher->dispatch(GuzzleEvents::POST_TRANSACTION, $postTransactionEvent); // Continue down the chain. - return $response; + return $postTransactionEvent->getTransaction(); }, function (Exception $reason) { // Get the response. The response in a RequestException can be null too.