承接 service-direct/php-partners-sdk 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

service-direct/php-partners-sdk

Composer 安装命令:

composer require service-direct/php-partners-sdk

包简介

A simple PHP library to integrate with Service Direct's Partners API

README 文档

README

Overview:

The purpose of this SDK it to ease the integration process for our affiliates who use PHP.

See full documentation for our APIs here:

Install this library using Composer:

composer require service-direct/php-partners-sdk

Response Codes

The API responds with different HTTP status codes to better rely the result of a call. These response codes include 200, 400, 404, etc. If your system is senstive to different response codes, the suppress_response_codes variable can be added to every response URL (e.g. /partners/request?suppress_response_codes) to always return a 200 HTTP status code.

The intended HTTP status code will be returned in the x-original-status-code header.

Endpoints

The SDK integrates with the following API Phone endpoints:

  • POST /partners/request - request a phone bid
  • POST /partners/request/{request_id}/accept - accept a phone bid
    • This API endpoint should only be requested if the phone number is intended to be called.
  • POST /partners/request/{request_id}/sold_price - report the sold price a different buyer (other than Service Direct) paid

As well as the following dynamically changing open endpoint to get Service Direct's latest supported Service Categories:

Examples

The SDK includes 3 example files to help facilitate your integration. In the example file, replace the placeholder value with your private Key to start testing.

use ServiceDirect\Partners\PartnersClient;

$key = '[YOUR_KEY_HERE]';

$client = new PartnersClient($key);
  • Contact Service Direct in order to obtain your Private Key.
  • This string must be kept hidden and treated like any other private credentials or passwords.
  • Your Key is required in the Phones endpoints
  • In all the example files, the optional value of test_mode is set to true

Phones

Using this SDK, a Publisher Partner who generates phone calls and wants to sell those leads to Service Direct can request a bid from Service Direct’s clients by submitting a request with a service category and zip code to POST /partners/request.

See [1] examples/request-bid.php

Then, if our client's bid is satisfactory, the Partner can accept the bid and receive a forwarding tracking phone number to route the caller to the winning client by sending a request to POST /partners/request/{request_id}/accept.

See [2] examples/request-accept.php

If, however, a different buy (other than Service Direct) won your lead, you can notify Service Direct of the sold price by sending a request to POST /partners/request/{request_id}/sold_price. This process helps us better understand the market value of your leads and adjust our bids accordingly.

See [3] examples/request-sold-price.php

General

Publisher Partners can use our supporting endpoint to determine their best integration options:

The response will be in the following format:

{
  "data": {
    "service_categories": [
      {
        "id":"20",
        "industry_master_id":"4",
        "name":"Plumbing"
      },
      {
        "id":"2",
        "industry_master_id":"1",
        "name":"Air Conditioning"
      },
      ...
    ],
    "master_service_categories": [
      /* not for the purpose of this SDK */
      ...
    ]
  }
}

For further assistance please contact support@servicedirect.com

service-direct/php-partners-sdk 适用场景与选型建议

service-direct/php-partners-sdk 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 312 次下载、GitHub Stars 达 5, 最近一次更新时间为 2020 年 06 月 02 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

围绕 service-direct/php-partners-sdk 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

  • Stars: 5
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-06-02