billbee/foreign-systems-sdk 问题修复 & 功能扩展

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

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

billbee/foreign-systems-sdk

最新稳定版本:v1.0.0-beta

Composer 安装命令:

composer require billbee/foreign-systems-sdk

包简介

The SDK for connecting foreign systems to Billbee

README 文档

README

This is the PHP SDK for the upcoming Billbee Foreign Systems API.

The Foreign Systems API will supersede the Custom Shop API since it is more flexible and provides a better developer experience.

Differences to the Custom Shop API

The Custom Shop API supports, as the name says, only webshops and marketplaces. The Foreign Systems API is designed to support other systems as well. At the moment only web shops and marketplaces are supported, but we will support shipping systems, payment systems and other systems in the future.

To achieve this, we moved a bit of logic from our side to the implementors side. The first API call we make is a provisioning call. This call is used to query all supported features on your end plus configuration details such as authorization method and HTTP Headers.

Your system need to post the ProvisioningDetails to the URL given in the call we made.

The further communication is quite similar to the old Custom Shop API.

Installation

composer require billbee/foreign-systems-sdk

Usage

This is the simplest implementation:

<?php

declare(strict_types=1);

require_once __DIR__ . '/../vendor/autoload.php';

use Billbee\ForeignSystemsSdk\Channel\Http\OrderRequestHandler;
use Billbee\ForeignSystemsSdk\Channel\Http\ProductRequestHandler;
use Billbee\ForeignSystemsSdk\Http\Abstraction\Request;
use Billbee\ForeignSystemsSdk\Http\RequestHandlerPool;
use Billbee\ForeignSystemsSdk\Provisioning\Http\ProvisioningRequestHandler;

$request = Request::createFromGlobals();

$pool = new RequestHandlerPool();
$pool->addHandler(new ProvisioningRequestHandler(new YourProvisioningDetailsRepository()));
$pool->addHandler(new OrderRequestHandler(new YourOrderRepository()));

$response = $pool->handle($request);

$response->send();

Since the documentation is not finalized yet, you can head to the old documentation as the concepts are quite similar: https://github.com/billbeeio/custom-shop-php-sdk/blob/master/docs/index.md

Also, if you need some guidance in migrating from the Custom Shop SDK to the Foreign Systems SDK we provide a migration guide which is currently only available in german: https://github.com/billbeeio/foreign-systems-sdk-php/blob/main/MIGRATION_GUIDE.md

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-07-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固