flooris/dpd-shipper-laravel
Composer 安装命令:
composer require flooris/dpd-shipper-laravel
包简介
Laravel package for connecting to DPD Shipper API
README 文档
README
Laravel package for connecting to DPD Shipper API.
Requirements
This package requires Laravel 10.x and PHP 8.1 (or higher).
Flooris
We are a young and driven team of technicians with a mission. We ensure that our clients' online challenges are solved with manageable and sustainable tools. We connect existing and reliable solutions to each other. This allows us to create customized solutions, often in combination with professional (open-source) packages and APIs. We ensure that all online solutions always perform at the highest level. In addition, we provide professional support without hassle through our service portal.
Install the package via composer
composer require flooris/dpd-shipper-laravel
Publish the package config
php artisan vendor:publish --tag=dpd-shipper-config nano config/dpd-shipper.php
Usage example
// Borsigstraße 20-22, 44145 Dortmund, Duitsland // https://goo.gl/maps/FoKHQ4DwEEiY9ift5 $countryIso = 'DE'; $postalCode = '44145'; $parcelCount = 1; $email = 'test-dpd@flooris.nl'; $mobilePhone = '0612345678'; $shipmentProduct = new DpdShipmentProduct($countryIso, $postalCode); $predict = $shipmentProduct->getPredict($countryIso, $email, $mobilePhone); $parcels = new DpdParcels(); $parcels->setCustomerReferenceNumber1('TEST12345'); $parcels->setWeight(1); $recipient = new DpdRecipient( name1: 'John Doe', street: 'Borsigstraße', houseNumber: '20-22', countryIso: 'DE', postalCode: $postalCode, city: 'Dortmund', email: $email ); try { $shipmentLabel = $this->dpdShipperConnector->shipmentService()->createShipment( shipmentProduct: $shipmentProduct, parcelCount: $parcelCount, parcels: $parcels, sender: $this->dpdSender, recipient: $recipient, dpdPredict: $predict ); $mpsId = $shipmentLabel->mpsId; $barcodeCollection = $shipmentLabel->getBarcodes(); $pdfData = $shipmentLabel->fileData; } catch (DpdShipmentResponseException $e) { } catch (\SoapFault $e) { throw $e; }
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
flooris/dpd-shipper-laravel 适用场景与选型建议
flooris/dpd-shipper-laravel 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 59 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 04 月 07 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 flooris/dpd-shipper-laravel 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 flooris/dpd-shipper-laravel 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 59
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 10
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-04-07