victor
victor

Reputation: 537

app not installed shopify

I have an app for logistic web for shohpify but this show me this message:

enter image description here

I read that apparently Shopify has changed how they want you to authenticate your App, at this moment i can´t install my app.

this is my code:

require __DIR__.'/vendor/autoload.php';
    use phpish\shopify;

    require __DIR__.'/conf.php';

    # Guard: http://docs.shopify.com/api/authentication/oauth#verification
    shopify\is_valid_request($_GET, SHOPIFY_APP_SHARED_SECRET) or die('Invalid Request! Request or redirect did not come from Shopify');


    # 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('write_shipping', 'read_orders'));
        die("<script> top.location.href='$permission_url'</script>");

    }

Upvotes: 0

Views: 433

Answers (1)

WebWorker
WebWorker

Reputation: 413

There is already a discussion about this on GitHub. See: https://github.com/phpish/shopify_app-skeleton/issues/19

As quick fix you just can comment out the request validation in oauth.php

# Guard: http://docs.shopify.com/api/authentication/oauth#verification
//shopify\is_valid_request($_GET, SHOPIFY_APP_SHARED_SECRET) or die('Invalid Request! Request or redirect did not come from Shopify');

Upvotes: 2

Related Questions