code: private function getStatefulStatusCode($messageName, array $messageOptions)
      {
          // on security-auth this is always 'Start'
          if ('Security_Authenticate' === $messageName) {
              return self::TRANSACTION_STATUS_CODE_START;
          }
  
          // if endSession is set this will be (the) 'End'
          if (isset($messageOptions['endSession']) && $messageOptions['endSession'] === true) {
              return self::TRANSACTION_STATUS_CODE_END;
          }
  
          // on everything else we assume in-series
          return self::TRANSACTION_STATUS_CODE_INSERIES;
      }
docs: Return transaction code for stateful requests.
  
  @param string $messageName name of request message (e.g. Security_Authenticate)
  @param array $messageOptions
  @return string