<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def capture_sale(self, transaction_id, capture_amount, message=None):
 """ Capture existing preauth. :param transaction_id: :param capture_amount: :param message: :return: status code """

        request_data = {
            "amount": self.base.convert_decimal_to_hundreds(capture_amount),
            "currency": self.currency,
            "message": message
        }

        url = "%s%s%s/capture" % (self.api_endpoint, constants.TRANSACTION_STATUS_ENDPOINT, transaction_id)

        username = self.base.get_username()
        password = self.base.get_password(username=username, request_url=url)

        response = requests.put(url, json=request_data, auth=HTTPBasicAuth(username=username, password=password))

        if response.status_code == 404:
            raise TransactionDoesNotExist('Wrong transaction ID!')

        if not self.base.verify_response(response.json()):
            raise SignatureValidationException('Server signature verification has failed')

        response_json = response.json()

        return response_json.get('status')