'Capture a previously authorized payment for the given amount.
Capture a previsouly authorized payment. Note that the amount is required
even though we do not support partial capture.
:param str transaction_id: id of the authorized transaction in the
Authorize.net backend
:param str amount: transaction amount (up to 15 digits with decimal point)
:return: a dict containing the response code, transaction id and transaction type
:rtype: dict'

def capture(self, transaction_id, amount):

    root = self._base_tree('createTransactionRequest')
    tx = etree.SubElement(root, 'transactionRequest')
    etree.SubElement(tx, 'transactionType').text = 'priorAuthCaptureTransaction'
    etree.SubElement(tx, 'amount').text = str(amount)
    etree.SubElement(tx, 'refTransId').text = transaction_id
    response = self._authorize_request(root)
    res = dict()
    res['x_response_code'] = response.find('transactionResponse/responseCode').text
    res['x_trans_id'] = response.find('transactionResponse/transId').text
    res['x_type'] = 'prior_auth_capture'
    return res
