protected function getSignContent(array $toBeSigned, $verify = false)
    {
        ksort($toBeSigned);
        $stringToBeSigned = '';
        foreach ($toBeSigned as $k => $v) {
            if ($v !== '') {
                if ($verify && $k != 'sign' && $k != 'sign_type') {
                    $stringToBeSigned .= $k . '=' . $v . '&';
                }
                if (!$verify && $v !== '' && !is_null($v) && $k != 'sign' && '@' != substr($v, 0, 1)) {
                    $stringToBeSigned .= $k . '=' . $v . '&';
                }
            }
        }
        $stringToBeSigned = substr($stringToBeSigned, 0, -1);
        unset($k, $v);
        return $stringToBeSigned;
    }
protected function getSignContent(array $toBeSigned, $verify = false)
    {
        ksort($toBeSigned);
        $stringToBeSigned = '';
        foreach ($toBeSigned as $k => $v) {
            if ($v !== '') {
                if ($verify && $k != 'sign' && $k != 'sign_type') {
                    $stringToBeSigned .= $k . '=' . $v . '&';
                }
                if (!$verify && $v !== '' && !is_null($v) && $k != 'sign' && '@' != substr($v, 0, 1)) {
                    $stringToBeSigned .= $k . '=' . $v . '&';
                }
            }
        }
        $stringToBeSigned = substr($stringToBeSigned, 0, -1);
        unset($k, $v);
        return $stringToBeSigned;
    }
protected function getSignContent ( array $ toBeSigned , $ verify = false ) { ksort ( $ toBeSigned ) ; $ stringToBeSigned = '' ; foreach ( $ toBeSigned as $ k => $ v ) { if ( $ v !== '' ) { if ( $ verify && $ k != 'sign' && $ k != 'sign_type' ) { $ stringToBeSigned .= $ k . '=' . $ v . '&' ; } if ( ! $ verify && $ v !== '' && ! is_null ( $ v ) && $ k != 'sign' && '@' != substr ( $ v , 0 , 1 ) ) { $ stringToBeSigned .= $ k . '=' . $ v . '&' ; } } } $ stringToBeSigned = substr ( $ stringToBeSigned , 0 , - 1 ) ; unset ( $ k , $ v ) ; return $ stringToBeSigned ; }
数据签名处理
@param array $toBeSigned
@param bool $verify
@return bool|string
数据签名处理