Download the PHP package amadulhaque/shopify-bridge without Composer

On this page you can find all versions of the php package amadulhaque/shopify-bridge. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package shopify-bridge

Amadulhaque Laravel Shopify

A framework-style Shopify integration for Laravel. It owns Shopify protocol work—OAuth, Admin GraphQL, webhook subscriptions, and HMAC verification—while the host application owns shops, users, tokens, persistence, tenancy, and authorization.

It has no models, migrations, database access, sessions, queues, cache stores, Redis dependency, authentication guards, or storage implementation.

Contents

Install

Install the package from Packagist:

Laravel discovers ShopifyServiceProvider automatically. Publish the configuration only when you need to customize it:

For this repository's local development package, Composer already uses packages/Shopify as a path repository, so no additional install command is needed.

Configure

Set these values in the host application's .env:

Add the same complete callback URL to your Shopify app's allowed redirection URLs. The published config/shopify.php configures API version, scopes, retries, timeout, and a replaceable HTTP client. It does not configure storage.

OAuth state data

Pass optional state data as third redirect() or authorizationUrl() argument. Package sends only an opaque random state token to Shopify, stores your data through OAuthStateRepository, then returns it as $result->state after valid callback. Do not JSON-encode or URL-encode state yourself.

Bind application contracts

OAuth state uses package cache repository by default. Set SHOPIFY_STATE_CACHE_STORE=redis or file (or omit it to use Laravel CACHE_STORE). Bind your own OAuthStateRepository only when custom state storage is needed. Bind your own implementations for tokens, shop resolution, webhook definitions, and application authorization.

OAuthStateRepository::put() receives optional state data. pull() must return it and consume state once. TokenRepository::findFor(Shop $shop) must return AccessToken|null. The package never calls a save, create, or update method on a repository.

Optional application authorization

Bind AuthorizationResolver when your application needs to decide whether its current caller may access a resolved shop. It can use Laravel Auth, a JWT, an API key, or any custom tenant system. If it is not bound, shopify.auth only verifies that a shop and Shopify token resolve.

OAuth install flow

The package does not register routes because URL structure is an application decision. Define your own routes:

Example controller. ShopifyInstallationStore below is an application service; define it however your product stores installations.

exchange() returns an immutable OAuthResult with Shop and AccessToken; it never persists either value.

Providing and validating an existing access token

For an already-installed shop, pass its domain and token directly. The token is used only for that call chain and is never persisted by this package.

GraphQL usage

GraphQL resolves the access token from TokenRepository, so callers only provide a shop.

Mutations use the same fluent API:

When you have a token at call time, pass it as the second graph() argument instead of implementing TokenRepository:

GraphqlResponse preserves Shopify data and errors. Transport failures throw ShopifyHttpException. A GraphQL throttle response throws GraphqlThrottled; queue jobs should release using $exception->retryAfterSeconds rather than immediately retrying.

To replace Laravel's HTTP client, bind Amadulhaque\Shopify\Contracts\HttpClient to your adapter. This is where applications can add tracing, circuit breaking, distributed rate limiting, or custom retry behavior.

Middleware

The package provides three aliases:

An authenticated Laravel route can combine normal application auth with Shopify authorization without coupling the package to a User model:

Webhooks

Provide the desired subscriptions from your application's WebhookRepository, then manage subscriptions through GraphQL:

All application-webhook operations can receive a direct access token as their final argument. all() retrieves every page; sync() uses it too, so it detects stale subscriptions beyond Shopify's first 250 results.

sync(..., true) is explicitly opt-in because deleting a remote subscription can affect another component that manages the same store.

Webhook handling stays thin:

Events

Listen in the host application for package events:

Available events: ShopInstalled, AccessTokenUpdated, WebhookReceived, WebhookVerified, and ShopUninstalled.

Testing

Bind in-memory implementations of the contracts and fake Shopify HTTP requests:

The package test suite covers OAuth exchange, token resolution, GraphQL requests, middleware aliases, HMAC rejection and verification, webhook events, the facade, and webhook registration. Run it with:

Public API


All versions of shopify-bridge with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/contracts Version ^13.0
illuminate/http Version ^13.0
illuminate/routing Version ^13.0
illuminate/support Version ^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package amadulhaque/shopify-bridge contains the following files

Loading the files please wait ...