function signAndExport(Client $client) {
		$arr = array();

		$config = $client->getConfig();

		foreach($this->fieldsInOrder as $f) {
			$val = $this->$f;
			if ($val === null) {
				$val = "";
			}
			$arr[$f] = $val;
		}

		foreach ($this->auxFieldsInOrder as $f) {
			$val = $this->$f;
			if ($val !== null) {
				$arr[$f] = $val;
			}
		}

		$stringToSign = $this->getSignatureString();

		$client->writeToTraceLog('Signing payment request, base for the signature:' . "\n" . $stringToSign);

		$signed = Crypto::signString($stringToSign, $config->privateKeyFile, $config->privateKeyPassword);
		$arr["signature"] = $signed;

		return $arr;
	}