onlineidentity/laravel-channable 问题修复 & 功能扩展

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

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

onlineidentity/laravel-channable

最新稳定版本:v1.0.3

Composer 安装命令:

composer require onlineidentity/laravel-channable

包简介

Laravel wrapper for OnlineIdentity Channable API connector

README 文档

README

About

This package creates a wrapper around onlineidentity/channable for ease of use in the Laravel framework.

Installation

composer require onlineidentity/laravel-channable

(Optional) Publish the config file with php artisan vendor:publish --tag=channable

Set your .env variables

CHANNABLE_API_TOKEN='{API_TOKEN}'
CHANNABLE_COMPANY_ID={COMPANY_ID}
CHANNABLE_PROJECT_ID={PROJECT_ID} #default, swappable after initialization

Usage

#Examples

# app()->make();

$channable = app()->make('channable');

//Get all orders
$channable->orders()->allOrders();

$order_id = 12345678;
$channable->orders()->shipment($order_id, [
    'tracking_code' => '3S1234567890',
    'transporter' => 'POSTNL',
    'order_item_ids' => [
        1,
        2
    ]
]);

//Get all returns with queryParameters
$channable->returns()->allReturns(['limit' => 2, 'last_modified_after' => '2022-01-01']);

//update returns status
$return_id = 12345678;
$status_accepted = \OnlineIdentity\Enums\ReturnsType::ACCEPTED;
$channable->returns()->updateReturnStatus($return_id, $status_accepted);

# Using the facade

//get all orders
$orders = \OnlineIdentity\LaravelChannable\Facades\Channable::orders()->allOrders();

//change project id
\OnlineIdentity\LaravelChannable\Facades\Channable::setProjectId(123456);

\OnlineIdentity\LaravelChannable\Facades\Channable::orders()->shipment($order_id, [
    'tracking_code' => '3S1234567890',
    'transporter' => 'POSTNL',
    'order_item_ids' => [
        1,
        2
    ]);

For more details and options visit the offical channable docs https://api.channable.com/v1/docs

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-03-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固