src/Charge/Ali/AliQrCharge.php
protected function retData(array $ret)
    {
        $url = parent::retData($ret);

        // 发起网络请求
        try {
            $data = $this->sendReq($url);
        } catch (PayException $e) {
            throw $e;
        }

        // 检查是否报错
        if ($data['code'] !== '10000') {
            throw new PayException($data['sub_msg']);
        }

        return $data['qr_code'];
    }
protected function retData(array $ret)
    {
        $url = parent::retData($ret);

        // 发起网络请求
        try {
            $data = $this->sendReq($url);
        } catch (PayException $e) {
            throw $e;
        }

        // 检查是否报错
        if ($data['code'] !== '10000') {
            throw new PayException($data['sub_msg']);
        }

        return $data['qr_code'];
    }
protected function retData ( array $ ret ) { $ url = parent :: retData ( $ ret ) ; // 发起网络请求 try { $ data = $ this -> sendReq ( $ url ) ; } catch ( PayException $ e ) { throw $ e ; } // 检查是否报错 if ( $ data [ 'code' ] !== '10000' ) { throw new PayException ( $ data [ 'sub_msg' ] ) ; } return $ data [ 'qr_code' ] ; }
处理扫码支付的返回值
@param array $ret

@throws PayException
@return string  可生产二维码的uri
@author helei
处理扫码支付的返回值 @param array $ret