Download the PHP package blissjaspis/laravel-rajaongkir-komerce without Composer

On this page you can find all versions of the php package blissjaspis/laravel-rajaongkir-komerce. 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 laravel-rajaongkir-komerce

Laravel RajaOngkir From Komerce

Tests Latest Version on Packagist Total Downloads License

This package provides a simple and easy-to-use Laravel wrapper for the RajaOngkir Komerce API. It supports two methods of address lookup: hierarchical step-by-step selection and direct search with autocomplete functionality.

Requirements

Requirement Version
PHP ^8.2
Laravel ^11.0, ^12.0, or ^13.0

Installation

You can install the package via composer:

You must publish the configuration file with:

Or using the provider:

Add the following to your .env file:

Set RAJAONGKIR_FAKE=true in local development to stub all API responses without calling Komerce.

The package is auto-discovered via Laravel's package discovery. No manual registration is required.

Usage

There are two ways to use Rajaongkir-Komerce:

  1. Step-by-step method. This was the old method before Komerce acquired Rajaongkir and changed the API.
  2. Direct Search. This is the latest method used by Komerce after they acquired Rajaongkir.

For existing users whose data is still using the old method, you can continue using method 1.

This package supports 2 ways to access RajaOngkir data:

  1. Step-by-step location lookup (province -> city -> district -> subdistrict)
  2. Direct search and shipping cost lookup (search by keyword, then calculate cost)

You can call the API through the facade or Laravel's service container:

API methods return a RajaOngkirResponse object with meta, data, status(), and successful(). Use getListCourier() when you need the static courier list (hardcoded from Komerce documentation — no API endpoint).

RajaOngkir is registered as a singleton in the service container, so the facade and app() resolve the same instance.

Error handling

Failed HTTP requests and API error responses throw BlissJaspis\RajaOngkir\Exceptions\RajaOngkirException:

Choosing Between Methods

Use Method 1 (Step-by-step) if:

Use Method 2 (Direct Search) if:

Method 2 is recommended for new implementations as it provides a more modern and user-friendly approach.

Method 1: Step-by-Step Location Lookup

Use this method when users select addresses hierarchically.

1. Finding Provinces

2. Finding Cities

3. Finding Districts

4. Finding Subdistricts

Method 2: Direct Search and Cost Lookup

Use this method when users type destination keywords directly, then you calculate shipping.

1. Searching Domestic Destinations

2. Searching International Destinations

3. Calculating Domestic Shipping Cost

4. Calculating International Shipping Cost

5. Tracking Waybill

Other Useful Methods

getListCourier() returns a static list of supported courier codes and display names (not an API call):

API Reference

For comprehensive API documentation including:

Please see API-REFERENCE.md for detailed technical documentation optimized for developers and AI assistants.

Testing & Quality

This package uses GitHub Actions for continuous integration: lint runs once, then tests run across PHP 8.2–8.5 and Laravel 11–13.

Command Description
composer test Run PHPUnit tests
composer lint Syntax check, Pint (dry-run), and PHPStan (level 6)
composer analyse Run PHPStan static analysis only
composer format Auto-format code with Laravel Pint
composer check Run lint + test (recommended before PRs)

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

For contribution guidelines and local development setup, see CONTRIBUTING.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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


All versions of laravel-rajaongkir-komerce with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
guzzlehttp/guzzle Version ^7.9
illuminate/console Version ^11.0 || ^12.0 || ^13.0
illuminate/http Version ^11.0 || ^12.0 || ^13.0
illuminate/support Version ^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 blissjaspis/laravel-rajaongkir-komerce contains the following files

Loading the files please wait ...