src/Message/PromotionTransferRequest.php
public function getData()
    {
        $this->validate('app_id', 'mch_id', 'partner_trade_no', 'cert_path', 'key_path');

        $data = array(
            'mch_appid'        => $this->getAppId(),
            'mchid'            => $this->getMchId(),
            'device_info'      => $this->getDeviceInfo(),     // <optional>
            'partner_trade_no' => $this->getPartnerTradeNo(),
            'openid'           => $this->getOpenId(),
            'check_name'       => $this->getCheckName(),      // <NO_CHECK or FORCE_CHECK>
            're_user_name'     => $this->getReUserName(),
            'amount'           => $this->getAmount(),
            'desc'             => $this->getDesc(),
            'spbill_create_ip' => $this->getSpbillCreateIp(),
            'nonce_str'        => md5(uniqid()),
        );

        $data = array_filter($data);

        $data['sign'] = Helper::sign($data, $this->getApiKey());

        return $data;
    }
public function getData()
    {
        $this->validate('app_id', 'mch_id', 'partner_trade_no', 'cert_path', 'key_path');

        $data = array(
            'mch_appid'        => $this->getAppId(),
            'mchid'            => $this->getMchId(),
            'device_info'      => $this->getDeviceInfo(),     // <optional>
            'partner_trade_no' => $this->getPartnerTradeNo(),
            'openid'           => $this->getOpenId(),
            'check_name'       => $this->getCheckName(),      // <NO_CHECK or FORCE_CHECK>
            're_user_name'     => $this->getReUserName(),
            'amount'           => $this->getAmount(),
            'desc'             => $this->getDesc(),
            'spbill_create_ip' => $this->getSpbillCreateIp(),
            'nonce_str'        => md5(uniqid()),
        );

        $data = array_filter($data);

        $data['sign'] = Helper::sign($data, $this->getApiKey());

        return $data;
    }
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