install.php 473 B

123456789101112131415
  1. <?php
  2. include_once('config.php');
  3. if(isset($_GET['shop']) && !empty($_GET['shop']))
  4. {
  5. $install_url = "https://" . $_GET['shop'] . "/admin/oauth/authorize?client_id=" . API_KEY . "&scope=" . SCOPES . "&redirect_uri=" . urlencode(REDIRECT_URI) . "&state=" . NONCE;
  6. header("Location: " . $install_url);
  7. die();
  8. }
  9. else
  10. {
  11. echo '<p>' . SHOP_REQUIRED . '</p>';
  12. echo '<p>Example: https://facturis-online.ro/plugins/shopify_app/install.php?shop=my-shop</p>';
  13. }