protected function getShaSign(array $params, $out = false)
    {
        uksort($params, 'strcasecmp');

        $shaKey = $this->getOption('sha'.($out ? '-out' : '').'_key');

        $shasignStr = '';
        foreach ($params as $key => $param) {
            if (null !== $param && '' !== $param) {
                $shasignStr .= strtoupper($key).'='.$param.$shaKey;
            }
        }

        return strtoupper(sha1($shasignStr));
    }
protected function getShaSign(array $params, $out = false)
    {
        uksort($params, 'strcasecmp');

        $shaKey = $this->getOption('sha'.($out ? '-out' : '').'_key');

        $shasignStr = '';
        foreach ($params as $key => $param) {
            if (null !== $param && '' !== $param) {
                $shasignStr .= strtoupper($key).'='.$param.$shaKey;
            }
        }

        return strtoupper(sha1($shasignStr));
    }
protected function getShaSign ( array $ params , $ out = false ) { uksort ( $ params , 'strcasecmp' ) ; $ shaKey = $ this -> getOption ( 'sha' . ( $ out ? '-out' : '' ) . '_key' ) ; $ shasignStr = '' ; foreach ( $ params as $ key => $ param ) { if ( null !== $ param && '' !== $ param ) { $ shasignStr .= strtoupper ( $ key ) . '=' . $ param . $ shaKey ; } } return strtoupper ( sha1 ( $ shasignStr ) ) ; }
Signs the payment transaction.

@param array $params
@param bool  $out    Should we use the out sha key?

@return string
Signs the payment transaction .