Hello,
I have a very simple bit of cost, which calls this Shopify.php client file:
<?php
require 'shopify.php';
$sc = new ShopifyClient($shop_domain, $token, $api_key, $secret);
$productId = $_GET['id'];
$fieldsArray = array(
"namespace" => "video",
"value" => 25,
"key" => "video",
"value_type" => "string");
$products = $sc->call('GET', '/admin/products/' . $productId . '/metafields.json', array('metafield'=> $fieldsArray));
?>
However, once I install the app on my Shopify test store I get the following error:
Fatal error: Uncaught exception 'ShopifyCurlException' with message 'Couldn't resolve host ''' in /home/kisswebm/public_html/shopify-apps/pre-order/shopify.php:71
This is pointing to line 71 of the Shopify.php php client and this line is:
if ($errno) throw new ShopifyCurlException($error, $errno);
I believe it's a DNS issue and my server can't resolve the domain. I originally thought it may be that my Site5 host isn't accepting outgoing curl connections but I'm not sure. I'm waiting to hear back from their higher support.
The curl url is in this format: "https://{$this->api_key}:$password@{$this->shop_domain}/".
Doesn't any one know what the problem is. Am I making a mistake deploying an app from my hosting server? As you can tell I'm new to app. I'm experimenting with some simple apps to start with.
Many thanks for any help