/**
* Get the raw data array for this message. The format of this varies from gateway to
* gateway, but will usually be either an associative array, or a SimpleXMLElement.
* @return mixed
* @throws InvalidRequestException
*/
public function getData()
{
$this->validate('app_id', 'mch_id', 'out_trade_no');
$data = array('appid' => $this->getAppId(), 'mch_id' => $this->getMchId(), 'out_trade_no' => $this->getOutTradeNo(), 'nonce_str' => md5(uniqid()));
$data = array_filter($data);
$data['sign'] = Helper::sign($data, $this->getApiKey());
return $data;
}