src/Common/Weixin/Data/TransferData.php
protected function checkDataParam()
    {
        $openId = $this->openid;
        $transNo = $this->trans_no;
        $checkName = $this->check_name;
        $realName = $this->payer_real_name;
        $amount = $this->amount;
        $clientIp = $this->client_ip;

        if (empty($openId)) {
            throw new PayException('商户appid下，某用户的openid 必须传入');
        }

        if (empty($transNo)) {
            throw new PayException('商户订单号，需保持唯一性');
        }

        if ($checkName !== 'NO_CHECK' && empty($realName)) {
            throw new PayException('请传入收款人真实姓名');
        }

        // 微信使用的单位位分.此处进行转化
        $this->amount = bcmul($amount, 100, 0);
        if (empty($amount) || $amount < 0) {
            throw new PayException('转账金额错误');
        }

        if (empty($clientIp)) {
            $this->client_ip = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '127.0.0.1';
        }
    }
protected function checkDataParam()
    {
        $openId = $this->openid;
        $transNo = $this->trans_no;
        $checkName = $this->check_name;
        $realName = $this->payer_real_name;
        $amount = $this->amount;
        $clientIp = $this->client_ip;

        if (empty($openId)) {
            throw new PayException('商户appid下，某用户的openid 必须传入');
        }

        if (empty($transNo)) {
            throw new PayException('商户订单号，需保持唯一性');
        }

        if ($checkName !== 'NO_CHECK' && empty($realName)) {
            throw new PayException('请传入收款人真实姓名');
        }

        // 微信使用的单位位分.此处进行转化
        $this->amount = bcmul($amount, 100, 0);
        if (empty($amount) || $amount < 0) {
            throw new PayException('转账金额错误');
        }

        if (empty($clientIp)) {
            $this->client_ip = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '127.0.0.1';
        }
    }
检查相关参数是否设置
@author helei