/
Plugin Install - Process

Plugin Install - Process

Plugin Install - Process:

PluginDashboardNetcommInstall.png

  1. Install requires registration as an app provider.

    1. Checks by the Shopify shop URL if it exists, if not then proceeds with installation.
      "shopUrl": "http://uextension.myshopify.com ",
      "secureShopUrl": "https:\\/\\/uextension.myshopify.com",

  2. Authentication process and Token exchange.

    1. Retrieves the hmac & host & timestamp GET variable fields to prepare for authentication.
      "hmac": "67265c0683abeab279465c633ccb98ed86bebe456cf396189e6283c61665b78d",
      "host": "YWRtaW4uc2hvcGlmeS5jb20vc3RvcmUvdWV4dGVuc2lvbg",
      "timestamp": "1720782483"

  3. The app registers within Shopify and Customer’s shop.
    Creates the App’s auth package with the new shop URL and a new Auth request.

    // Shopify Netcomm App ID & Key & URL $appConfig = $this->getNetcommAppConfig($secureShopUrl); // Creates static configuration for Shopify $shopifySdk = ShopifySDK::config($appConfig); // Auth calls static ShopifySDK config set earlier. This should redirect after the auth request is approved. AuthHelper::createAuthRequest(self::APP_SCOPES, $redirectUrl);

    The auth request goes to Shopify which verifies and redirects the user to login and then passes the request to the call back callback method which will receive the Access Token and register the necessary webhooks with shopify retrieving a ID for each.

  4. Privilege establishment.
    Privileges are requested during authentication the result is a a install modal from Shopify asking user to approve the App’s privilege request.

    permission_request.png

  5. Persists to DB.
    Once Install is clicked then the Shopify shop details will be stored in the DB, and the user redirected to the Netcomm & eKomi Configuration Page to complete installation.
    After the user has clicked the install button then Shopify sends a request to our callbackAction to register all the webhooks through a Curl request.
    Important header information:

    curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'X-Shopify-Access-Token: ' . $accessToken, 'Accept: application/json', 'Content-Type: application/json' ]);

 

Related content

Shopify Dashboard & Research.
Shopify Dashboard & Research.
More like this
Netcomm Plugin
Netcomm Plugin
More like this
eKomi Official Shopify Plugin for NetComm
eKomi Official Shopify Plugin for NetComm
More like this
Plugin Dashboard Repo - Local Dev Setup & Research.
Plugin Dashboard Repo - Local Dev Setup & Research.
More like this
Plugin Uninstall Process
Plugin Uninstall Process
More like this
Plugin Configuration - eKomi & Netcomm
Plugin Configuration - eKomi & Netcomm
More like this