public function getResponse(Request $request, $maxTries = 3)
	{
		$request->validate();

		$response = $this->getProvider()
		                 ->getResponse($request, $canSafelyTryAgain);

		if ($canSafelyTryAgain) {
			if ($response->getTransactionReference() !== NULL) {
				if ($maxTries > 0) {
					$response = $this->getResponse($this->status($response->getTransactionReference()), $maxTries - 1);
				} else {
					throw new TransactionFailedException($request, $response, $maxTries);
				}
			} else {
				if ($maxTries > 0) {
					return $this->getResponse($request, $maxTries - 1);
				} else {
					throw new TransactionFailedException($request, $response, $maxTries);
				}
			}
		} else {
			if ($response->isCodeInProgress()) {
				if ($maxTries > 0) {
					if ($request->isTransactionTypeStatus()) {
						$response = $this->getResponse($request, $maxTries - 1);
					} else {
						$response = $this->getResponse($this->status($response->getTransactionReference()), $maxTries - 1);
					}
				} else {
					throw new TransactionInProgressException($request, $response, $maxTries);
				}
			}
		}

		return $response;
	}