From fb631436be19387a4d0d8a5573e0e2ccb3ffd58a Mon Sep 17 00:00:00 2001 From: Sam-R Date: Thu, 20 Aug 2015 12:27:33 +0100 Subject: [PATCH 1/2] Update oauth.php Added REDIRECT_URI to the $permission_url which is now required by Shopify "{redirect_uri} - (Required) substitute this with the URL where you want to redirect the users after they authorize the client. The complete URL specified here must be identical to one of the Application Redirect URLs. Note: in older applications, this parameter was optional, and redirected to the Application Callback URL when no other value was specified." - https://docs.shopify.com/api/authentication/oauth#asking-for-permission --- oauth.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/oauth.php b/oauth.php index e299f44..e416d9e 100644 --- a/oauth.php +++ b/oauth.php @@ -14,7 +14,7 @@ # Step 2: http://docs.shopify.com/api/authentication/oauth#asking-for-permission if (!isset($_GET['code'])) { - $permission_url = shopify\authorization_url($_GET['shop'], SHOPIFY_APP_API_KEY, array('read_content', 'write_content', 'read_themes', 'write_themes', 'read_products', 'write_products', 'read_customers', 'write_customers', 'read_orders', 'write_orders', 'read_script_tags', 'write_script_tags', 'read_fulfillments', 'write_fulfillments', 'read_shipping', 'write_shipping')); + $permission_url = shopify\authorization_url($_GET['shop'], SHOPIFY_APP_API_KEY, array('read_content', 'write_content', 'read_themes', 'write_themes', 'read_products', 'write_products', 'read_customers', 'write_customers', 'read_orders', 'write_orders', 'read_script_tags', 'write_script_tags', 'read_fulfillments', 'write_fulfillments', 'read_shipping', 'write_shipping'), REDIRECT_URI); die(""); } @@ -46,4 +46,4 @@ } -?> \ No newline at end of file +?> From d5e36d1ba702e4b5e24ae9013c4a375ae3fffd51 Mon Sep 17 00:00:00 2001 From: Sam-R Date: Thu, 20 Aug 2015 12:28:43 +0100 Subject: [PATCH 2/2] Update conf.php added REDIRECT_URI as a variable, used in oauth.php modifications, which is now a required field. --- conf.php | 1 + 1 file changed, 1 insertion(+) diff --git a/conf.php b/conf.php index 503eb40..e4d6aad 100644 --- a/conf.php +++ b/conf.php @@ -2,3 +2,4 @@ define('SHOPIFY_APP_API_KEY', ''); define('SHOPIFY_APP_SHARED_SECRET', ''); + define('REDIRECT_URI', '');