quellabs/canvas-shipments-myparcel 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

quellabs/canvas-shipments-myparcel

最新稳定版本:1.0.0

Composer 安装命令:

composer require quellabs/canvas-shipments-myparcel

包简介

MyParcel shipping provider integration for the Canvas PHP framework

README 文档

README

A MyParcel shipping provider for the Canvas framework. Supports both api.myparcel.nl (NL) and api.sendmyparcel.be ( BE).

Installation

composer require quellabs/canvas-shipments-myparcel

Configuration

Publish config/myparcel.php and fill in your credentials:

return [
    'api_key'        => '',
    'api_key_test'   => '',
    'region'         => 'nl',   // 'nl' or 'be'
    'test_mode'      => false,
    'sender_address' => [
        'company'     => 'My Webshop B.V.',
        'person'      => 'Logistics Dept',
        'street'      => 'Keizersgracht',
        'number'      => '123',
        'postal_code' => '1015CJ',
        'city'        => 'Amsterdam',
        'cc'          => 'NL',
        'email'       => 'logistics@example.com',
        'phone'       => '+31201234567',
    ],
];

Important behaviours

Tracking code is not available at creation time. ShipmentResult::$trackingCode is always null after create(). MyParcel assigns the carrier barcode asynchronously. Use the webhook or call exchange() later.

Cancellation is not supported. Calling cancel() always throws ShipmentCancellationException. Parcels must be deleted manually in the MyParcel panel before carrier pickup.

Package type defaults to parcel. Set ShipmentRequest::$packageType to control the MyParcel product type per shipment:

$packageType MyParcel code Description
'parcel' 1 Standard package (default)
'mailbox' 2 Mailbox package
'letter' 3 Letter
'digital_stamp' 4 Unstamped letter

Webhooks carry only the shipment ID. The controller makes one API call per webhook event to fetch the current state. MyParcel does not sign webhook requests — restrict the endpoint by IP or use a secret path.

Delivery options require a recipient address. Pass a ShipmentAddress as the second argument to getShippingOptions(). Without it, an empty array is returned. MyParcel computes available timeframes and pickup points per postal code, so the address is mandatory for meaningful results.

Supported modules

Module Carrier Region
myparcel_postnl PostNL NL
myparcel_cheapcargo CheapCargo NL
myparcel_dhl DHL NL
myparcel_dhlforyou DHL For You NL
myparcel_dpd DPD NL
myparcel_bpost bpost BE

License

MIT

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 5
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固