src/Common/Weixin/Data/RedData.php
protected function checkDataParam()
    {
        $mch_billno = $this->mch_billno;// 商户退款单号
        $sendName = $this->send_name;
        $reOpenid = $this->re_openid;
        $wishing = $this->wishing;
        $actName = $this->act_name;
        $remark = $this->remark;
        $total_amount = $this->total_amount;
        $sendListid = $this->send_listid;//红包订单的微信单号

        if (empty($mch_billno)) {
            throw new PayException('请设置单号 mch_billno');
        }
        if (empty($sendName)) {
            throw new PayException('请设置发送名称 send_name');
        }
        if (empty($reOpenid)) {
            throw new PayException('请设置接收者 openID');
        }
        if (empty($wishing)) {
            throw new PayException("请设置祝福语"); 
        }
        if (empty($actName)) {
            throw new PayException("请设置活动名称"); 
        }
        if (empty($remark)) {
            throw new PayException("请设置备注信息"); 
        }
        // 微信使用的单位位分.此处进行转化
        $this->total_amount = bcmul($total_amount, 100, 0);
        if (empty($total_amount) || $total_amount < 1) {
            throw new PayException('转账金额错误');
        }
        // 二者不能同时为空
        if (empty($sendListid) && empty($mch_billno)) {
            throw new PayException('必须提供微信交易号或商户网站唯一订单号。建议使用微信交易号');
        }

        // 该接口，微信配置文件，必须提供cert  key  两个pem文件
        $certPath = $this->appCertPem;
        $keyPath = $this->appKeyPem;
        if (empty($certPath)) {
            throw new PayException('红包接口，必须提供 apiclient_cert.pem 证书');
        }

        if (empty($keyPath)) {
            throw new PayException('红包接口，必须提供 apiclient_key.pem 证书');
        }

    }
protected function checkDataParam()
    {
        $mch_billno = $this->mch_billno;// 商户退款单号
        $sendName = $this->send_name;
        $reOpenid = $this->re_openid;
        $wishing = $this->wishing;
        $actName = $this->act_name;
        $remark = $this->remark;
        $total_amount = $this->total_amount;
        $sendListid = $this->send_listid;//红包订单的微信单号

        if (empty($mch_billno)) {
            throw new PayException('请设置单号 mch_billno');
        }
        if (empty($sendName)) {
            throw new PayException('请设置发送名称 send_name');
        }
        if (empty($reOpenid)) {
            throw new PayException('请设置接收者 openID');
        }
        if (empty($wishing)) {
            throw new PayException("请设置祝福语"); 
        }
        if (empty($actName)) {
            throw new PayException("请设置活动名称"); 
        }
        if (empty($remark)) {
            throw new PayException("请设置备注信息"); 
        }
        // 微信使用的单位位分.此处进行转化
        $this->total_amount = bcmul($total_amount, 100, 0);
        if (empty($total_amount) || $total_amount < 1) {
            throw new PayException('转账金额错误');
        }
        // 二者不能同时为空
        if (empty($sendListid) && empty($mch_billno)) {
            throw new PayException('必须提供微信交易号或商户网站唯一订单号。建议使用微信交易号');
        }

        // 该接口，微信配置文件，必须提供cert  key  两个pem文件
        $certPath = $this->appCertPem;
        $keyPath = $this->appKeyPem;
        if (empty($certPath)) {
            throw new PayException('红包接口，必须提供 apiclient_cert.pem 证书');
        }

        if (empty($keyPath)) {
            throw new PayException('红包接口，必须提供 apiclient_key.pem 证书');
        }

    }
检查参数
@author helei