定制 signalise/php-client 二次开发

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

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

signalise/php-client

最新稳定版本:1.0.1

Composer 安装命令:

composer require signalise/php-client

包简介

Signalise PHP client

README 文档

README

This is a PHP client for interacting with the Signalise API. it can do the follow things

Endpoints

  • /api/v1/connects - Get connect ids from Signalise (stores).
  • /api/v1/connects/{{connectId}}/history - Process order(s) to Signalise.
  • /api/v1/connects/{{connectId}}/history/status - Get information about the last order that has been processed.

Requirements

  • PHP >= 7.4
  • Composer

Installation

Install via composer.

composer require signalise/php-client

Getting started

Get Connects

The get connects endpoint is used to retrieve all the connectIds (stores).

In order to process order(s) to Signalise you need to use a connectId to let Signalise know which store you want to process order(s) to.

    /**
     * @throws ResponseException|GuzzleException
     */
    public function getConnects(
        string $apiUrl,
        string $apiKey
    ): array

Post Order History

The post Order history endpoint is used to process order(s) to Signalise.

It wil either throw an exception or an array with the message that you successfully processed x records

   /**
    * @throws ResponseException|GuzzleException
    */
    public function postOrderHistory(
        string $apiUrl,
        string $apiKey,
        string $serializedData,
        string $connectId
    ): array

in order to successful post an order to Signalise you need to use this format.

{
    "records": [
        {
            "id": 16,
            "total_products": 25,
            "total_costs": 124.6500,
            "valuta": "EUR",
            "tax": 1.15,
            "payment_method": "mollie_methods_ideal",
            "payment_costs": 0.05,
            "shipping_method": "Flat Rate - Fixed",
            "shipping_costs": 5.0000,
            "zip": "1000AA",
            "street": "Dam",
            "house_number": "1",
            "city": "Amsterdam",
            "country": "NL",
            "status": "complete",
            "date": "2021-02-11 18:24:45",
            "tag": ""
        },
        {
            "id": 17,
            "total_products": 1,
            "total_costs": 46.5000,
            "payment_method": "mollie_methods_creditcard",
            "payment_costs": 0.25,
            "shipping_method": "dhl",
            "shipping_costs": 2.5000,
            "valuta": "EUR",
            "tax": 1.15,
            "zip": "BE1000",
            "street": "Brussels Park",
            "house_number": "1",
            "city": "Brussel",
            "country": "BE",
            "status": "processing",
            "date": "2021-02-18 10:31:50",
            "tag": ""
        }
    ]
}

Get History Status

The get history status endpoint will retrieve information about the last processed item.

    /**
     * @throws ResponseException|GuzzleException
     */
    public function getHistoryStatus(
        string $apiUrl,
        string $apiKey,
        string $connectId
    ): array

Support

Signalise PHP Client is made by Ndottens.

If you find a bug or want to submit an improvement, don't hesitate to create a merge request on Gitlab.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-12-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固