Magento Rest API - oAuth Error
Estoy trabajando con Magento Rest API por primera vez, repasé los tutoriales de Rest API enhttp://www.magentocommerce.com/api/rest
y probé un ejemplo para obtener el producto a través de la API:
$callbackUrl = "http://localhost/wineshop/products.php";
$temporaryCredentialsRequestUrl = "http://localhost/wineshop/oauth/initiate? oauth_callback=" . urlencode($callbackUrl);
$adminAuthorizationUrl = 'http://localhost/wineshop/admin/oauth_authorize';
$accessTokenRequestUrl = 'http://localhost/wineshop/oauth/token';
$apiUrl = 'http://localhost/wineshop/api/rest';
$consumerKey = 'u48p1x9gzrg7r82c94woa5z7g805uw0i';
$consumerSecret = '96ydrk8s89xxath8h5z71vcl5abfq0zg';
session_start();
if (!isset($_GET['oauth_token']) && isset($_SESSION['state']) && $_SESSION['state'] == 1) {
$_SESSION['state'] = 0;
}
try {
$authType = ($_SESSION['state'] == 2) ? OAUTH_AUTH_TYPE_AUTHORIZATION : OAUTH_AUTH_TYPE_URI;
$oauthClient = new OAuth($consumerKey, $consumerSecret, OAUTH_SIG_METHOD_HMACSHA1, $authType);
$oauthClient->enableDebug();
También instalé la última versión de OAUTH y también se muestra en mis Extensiones PHP de WampServer pero no se muestra enphpinfo()
. Hice frente a laphp_oauth.dll
archivar en..\www\bin\php\ext
y también editéphp.ini
y entróextension=php_oauth.dll
pero al correr elproducts.php
me muestra el
Fatal error: Class 'OAuth' not found in P:\wamp\www\products.php on line 19
Y también quiero saber cómo solicitar el token que tengokey
ysecret
después de ingresar nuevo consumidor en Magento Admin Panel. Pero no sé cómo llegar.Access Token
& Access Token Secret
que entramos enRESTClient
Por favor ayuda, gracias de antemano