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
979704
public function getData()
    {
        $this->validate('orderId', 'txnTime', 'accNo', 'payTimeout');

        $data = array(
            'version'       => $this->getVersion(),  //版本号
            'encoding'      => $this->getEncoding(),  //编码方式
            'certId'        => $this->getTheCertId(),    //证书ID
            'signMethod'    => $this->getSignMethod(),  //签名方法
            'txnType'       => '79',        //交易类型
            'txnSubType'    => '00',        //交易子类
            'bizType'       => '000902',    //业务类型
            'accessType'    => $this->getAccessType(),         //接入类型
            'channelType'   => $this->getChannelType(), //05:语音 07:互联网 08:移动
            'encryptCertId' => CertUtil::readX509CertId($this->getEncryptKey()),
            'merId'         => $this->getMerId(),     //商户代码
            'orderId'       => $this->getOrderId(),     //商户订单号，填写开通并支付交易的orderId
            'txnTime'       => $this->getTxnTime(),    //订单发送时间
            'tokenPayData'  => sprintf('{trId=%s&tokenType=01}', $this->getTrId()), //标记请求者 trId
            'accNo'         => $this->encrypt($this->getAccNo()), //银行卡号
            'customerInfo'  => $this->getEncryptCustomerInfo(), //标记请求者 trId,
            'frontUrl'      => $this->getReturnUrl(), //前台通知地址
            'backUrl'       => $this->getNotifyUrl(), //后台通知地址
            'payTimeout'    => $this->getPayTimeout(), //订单超时时间
        );

        $data = $this->filter($data);

        $data['signature'] = $this->sign($data, 'RSA2');

        return $data;
    }
1134307
public function toArray()
    {
        return [
            'message' => $this->content,
            'title' => $this->title,
            'timestamp' => $this->timestamp,
            'priority' => $this->priority,
            'url' => $this->url,
            'url_title' => $this->urlTitle,
            'sound' => $this->sound,
            'retry' => $this->retry,
            'expire' => $this->expire,
        ];
    }
439899
public function getData()
    {
        if (!$this->data) {
            // Convert the appropriate fields to integer.
            $this->data = (object) $this->rawData;
            $int_fields = $this->getIntegerFields();
            foreach ($int_fields as $field) {
                $this->data->$field = (int) $this->data->$field;
            }
        }

        return $this->data;
    }
1107390
public static function getRawData(): string
    {
        if (static::$rawData === null) {
            static::$rawData = file_get_contents('php://input');

            if (static::$rawData === false) {
                throw new RequestException('Unable to read raw data from request');
            }
        }

        return static::$rawData;
    }
711459
protected function parseDataFromResponse()
    {
        $content = $this->rawResponse->body;
        $config = new LoggingConfig();
        $config->parseFromXml($content);
        return $config;
    }
1126217
public function toArray(): array
    {
        $payload = [
            'code' => $this->getCode()
        ];

        if (! empty($this->getMessage())) {
            $payload['message'] = $this->getMessage();
        }

        if (! empty($this->getError())) {
            $payload['error'] = $this->getError();
        }

        if (! empty($this->getData())) {
            $payload['data'] = $this->getData();
        }

        if (! empty($this->getOptions())) {
            $payload += $this->getOptions();
        }

        return $payload;
    }
377170
protected function getBaseData()
    {
        $data                     = array();
        $data['gateway_id']       = $this->getGatewayID();
        $data['password']         = $this->getPassword();
        $data['transaction_type'] = $this->getTransactionType();

        return $data;
    }
254471
public function getSerializableData()
    {
        return [
            'id' => $this->getId(),
            'name' => $this->getName(),
            'description' => $this->getDescription(),
            'profile' => $this->getProfile(),
            'salt' => $this->getSalt(),
            'type' => $this->getType(),
            'value' => $this->getValue(),
        ];
    }
93298
public function generateRawData()
    {
        $rawData = ['id' => $this->getId()];
        $rawData['data'] = [];
        $rawData['data']['image'] = [];
        if ($this->getCreatedAt()) {
            $rawData['created_at'] = $this->getCreatedAt();
        }
        if ($this->getStatusDescription() || $this->getStatusCode()) {
            $rawData['status'] = $this->getStatus();
        }
        if ($this->getImage()) {
            $rawData['data']['image'][$this->getImageMethod()] = $this->getImage();
        }
        if ($this->getCrop()) {
            $rawData['data']['image']['crop'] = $this->getCrop();
        }
        if ($this->getConcepts()) {
            $rawData['data']['concepts'] = [];
            foreach ($this->getConcepts() as $concept) {
                $rawData['data']['concepts'][] = $concept->generateRawData();
            }
        }
        if ($this->getMetaData()) {
            $rawData['data']['metadata'] = $this->getMetaData();
        }

        return $rawData;
    }
219488
public function toArray()
    {
        $response = $this->simpleXmlObject();

        // Converting the SimpleXMLElement Object to array()
        $response = json_encode($response);
        $response = json_decode($response, true);

        // Merging the remaining fields with the response array
        $remainingFields = $this->getRemainingIpnFields();
        $response = array_merge($remainingFields,$response);

        return $response;
    }
545029
public function getData()
    {
        $this->setDefaults();

        $this->validate(
            'partner',
            '_input_charset',
            'refund_date',
            'batch_no',
            'refund_items'
        );

        $this->validateOne(
            'seller_user_id',
            'seller_email'
        );

        $this->setBatchNum(count($this->getRefundItems()));
        $this->setRefundDetail($this->getDetailData());

        $data = [
            'service'        => $this->service,
            'partner'        => $this->getPartner(),
            'notify_url'     => $this->getNotifyUrl(),
            'seller_user_id' => $this->getPartner(),
            'refund_date'    => $this->getRefundDate(),
            'batch_no'       => $this->getBatchNo(),
            'batch_num'      => $this->getBatchNum(),
            'detail_data'    => $this->getDetailData(),
            '_input_charset' => $this->getInputCharset(),
        ];

        $data['sign'] = $this->sign($data, $this->getSignType());
        $data['sign_type'] = $this->getSignType();

        return $data;
    }
73722
public function getMessages()
    {
        if (empty($this->messages)) {
            $message = new IncomingMessage(Image::PATTERN, $this->event->get('from')['id'], $this->event->get('conversation')['id'],
                $this->payload);
            $message->setImages($this->getImagesUrls());
            $this->messages = [$message];
        }

        return $this->messages;
    }
99214
public function toArray()
    {
        $data = [
            'name' => $this->getName(),
            'text' => $this->getText(),
            'type' => $this->getType(),
            'style' => $this->getStyle(),
        ];

        if($this->getUrl()) $data['url'] = $this->getUrl();
        if($this->getValue()) $data['value'] = $this->getValue();
        if($this->getConfirm()) $data['confirm'] = $this->getConfirm()->toArray();
        if($this->getOptions()) $data['options'] = $this->getOptions();
        if($this->getOptionGroups()) $data['option_groups'] = $this->getOptionGroups();
        if($this->getDataSource()) $data['data_source'] = $this->getDataSource();
        if($this->getSelectedOptions()) $data['selected_options'] = $this->getSelectedOptions();
        if($this->getMinQueryLength()) $data['min_query_length'] = $this->getMinQueryLength();

        return $data;
    }
813642
public function toArray()
    {
        if ($this->hasAttachment) {
            return $this->attachmentMessageToArray();
        }

        if ($this->hasText) {
            //check if has buttons
            if (count($this->buttons) > 0) {
                return $this->buttonMessageToArray();
            }

            return $this->textMessageToArray();
        }

        if (count($this->cards) > 0) {
            return $this->genericMessageToArray();
        }

        throw CouldNotCreateMessage::dataNotProvided();
    }
814637
public function toData()
    {
        $data = [
            'type' => 'standard',
        ];

        if ($this->imageSize) {
            $data['image_size'] = $this->imageSize;
        }

        if ($this->ref) {
            $data['data'] = $this->ref;
        }


        return $data;
    }
586033
protected function genericMessageToArray()
    {
        $message = [];
        $message['recipient'] = $this->recipient;
        $message['notification_type'] = $this->notificationType;
        $message['message']['attachment']['type'] = 'template';
        $message['message']['attachment']['payload']['template_type'] = 'generic';
        $message['message']['attachment']['payload']['elements'] = $this->cards;

        return $message;
    }
1208811
public static function get_data() {
	if (static::get_method() == 'POST' && !empty($_POST)) {
		return $_POST;
	}
	
	$data_string = file_get_contents('php://input');
	if (empty($data_string)) {
		return [];
	}
	
	// convert from json or xml
	$type = self::get_content_type();
	if ($type == 'json') {
		return json_decode($data_string, true);
	}
	if ($type == 'xml') {
		$xml_options =
			LIBXML_NOCDATA|                  // convert CDATA to strings
			LIBXML_COMPACT|                  // speed optimalization
			LIBXML_NONET|                    // disable network access
			LIBXML_NOERROR|LIBXML_NOWARNING; // turn off error reporting
		$xml_data = simplexml_load_string($data_string, $class='SimpleXMLElement', $xml_options);
		
		return json_decode(json_encode($xml_data), true);
	}
	
	parse_str($data_string, $data_array);
	
	return $data_array;
}