public function handleResponse(array $request)
    {
        foreach ($this->paymentAdapters as $adapter) {
            $response = new Response($request, $adapter);
            if ($adapter->enabled && $adapter->canHandlePaymentResponse($response)) {
                $adapter->handlePaymentResponse($response);

                $transaction = new Transaction();
                $adapter->loadTransactionFromResponse($response, $transaction);
                $response->setTransaction($transaction);
                return $response;
            }
        }
        throw new Exception("No adapters found that could handle the payment response");
    }