Download the PHP package yehia-tarek/salla-toolkit without Composer

On this page you can find all versions of the php package yehia-tarek/salla-toolkit. 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 salla-toolkit

Salla Laravel SDK

An unofficial Laravel package for building apps on the Salla e-commerce platform: Merchant API resources, OAuth 2.0 (Easy Mode & Custom Mode), and secure webhook handling. Built against docs.salla.dev.

This is a community package, not published or maintained by Salla. Endpoint paths mirror the Merchant API docs as of this writing — please verify against the docs for anything mission critical, and open an issue/PR if something drifted.

Features

Installation

salla:install publishes config/salla.php and the salla_authorizations migration, and prints your webhook URL.

Add your app's credentials (from the Salla Partners Portal) to .env:

Usage

Single-store / private apps

If you're building a private app for one store, drop a long-lived token in SALLA_ACCESS_TOKEN and skip straight to calling resources:

Public / multi-store apps (OAuth)

Easy Mode (recommended by Salla): send merchants straight to the install URL. Salla handles the authorization code exchange for you and delivers the resulting tokens via the app.store.authorize webhook event, which this package catches and persists automatically.

Nothing else required — as long as your webhook route is reachable and SALLA_WEBHOOK_SECRET matches the secret configured on the Partners Portal, tokens land in the salla_authorizations table on their own.

Custom Mode: build your own authorize URL and handle the callback:

Once a store's tokens are stored, scope every call to that store:

forStore() automatically refreshes the access token (and re-persists the new refresh token — Salla's are single-use) if a request comes back with a 401.

Ad-hoc token

Pagination

Salla list endpoints return data + pagination:

Or fetch every page at once (careful on large stores):

Available resources

orders, products, customers, categories, brands, coupons, specialOffers, shipments, shippingCompanies, shippingZones, taxes, countries, cities, currencies, affiliates, reviews, webhooks, settings, store, exports.

Every resource supports all(), find($id), create($data), update($id, $data), and delete($id) (where Salla's API supports the corresponding verb), plus resource-specific helpers — e.g. Salla::products()->findBySku($sku), Salla::orders()->updateStatus(...), Salla::customers()->ban($id). See each class under src/Resources for the full list.

Webhooks

Point your app's Webhook URL (Partners Portal) at:

(configurable via SALLA_WEBHOOK_PATH). Incoming requests are verified against X-Salla-Signature using SALLA_WEBHOOK_SECRET, then dispatched as Laravel events:

See the full event list at docs.salla.dev/421119m0.

If you'd rather not use the auto-registered route, set SALLA_WEBHOOK_ROUTE_ENABLED=false and wire up your own controller with the VerifySallaWebhook middleware:

Error handling

Custom token storage

Swap the Eloquent-backed repository for your own by binding the contract in your own service provider:

Your class just needs to implement store(), find(), and forget() — see src/Contracts/SallaTokenRepository.php.

Configuration reference

See config/salla.php for every option (API base URL, OAuth endpoints, HTTP timeouts/retries, token table name/connection, webhook path & middleware).

License

MIT


All versions of salla-toolkit with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
illuminate/http Version ^10.0|^11.0|^12.0|^13.0
illuminate/database Version ^10.0|^11.0|^12.0|^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 yehia-tarek/salla-toolkit contains the following files

Loading the files please wait ...