定制 jrebs/easyship-laravel 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

jrebs/easyship-laravel

Composer 安装命令:

composer require jrebs/easyship-laravel

包简介

A package to integrate easyship-php into Laravel applications

README 文档

README

License

A PHP supplemental package to the easyship-php package which allows users to quickly and easily integrate the jrebs/easyship-php library into Laravel applications.

Installation

Install with composer.

composer require jrebs/easyship-laravel

Configuration

This support package uses a default configuration that will work for most purposes. The following .env variables are supported:

# Your access token for making calls to the Easyship API
EASYSHIP_API_TOKEN="mytoken"

# The hostname of the Easyship API server (can override for testing)
# Defaults to the official API host https://api.easyship.com
EASYSHIP_API_HOST="http://my-dev-hostname"

# Your secret key for verifying the signature of webhook posts
EASYSHIP_WEBHOOK_SECRET_1="mysecret"

If you want to take control of how configuration is handled, just publish the configuration file from this package into your application and then you can do whatever you like with it, including set up default request options to be passed in to the GuzzleHttp\Client instance.

php artisan vendor:publish --provider=Easyship\\Providers\\EasyshipServiceProvider

Once published, season the config/easyship.php file to taste. One reason you may need to do this is to support incoming webhooks from different Easyship accounts. To this end, versions following v1.0 have a modified configuration that supports any number of webhook secret keys. Modify the webhook_secrets array in the config file to contain each of the keys you will define in your .env file.

Usage

After requiring the package into your application and providing config keys, you should be able to start working with the API by pulling it out of the Laravel service container using any of the usual methods or by using the provided Facade accessor if that is your preference.

// Using the app() helper
// app(\Easyship\EasyshipAPI::class) also works
$api = app('easyship.api');
$categories = $api->categories()->list();

// ...or using the Facade
$categories = Easyship::categories()->list();

Similarly, the webhook handler is available preconfigured from the service container. No facade is provided for this object as it would be of little value.

$handler = app('easyship.handler');
// Can also use app(\Easyship\Webhooks\Handler::class)
$handler->handle($signature, $payload);

Support

If you find problems with this integration package specifically, please raise them as issues on this repository. If you find problems with the underlying easyship-php package (more likely), please go to that project page for support or to file an issue report.

License

This software was written by me, Justin Rebelo, and is released under the MIT license.

jrebs/easyship-laravel 适用场景与选型建议

jrebs/easyship-laravel 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 554 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 04 月 25 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「php」 「api」 「laravel」 「easyship」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 jrebs/easyship-laravel 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 jrebs/easyship-laravel 我们能提供哪些服务?
定制开发 / 二次开发

基于 jrebs/easyship-laravel 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-04-25