Hello, i can't seem to activate the read_checkout for this curl api

askerman
New Member
2 0 0

this is the code

 

 

$url = "https://api:pass@somesite.myshopify.com/admin/api/2020-04/checkouts/c8d2de24488fb55a7f28ab8fdf05156c.json";

$shopcurl = curl_init();
curl_setopt($shopcurl, CURLOPT_URL, $url);
curl_setopt($shopcurl, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
curl_setopt($shopcurl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($shopcurl, CURLOPT_VERBOSE, 0);
//curl_setopt($shopcurl, CURLOPT_HEADER, 1);
curl_setopt($shopcurl, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($shopcurl, CURLOPT_SSL_VERIFYPEER, false);
$response = curl_exec ($shopcurl);
curl_close ($shopcurl);

print_r($response);

Replies 3 (3)
SBD_
Shopify Staff
Shopify Staff
1098 146 219

Have you set the right scope? Do you have a request ID from the response headers handy?

Scott | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

askerman
New Member
2 0 0

nope. i've no idea. i've just found out about shopify cURL in php. i can actually get checkout information from this code, but not orders. but when i open orders url in a regular browser, it gives me the json file that i need. i just couldn't get it through php curl. thanks in advanced for the solution .

SBD_
Shopify Staff
Shopify Staff
1098 146 219

You'll want to use the Orders API for order information.

Scott | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog