Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 129c91a95f
Fetching contributors…

Cannot retrieve contributors at this time

executable file 33 lines (27 sloc) 0.909 kb
#!/usr/bin/php
<?php
require "consumer_key.php";
require "access_token.php";
require "api_url_base.php";
require "error.php";
try {
$oauth = new Oauth($consumer_key, $consumer_secret, OAUTH_SIG_METHOD_HMACSHA1, OAUTH_AUTH_TYPE_AUTHORIZATION);
$oauth->enableDebug();
$oauth->setToken($access_token, $access_secret);
} catch(OAuthException $E) {
Error("setup exception", $E->getMessage(), null, null, $E->debugInfo);
}
try {
$oauth->fetch($api_url_base ."/orders/cart/v1", null, OAUTH_HTTP_METHOD_GET, array("Accept" => "application/json"));
$response = $oauth->getLastResponse();
$json = json_decode($response);
if (null == $json) {
PrintJsonLastError();
var_dump($response);
} else {
print_r($json);
}
} catch(OAuthException $E) {
Error("fetch exception", $E->getMessage(), null, $oauth->getLastResponseInfo(), $E->debugInfo);
}
?>
Jump to Line
Something went wrong with that request. Please try again.