I Have been working around with the magento's REST API's for the first time and when i execute this API in a test file in different project i get the Following error
Fatal error: Class 'OAuth' not found in C:\wamp\www\trunk\test.php on line 15
Tried google around even on the stack overflow with lots of topic but nothing could get me passed through this error. In many of blog in found they ask to install Oauth extension for php. as i am using wamp server for windows i could found some extension and i have installed but doesn't show up in the extension list when i run phpinfo().
Looking forward for help.
Thanks in Advance.
$callbackUrl = "http://localhost/Magento/magento/index.php/oauth_admin.php";
$temporaryCredentialsRequestUrl = "http://localhost/Magento/magento/index.php/oauth/initiate?oauth_callback=" . urlencode($callbackUrl);
$adminAuthorizationUrl = 'http://localhost/Magento/magento/index.php/admin/oAuth_authorize';
$accessTokenRequestUrl = 'http://localhost/Magento/magento/index.php/oauth/token';
$apiUrl = 'http://localhost/Magento/magento/index.php/api/rest';
$consumerKey = 'g4gxxknjl3qaof2px0otrpuw6hv4qxsf';
$consumerSecret = '8dc0dfruqresuwvufby7ttchutj3nyn3';
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();