src/Common/Ali/Data/TransData.php
protected function checkDataParam()
    {
        $transNo = $this->trans_no;
        $payeeType = $this->payee_type;
        $payeeAccount = $this->payee_account;
        $amount = $this->amount;
        $remark = $this->remark;

        if (empty($transNo)) {
            throw new PayException('请传入 商户转账唯一订单号');
        }

        if (empty($payeeType) || ! in_array($payeeType, ['ALIPAY_USERID', 'ALIPAY_LOGONID'])) {
            throw new PayException('请传入收款账户类型');
        }

        if (empty($payeeAccount)) {
            throw new PayException('请传入转账帐号');
        }

        if (empty($amount) || bccomp($amount, 0, 2) !== 1) {
            throw new PayException('请输入转账金额，且大于0');
        }

        if (bccomp($amount, Config::TRANS_FEE, 2) !== -1 && empty($remark)) {
            throw new PayException('转账金额大于等于' . Config::TRANS_FEE, '必须设置 remark');
        }
    }
protected function checkDataParam()
    {
        $transNo = $this->trans_no;
        $payeeType = $this->payee_type;
        $payeeAccount = $this->payee_account;
        $amount = $this->amount;
        $remark = $this->remark;

        if (empty($transNo)) {
            throw new PayException('请传入 商户转账唯一订单号');
        }

        if (empty($payeeType) || ! in_array($payeeType, ['ALIPAY_USERID', 'ALIPAY_LOGONID'])) {
            throw new PayException('请传入收款账户类型');
        }

        if (empty($payeeAccount)) {
            throw new PayException('请传入转账帐号');
        }

        if (empty($amount) || bccomp($amount, 0, 2) !== 1) {
            throw new PayException('请输入转账金额，且大于0');
        }

        if (bccomp($amount, Config::TRANS_FEE, 2) !== -1 && empty($remark)) {
            throw new PayException('转账金额大于等于' . Config::TRANS_FEE, '必须设置 remark');
        }
    }
protected function checkDataParam ( ) { $ transNo = $ this -> trans_no ; $ payeeType = $ this -> payee_type ; $ payeeAccount = $ this -> payee_account ; $ amount = $ this -> amount ; $ remark = $ this -> remark ; if ( empty ( $ transNo ) ) { throw new PayException ( '请传入 商户转账唯一订单号'); } if ( empty ( $ payeeType ) || ! in_array ( $ payeeType , [ 'ALIPAY_USERID' , 'ALIPAY_LOGONID' ] ) ) { throw new PayException ( '请传入收款账户类型'); } if ( empty ( $ payeeAccount ) ) { throw new PayException ( '请传入转账帐号'); } if ( empty ( $ amount ) || bccomp ( $ amount , 0 , 2 ) !== 1 ) { throw new PayException ( '请输入转账金额，且大于0'); } if ( bccomp ( $ amount , Config :: TRANS_FEE , 2 ) !== - 1 && empty ( $ remark ) ) { throw new PayException ( '转账金额大于等于' . Config::TRANS F E, '必须 设置  remark') ; } }
检查参数是否合法
@author helei
检查参数是否合法