code: public function encode(Payload $payload): string
      {
          $data = [
              'aps' => $this->convertApsToArray($payload->getAps()),
          ];
  
          $data = array_merge($payload->getCustomData(), $data);
  
          return json_encode($data);
      }
docs: {@inheritdoc}