错误原因是发送的signature里面有+号,这个符号,在magento后台会被编码成空格,导致验证的时候,无法通过。解决方案:
重写 Mage_Oauth_Model_Server 类的
/**
* Retrieve protocol parameters from query string
*
* @return Mage_Oauth_Model_Server
*/
protected function _fetchProtocolParamsFromQuery()
{
foreach ($this->_request->getQuery() as $queryParamName => $queryParamValue) {
if ($this->_isProtocolParameter($queryParamName)) {
$this->_protocolParams[$queryParamName] = str_replace(' ','+',$queryParamValue);
}
}
return $this;
}