public function applyTransactionId(TransactionInterface $transaction)
    {
        $transactionId = $transaction->get('txn_id', null);

        if (!$transactionId) {
            // no transaction id provided
            $transactionId = -1;
        }

        $transaction->setTransactionId($transactionId);
    }