Download the PHP package atlasflow/order-bridge without Composer

On this page you can find all versions of the php package atlasflow/order-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 order-bridge

Atlas Core Order Bridge

A framework-agnostic PHP package for serialising, validating, and transporting orders between Atlas Core and host applications (ePOS, E-commerce, etc.) according to the Order Bridge API Specification v1.4.2.

Core Concepts

The package owns two things exclusively:

  1. Serialisation: Converting host application data into spec-compliant JSON payloads.
  2. Validation: Enforcing all schema and arithmetic rules defined in the specification.

It is designed to be unopinionated about persistence. It does not include Eloquent models, migrations, or database logic. Instead, it defines a set of Interfaces that your application's models must implement.

Key Components


Installation

Note: Requires PHP 8.4+ and the bcmath extension.


Usage Instructions

1. Implement the Interfaces

The package never touches your models directly. You must create "Adapters" that wrap your models and implement the interfaces in Atlasflow\OrderBridge\Contracts.

2. Serialise and Send

The OrderSerialiser computes all totals for you. You only provide raw values (quantities, unit prices, discount percentages, and VAT rates).

3. Validate a Payload

You can use the validator independently to dry-run a batch or validate inbound webhooks.

4. Parse Inbound Payloads

When receiving an export from Atlas Core, use the InboundParser to get typed DTOs.


Idempotency

The package automatically generates a transfer_id (UUID v4) during serialisation. Atlas Core uses this ID combined with your site_id to prevent duplicate order processing.

If you need to retry a failed transport attempt:

  1. Identical Retries: Reuse the same payload (and thus the same transfer_id). Core will acknowledge the retry without creating duplicate records.
  2. Modified Payloads: If the content changes, you must generate a new transfer_id by re-serialising the order.

Laravel Integration

The package ships with a first-class Laravel service provider that handles configuration publishing and wires everything up automatically.

Auto-discovery

Laravel 5.5+ will auto-discover the service provider. No manual registration is needed.

Publish the configuration file

This copies config/order-bridge.php into your application's config/ directory.

Configuration reference

Key Default Description
tolerance '0.0001' Arithmetic tolerance for §5.3 validation checks.
monetary_scale 4 Decimal places for all monetary output fields.
discount_scale 6 Decimal places for discount percentage strings.
vat_rounding_scale 2 Decimal places to which VAT amounts are rounded before output. Set to 4 to disable the extra rounding step.
vat_rounding_mode 'ceil' Rounding direction for VAT amounts. 'ceil' rounds toward positive infinity (always up for positive values); 'floor' rounds toward negative infinity.

Manual registration (without auto-discovery)

Add the provider to config/app.php:

Framework-agnostic usage

Outside of Laravel the package works out of the box with sensible defaults. If you need to override the defaults at runtime, call SchemaVersion::configure() early in your bootstrap:


License

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


All versions of order-bridge with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
ext-bcmath Version *
psr/http-client Version ^1.0
psr/http-factory Version ^1.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 atlasflow/order-bridge contains the following files

Loading the files please wait ...