code: public function appendSignature(array $params = [], $timestamp = '', $noncestr = '')
      {
          $params += [
              'app_id' => $this->appId,
              'time_stamp' => $timestamp ? : time(),
              'nonce_str' => $noncestr ? : md5(uniqid())
          ];
  
          if (isset($params['app_key'])) {
              unset($params['app_key']);
          }
  
          ksort($params);
          $params['sign'] = strtoupper(md5(http_build_query($params + ['app_key' => $this->appKey])));
  
          return $params;
      }
docs: append signature to params
  
  @param array $params
  @param $timestamp
  @param $noncestr
  
  @return array