Files
epay/plugins/douyinpay/inc/DouyinPayException.php
T
opencode b7613ba082 部署仓库初始化:epay 部署配置、补丁与插件
- docker-compose.prod.yml:挂载 epay-ui.css/js/head.php 补丁到 staging(镜像升级不丢)
- docker/nginx.conf:补丁静态资源 no-cache,改版立即生效
- patches/:
  - test.php 修复 paytype JSON 对象导致测试支付页空白
  - epay-ui.css 后台全屏/侧栏加宽/导航两列布局覆盖
  - epay-ui.js 去除页面容器宽度限制 + 侧栏当前菜单自动滚动
  - head.php 资源 ?v= 版本号强制回源
  - functions.php is_public_url 白名单等既有补丁
- plugins/ 支付插件源码
- .gitignore 排除 .env 等敏感与临时文件
2026-10-21 13:05:20 +08:00

45 lines
961 B
PHP

<?php
namespace DouYinPay;
/**
* 抖音支付响应内容异常
*/
class DouyinPayException extends \Exception
{
private $res = [];
private $errCode;
private $httpCode;
/**
* @param array $res
* @param string $httpCode
*/
public function __construct($res, $httpCode)
{
$this->res = $res;
$this->httpCode = $httpCode;
if(is_array($res)){
$this->errCode = $res['code'];
$message = '['.$res['code'].']'.$res['message'].(isset($res['detail']['issue'])?'('.$res['detail']['issue'].')':'');
}else{
$message = '返回数据解析失败(http_code='.$httpCode.')';
}
parent::__construct($message);
}
public function getResponse(): array
{
return $this->res;
}
public function getErrCode()
{
return $this->errCode;
}
public function getHttpCode(): string
{
return $this->httpCode;
}
}