Download the PHP package laraditz/lazada without Composer

On this page you can find all versions of the php package laraditz/lazada. 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 lazada

Laravel Lazada

Latest Version on Packagist Total Downloads GitHub Actions

A comprehensive Laravel package for seamless integration with the Lazada Open Platform API. This package provides a clean, intuitive interface for managing Lazada sellers, handling authentication, processing orders, managing products, and receiving webhooks.

Buy Me A Coffee

Features

Requirements

Installation

You can install the package via composer:

Quick Start

1. Lazada App Setup

Before using this package, you need a Lazada Open Platform app:

  1. Visit Lazada Open Platform
  2. Create a new app or use an existing one
  3. Note your App Key and App Secret
  4. Configure the App Callback URL: https://your-app-url.com/lazada/seller/authorized

2. Environment Configuration

Add your Lazada credentials to your .env file:

3. Publish Migration

4. Run Migration

5. Configuration (Optional)

6. Authorization Flow

To authorize a seller:

  1. Generate and share the authorization URL with the seller:

  2. The seller logs in and authorizes your app
  3. Lazada redirects to https://your-app-url.com/lazada/seller/authorized
  4. The package automatically handles the token exchange and storage
  5. The seller is now ready for API calls

Note: Lazada rejects a url-encoded redirect_uri, so authorizationUrl() passes the callback URL as-is. Because of this, the callback URL (LAZADA_APP_CALLBACK_URL or the default /lazada/seller/authorized route) must not contain a query string. For example, https://your-app-url.com/callback?foo=1&bar=2 would break the authorization URL, because &bar=2 gets read as a separate parameter of the Lazada URL. Use a plain path instead, and make sure it exactly matches the App Callback URL configured in the Lazada Open Platform console.

Available Methods

Here's the full list of methods available in this package. Parameters follow the Lazada Open Platform Documentation exactly. Common parameters like app_key, sign, timestamp, and access_token are added automatically.

Authentication Service auth()

Method Description
authorizationUrl() Get the authorization URL to share with the seller.
accessToken() Exchange an authorization code for an access token.
refreshToken() Refresh an access token before it expires.
accessTokenWithOpenId() Generate an access token using an OpenID.

Seller Service seller()

Method Description
get() Fetch seller information from Lazada API and sync to DB.
info() Return the resolved LazadaSeller model for the current context.
pickUpStoreList() Return the list of pick-up store information for the seller.

Order Service order()

Method Description
list() Get an order list from a specified date range.
get() Get single order detail by order ID.
items() Get the item information of an order.
document() Retrieve order-related documents (invoices, shipping labels).

Finance Service finance()

Method Description
payoutStatus() Get transaction statements created after the provided date.
accountTransactions() Query account transactions.
logisticsFeeDetail() Query logistics fee details.
transactionDetail() Query seller transaction details within a specific date range.

Product Service product()

Method Description
get() Get the product list for the seller.
item() Get a single product item by item ID.
updateSellableQuantity() Update sellable stock quantity for a SKU.

Usage Examples

Basic Usage

Authentication

Working with Orders

Working with Products

Working with Finance

Working with Sellers

Multi-Seller Support

By default the package uses LAZADA_SELLER_SHORT_CODE from your .env. For multi-seller applications, specify the seller per request:

Error Handling

Events & Webhooks

Webhook URL

Configure this URL in your Lazada Open Platform App Management under the Push Mechanism section so Lazada pushes content updates to your app:

Available Events

Event Description
Laraditz\Lazada\Events\WebPushReceived Triggered when Lazada sends a web push.

Creating Event Listeners

Register the listener in your EventServiceProvider (Laravel 10 and below):

Read more about the Lazada Push Mechanism (LPM) in the official documentation.

Token Management

Artisan Commands

Automated Token Refresh

Set up scheduled token refresh in your app/Console/Kernel.php:

Token Lifecycle

Environment Token Type Duration
Live Access Token 30 days
Live Refresh Token 180 days
Testing Access Token 7 days
Testing Refresh Token 30 days

Important: If both tokens expire, the seller must re-authorize your app to generate a new token pair.

Testing

Changelog

Please see CHANGELOG for more information about recent changes.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security vulnerabilities, please email [email protected] instead of using the issue tracker.

Support

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of lazada with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
illuminate/http 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 laraditz/lazada contains the following files

Loading the files please wait ...