- <?php
- include_once('config.php');
- if(isset($_GET['shop']) && !empty($_GET['shop']))
- {
- $install_url = "https://" . $_GET['shop'] . "/admin/oauth/authorize?client_id=" . API_KEY . "&scope=" . SCOPES . "&redirect_uri=" . urlencode(REDIRECT_URI) . "&state=" . NONCE;
- header("Location: " . $install_url);
- die();
- }
- else
- {
- echo '<p>' . SHOP_REQUIRED . '</p>';
- echo '<p>Example: https://facturis-online.ro/plugins/shopify_app/install.php?shop=my-shop</p>';
- }
|