PHPackages                             alsaloul/microtec - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. alsaloul/microtec

ActiveLibrary[API Development](/categories/api)

alsaloul/microtec
=================

A Laravel package for integrating with the Microtec ERP system.

v2.1.1(1y ago)12321MITPHP

Since Aug 26Pushed 1y ago1 watchersCompare

[ Source](https://github.com/al-saloul/microtec-laravel)[ Packagist](https://packagist.org/packages/alsaloul/microtec)[ RSS](/packages/alsaloul-microtec/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (5)Used By (0)

Microtec Laravel Integration Package
====================================

[](#microtec-laravel-integration-package)

This package integrates with the Microtec ERP system for sending invoices, returns, and other order types seamlessly.

Installation
------------

[](#installation)

1. Install via composer:

    ```
    composer require alsaloul/microtec
    ```
2. Publish the configuration file:

    ```
    php artisan vendor:publish --provider="Alsaloul\Microtec\MicrotecServiceProvider"
    ```
3. Set up your `.env` file with the following:

    ```
    MICROTEC_ENABLED=true
    MICROTEC_BASE_URL=https://intmicrotec.neat-url.com:7874
    MICROTEC_CLIENT_ID=your-client-id
    MICROTEC_SECURITY_KEY=your-security-key
    ```

Usage
-----

[](#usage)

### Sending Orders

[](#sending-orders)

To send an order to Microtec, use the `OrderData` class and the `Microtec::sendOrder` method:

```
use Alsaloul\Microtec\OrderData;
use Alsaloul\Microtec\Microtec;

$products = [
    [
        'id' => 122,
        'name' => 'product name',
        'itemPrice' => 100,
        'qty' => 1,
        'totalPrice' => 100,
    ]
];

$orderData = new OrderData(
    1212,
    '2024-08-20T12:12:01.310Z',
    'Mohammed Alsaloul',
    '+967774411357',
    10,
    15,
    125,
    $products
);

$response = Microtec::sendOrder($orderData);
return $response;
```

### Sending Invoice Orders

[](#sending-invoice-orders)

To send multiple invoice orders, use the `InvoiceOrdersData` class and the `Microtec::sendInvoiceOrders` method:

```
use Alsaloul\Microtec\Data\InvoiceOrdersData;
use Alsaloul\Microtec\Microtec;

$ordersData = [
    new InvoiceOrdersData([
        'id' => 1,
        'date' => '2024-08-20T12:12:01.310Z',
        'Mohammed Alsaloul',
        '+967774411357',
        'deliveryPrice' => 20,
        'totalTax' => 5,
        'totalPrice' => 105,
        'totalDiscount' => 10,
        'deliveryDiscount' => 5,
        'isDeliveryTaxable' => true,
        'referenceId' => 'INV12345',
        'products' => [
            [
                'id' => 101,
                'name' => 'Product 1',
                'itemPrice' => 50,
                'qty' => 2,
                'totalPrice' => 100,
            ]
        ]
    ]),
    // Add more InvoiceOrdersData objects as needed
];

$responses = Microtec::sendInvoiceOrders($ordersData);
return $responses;
```

### Sending Return Orders

[](#sending-return-orders)

To send multiple return orders, use the `ReturnOrdersData` class and the `Microtec::sendReturnOrders` method:

```
use Alsaloul\Microtec\Data\ReturnOrdersData;
use Alsaloul\Microtec\Microtec;

$returnOrdersData = [
    new ReturnOrdersData([
        'id' => 2,
        'date' => '2024-08-21T14:15:00.000Z',
        'Mohammed Alsaloul',
        '+967774411357',
        'deliveryPrice' => 10,
        'totalTax' => 2,
        'totalPrice' => 50,
        'totalDiscount' => 5,
        'deliveryDiscount' => 2,
        'isDeliveryTaxable' => false,
        'referenceId' => 'RET67890',
        'sourceIntegrationId' => 'SRC98765',
        'products' => [
            [
                'id' => 102,
                'name' => 'Returned Product',
                'itemPrice' => 25,
                'qty' => 2,
                'totalPrice' => 50,
                'sourceLineId' => 'SL123'
            ]
        ]
    ]),
    // Add more ReturnOrdersData objects as needed
];

$responses = Microtec::sendReturnOrders($returnOrdersData);
return $responses;
```

Notes
-----

[](#notes)

- Make sure your `.env` variables are properly set to ensure successful communication with the Microtec ERP system.
- For additional customization or error handling, refer to the `MicrotecClient` class methods.

Support
-------

[](#support)

For issues or feature requests, please create an issue on the [GitHub repository](https://github.com/al-saloul/microtec).

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance42

Moderate activity, may be stable

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~51 days

Total

4

Last Release

477d ago

Major Versions

1.0.0 → 2.0.02025-01-21

### Community

Maintainers

![](https://www.gravatar.com/avatar/0a2776dd1dd2c91f8bac075de5cd7c2e9fb7f987083d643c4e3373724b27f542?d=identicon)[al-saloul](/maintainers/al-saloul)

---

Top Contributors

[![al-saloul](https://avatars.githubusercontent.com/u/96193006?v=4)](https://github.com/al-saloul "al-saloul (4 commits)")

### Embed Badge

![Health badge](/badges/alsaloul-microtec/health.svg)

```
[![Health](https://phpackages.com/badges/alsaloul-microtec/health.svg)](https://phpackages.com/packages/alsaloul-microtec)
```

###  Alternatives

[skagarwal/google-places-api

Google Places Api

1913.0M8](/packages/skagarwal-google-places-api)[dcblogdev/laravel-microsoft-graph

A Laravel Microsoft Graph API (Office365) package

168285.5k1](/packages/dcblogdev-laravel-microsoft-graph)[vluzrmos/slack-api

Wrapper for Slack.com WEB API.

102589.1k3](/packages/vluzrmos-slack-api)[smodav/mpesa

M-Pesa API implementation

16363.7k1](/packages/smodav-mpesa)[jasara/php-amzn-selling-partner-api

A fluent interface for Amazon's Selling Partner API in PHP

1344.8k1](/packages/jasara-php-amzn-selling-partner-api)[grantholle/powerschool-api

A Laravel package to make interacting with PowerSchool less painful.

1715.6k1](/packages/grantholle-powerschool-api)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
