'Persist how we responded to a transaction.
Returns:
Deferred'

@log_function
def set_response(self, transaction, code, response):

    if (not transaction.transaction_id):
        raise RuntimeError('Cannot    persist    a    transaction    with    no    transaction_id')
    return self.store.set_received_txn_response(transaction.transaction_id, transaction.origin, code, response)
