PHPackages                             hatemfaysal/oto - 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. hatemfaysal/oto

ActiveLibrary[API Development](/categories/api)

hatemfaysal/oto
===============

package to integrate with oto shipping company api

058PHP

Since Oct 22Pushed 1y ago1 watchersCompare

[ Source](https://github.com/hatem-faysal/tryoto)[ Packagist](https://packagist.org/packages/hatemfaysal/oto)[ RSS](/packages/hatemfaysal-oto/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Oto
===

[](#oto)

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

[](#installation)

You can install the package via [Composer](https://getcomposer.org).

```
composer require hatemfaysal/oto:dev-master
```

Publish your oto config file with

```
php artisan vendor:publish --provider="Hatemfaysal\Oto\OtoServiceProvider" --tag="oto"
```

then change your oto config from config/oto.php file

```
    "refresh_token"        => "", //take it from oto company
    "mode"                => "test",//live
    "currency"            => "SAR" ,
```

Usage
-----

[](#usage)

Create Order
------------

[](#create-order)

```
use Hatemfaysal\Oto\Oto;
    $orderData   = ["orderId"=> "1","pickupLocationCode"=> "code-020","createShipment"=> "true","deliveryOptionId"=> 564,"payment_method"=> "paid","amount"=> 100,
    "amount_due"=> 0,"currency"=> "SAR","customsValue"=>"12","customsCurrency"=>"USD","packageCount"=> 2,"packageWeight"=> 1,"boxWidth"=>10,"boxLength"=> 10,"boxHeight"=> 10,
    "orderDate"=> "19/12/2024 15:45","deliverySlotDate"=> "19/12/2024","deliverySlotTo"=> "12pm","deliverySlotFrom"=> "2:30pm","senderName"=>"Sender Company"];
    $customeData = ["name"=> "عبدالله الغامدي","email"=> "test@test.com","mobile"=> "546607389"];
    $addressData = ["address"=> "6832, Abruq AR Rughamah District, Jeddah 22272 3330, Saudi Arabia","district"=> "Al Hamra","city"=> "Jeddah","country"=> "SA","postcode"=> "12345","lat"=> "40.706333","lng"=> "29.888211","refID"=>"1000012","W3WAddress"=>"alarmed.cards.stuffy"];
    $items       = [ ["productId"=> 112,"name"=> "test product","price"=> 100,"rowTotal"=> 100,"taxAmount"=> 15,"quantity"=> 1,"sku"=> "test-product","image"=> "http://...."] , ["name"=> "test product 2","price"=> 100,"quantity"=> 1,"sku"=> "test-product-2"]];
    $response = Oto::createOrder($orderData ,$customeData ,$addressData ,$items);
```

Check Delivery Fee
------------------

[](#check-delivery-fee)

```
use Hatemfaysal\Oto\Oto;
    $itemDetails = ["height"=> 10,"width"=> 10,"length"=> 10,"weight"=> 10,'originCity' => 'riyadh','destinationCity' => 'Jeddah'];
    $response = Oto::checkDeliveryFee($itemDetails);
```

Create Shipment
---------------

[](#create-shipment)

```
use Hatemfaysal\Oto\Oto;

    $response = Oto::createShipment($orderId, $deliveryOptionId);
```

Get Available Cities
--------------------

[](#get-available-cities)

```
use Hatemfaysal\Oto\Oto;
    $response = Oto::availableCities($limit , $page);
```

Cancel Order
------------

[](#cancel-order)

```
use Hatemfaysal\Oto\Oto;

    $response = Oto::cancelOrder($orderId);
```

get Order status
----------------

[](#get-order-status)

```
use Hatemfaysal\Oto\Oto;

    $response = Oto::orderStatus($orderId);
```

Create return Shipment
----------------------

[](#create-return-shipment)

```
use Hatemfaysal\Oto\Oto;

    $response = Oto::createReturnShipment($orderId);
```

documentaion
------------

[](#documentaion)

-

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity17

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/31fe8a6b16c64f24fca5d23652ec45d2b8fad17d66808d4e2e24f835aaac1510?d=identicon)[hatem-faysal](/maintainers/hatem-faysal)

---

Top Contributors

[![hatem-faysal](https://avatars.githubusercontent.com/u/156623604?v=4)](https://github.com/hatem-faysal "hatem-faysal (16 commits)")

### Embed Badge

![Health badge](/badges/hatemfaysal-oto/health.svg)

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

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