public function getPayload() {
		if($this->payload) return $this->payload;
		$this->ensureInput();
		if(empty($this->input['payload'])) {
			if($this->logger)
				$this->logger->error('No payload in input data');
			throw new WebHookHandlerException('No payload in input data', WebHookHandlerException::NO_PAYLOAD);
		}
		if($this->input['payloadEncrypted']) {
			$privKey = openssl_pkey_get_private($this->privateKey, $this->passphrase);
			$envKey = base64_decode($this->input['envKey']);
			$encryptedPayload = base64_decode($this->input['payload']);
			$payloadJSON = '';
			if(openssl_open($encryptedPayload, $payloadJSON, $envKey, $privKey)) {
				if($this->logger)
					$this->logger->debug('Decrypted JSON string', array('json' => $payloadJSON));
				$decrypted = json_decode($payloadJSON, true);
				if($decrypted) {
					$this->payload = $decrypted;
					$this->payloadJSONString = $payloadJSON;
				} else {
					if($this->logger)
						$this->logger->error('Invalid decrypted json');
					throw new WebHookHandlerException('Invalid decrypted json', WebHookHandlerException::INVALID_DECRYPTED_JSON);
				}
			} else {
				if($this->logger)
					$this->logger->error('Could not decrypt payload', array('error' => openssl_error_string()));
				throw new WebHookHandlerException('Could not decrypt payload', WebHookHandlerException::DECRYPTION_FAILED);
			}
			openssl_free_key($privKey);
		} else {
			$this->payload = $this->input['payload'];
			$this->payloadJSONString = json_encode($this->payload);
		}
		return $this->payload;
	}