na0260/pathao-api-laravel-package
Composer 安装命令:
composer require na0260/pathao-api-laravel-package
包简介
A Laravel 8–12 compatible Pathao Courier API integration package with token caching and full feature support.
README 文档
README
This package provides a complete Laravel integration with the Pathao Courier Merchant API. You can manage stores, orders, bulk orders, price calculation, and fetch cities, zones, and areas.
Installation
Install via Composer:
composer require na0260/pathao-api-laravel-package
Configuration
Publish the config file (optional):
php artisan vendor:publish --provider="Nur\Pathao\PathaoServiceProvider" --tag="config"
Add credentials in .env:
PATHAO_CLIENT_ID=your_client_id
PATHAO_CLIENT_SECRET=your_client_secret
PATHAO_USERNAME=your_email
PATHAO_PASSWORD=your_password
PATHAO_SANDBOX=false (if you want to use sandbox use true, otherwise false)
Usage
All calls can be made via the Pathao facade.
Cities, Zones, Areas
$cities = Pathao::cities(); $zones = Pathao::zones($cityId); $areas = Pathao::areas($zoneId);
Stores
Create Store
$store = Pathao::createStore([ 'name' => 'Test Store', 'contact_name' => 'John Doe', 'contact_number' => '017XXXXXXXX', 'address' => 'House 123, Road 4, Dhaka', 'city_id' => {{city_id}}, 'zone_id' => {{zone_id}}, 'area_id' => {{area_id}}, ]);
Store Info
$stores = Pathao::storeInfo();
Orders
Create Order
$order = Pathao::createOrder([ 'store_id' => {{merchant_store_id}}, 'merchant_order_id' => "{{merchant_order_id}}", 'recipient_name' => 'John Doe', 'recipient_phone' => '017XXXXXXXX', 'recipient_address' => 'House 123, Road 4, Dhaka', 'delivery_type' => {{48 for Normal Delivery, 12 for On Demand Delivery}}, 'item_type' => {{1 for Document, 2 for Parcel}}, 'item_quantity' => {{Quantity of your parcels}}, 'item_weight' => {{Minimum 0.5 KG to Maximum 10 KG}}, 'item_description' => 'Test item', 'amount_to_collect' => {{Recipient Payable Amount. Default should be 0 in case of NON Cash-On-Delivery(COD)The collectible amount from the customer.}}, ]);
Bulk Order
$orders = [$order1, $order2]; $response = Pathao::createBulkOrder($orders);
Order Info
$orderInfo = Pathao::orderInfo($consignmentId);
Price Calculator
$price = Pathao::priceCalculator([ 'store_id' => {{merchant_store_id}}, 'item_type' => {{1 for Document, 2 for Parcel}}, 'delivery_type' => {{48 for Normal Delivery, 12 for On Demand Delivery}}, 'item_weight' => {{Minimum 0.5 KG to Maximum 10 KG}}, 'recipient_city' => {{city_id}}, 'recipient_zone' => {{zone_id}}, ]);
Requirements
- Laravel 8-12
- PHP 8.2+
License
This package is open-sourced software licensed under the MIT license.
na0260/pathao-api-laravel-package 适用场景与选型建议
na0260/pathao-api-laravel-package 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 6 次下载、GitHub Stars 达 1, 最近一次更新时间为 2025 年 10 月 06 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 na0260/pathao-api-laravel-package 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 na0260/pathao-api-laravel-package 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 34
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-10-06