智简魔方文档

下游下载插件

方法概览

项目内容
文档类型PHP 类方法
方法标识app\common\logic\UpstreamLogic::upstreamProductDownloadPluginResource
所属业务上下游
来源模块/系统上游管理公共类

功能说明

下游下载插件

调用示例

$id = 1;
$url = 'https://example.com/callback';
$type = 'string';
$sync = true;
$result = (new \app\common\logic\UpstreamLogic())->upstreamProductDownloadPluginResource($id, $url, $type, $sync);

参数

参数类型必填默认值校验规则说明
idintrequired商品ID
urlstringrequired上游地址
typestringrequired供应商类型default默认业务系统whmcs财务系统finance魔方财务
syncbool是否同步方式

返回值

返回项类型说明
statusint状态码,200成功,400失败
msgstring提示信息
data.namestring代理模块名称
data.versionstring代理模块版本

正常返回

{
  "status": 1,
  "msg": "string",
  "data": {
    "name": "示例名称",
    "version": "string"
  }
}

异常情况

异常类型说明
Throwable调用失败时由具体实现抛出异常,异常信息以运行时结果为准。