PHPackages                             sadi01/yii2-post-ecommerce - 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. [Framework](/categories/framework)
4. /
5. sadi01/yii2-post-ecommerce

ActiveYii2-extension[Framework](/categories/framework)

sadi01/yii2-post-ecommerce
==========================

Electronic Commerce Service of National Iranian Post Company For Yii2 Framework

v2.0.1(3y ago)01301BSD-3-ClausePHP

Since Jun 8Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Sadi01/yii2-post-ecommerce)[ Packagist](https://packagist.org/packages/sadi01/yii2-post-ecommerce)[ Docs](https://github.com/Sadi01/yii2-post-ecommerce)[ RSS](/packages/sadi01-yii2-post-ecommerce/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (12)Used By (0)

 [ ![](https://raw.githubusercontent.com/Sadi01/yii2-post-ecommerce/master/src/img/post.png) ](https://ecommerce.post.ir/)

Electronic Commerce Service of National Iranian Post Company for Yii 2
======================================================================

[](#electronic-commerce-service-of-national-iranian-post-company-for-yii-2)

This extension provides the [Post E-Commerce Service](https://ecommerce.post.ir/) integration for the [Yii framework 2.0](http://www.yiiframework.com).

For license information check the [LICENSE](LICENSE.md)-file.

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/):

```
composer require --prefer-dist sadi01/yii2-post-ecommerce:"*"

```

Configuration
-------------

[](#configuration)

To use this extension, you have to configure the PostService class in your application configuration:

```
return [
    //....
    'components' => [
        'PostEcommerce' => [
            'class' => 'sadi01\postecommerce\components\PostService',
            'username' => 'your username',
            'password' => 'your password',
            'secretKey' => 'your secretKey',
        ],
    ]
];
```

To use this extension by Rest Api version, you have to configure the PostService class in your application configuration as below:

```
return [
    //....
    'components' => [
        'PostEcommerce' => [
            'class' => 'sadi01\postecommerce\components\PostServiceRest',
            'oauth_client' => 'Your oauth2 client ID',
            'oauth_user' => 123 // User ID
        ],
    ]
];
```

How To Use
----------

[](#how-to-use)

Create shop:

```
use sadi01\postecommerce\components\PostService;
use sadi01\postecommerce\components\Shop;

$shop = new Shop([
'city_id' => 752,
'username' => 'test',
'name' => 'test',
'phone' => '0213410002',
'mobile' => '09379373737',
'email' => 'test@test.test',
'postal_code' => '7612458965',
'website_url' => 'https://test.test',
'manager_name' => 'test',
'manager_family' => 'test',
'manager_birth_date' => '1368/01/01',
'manager_national_id' => '2982561020',
'manager_national_id_serial' => '12G526713',
'start_date' => '1401/03/16',
'end_date' => '1402/03/16',
'need_to_collect' => 1,
]);

/** @var $postService PostService */
$postService = Yii::$app->PostEcommerce;
$postService->createShop($shop);
```

Create barcode:

```
use sadi01\postecommerce\components\PostService;
use sadi01\postecommerce\components\Shop;

$price = new Price([
    'shop_id' => 565656,
    'weight' => 1000,
    'service_type' => 1,
    'destination_city_id' => 1,
    'value' => 2000000,
    'payment_type' => 88,
    'non_standard_package' => 0,
    'sms_service' => 0,
]);
$packet = new Packet([
    'price' => $price,
    'order_id' => '1234',
    'customer_nid' => '1233456789',
    'customer_name' => 'test',
    'customer_family' => 'test',
    'customer_mobile' => '09379373737',
    'customer_email' => 'test@test.test',
    'customer_postal_code' => '7894561230',
    'customer_address' => 'test',
    'content' => 'test',
]);

/** @var $postService PostService */
$postService = Yii::$app->PostEcommerce;
$postService->createPacket($packet);
```

Tracking barcode:

```
use sadi01\postecommerce\components\PostService;

/** @var $postService PostService */
$postService = Yii::$app->PostEcommerce;
$postService->barcodeInfo("683690107800039750895121");
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity54

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 ~17 days

Total

11

Last Release

1266d ago

Major Versions

v1.0.9 → v2.0.02022-11-22

### Community

Maintainers

![](https://www.gravatar.com/avatar/0bba5660903294a7550aa697b888fd0810c2493097c079170f98a5f18cc1aada?d=identicon)[Sadi01](/maintainers/Sadi01)

---

Top Contributors

[![Sadi01](https://avatars.githubusercontent.com/u/8774917?v=4)](https://github.com/Sadi01 "Sadi01 (23 commits)")

---

Tags

frameworkyii2Post Ecommerce Service

### Embed Badge

![Health badge](/badges/sadi01-yii2-post-ecommerce/health.svg)

```
[![Health](https://phpackages.com/badges/sadi01-yii2-post-ecommerce/health.svg)](https://phpackages.com/packages/sadi01-yii2-post-ecommerce)
```

###  Alternatives

[skeeks/cms

SkeekS CMS — control panel and tools based on php framework Yii2

13825.6k47](/packages/skeeks-cms)[tecnocen/yii2-formgenerator

Yii 2 Library to configure form generator

145.7k](/packages/tecnocen-yii2-formgenerator)

PHPackages © 2026

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