# PHP抖音开放平台SDK **Repository Path**: Haoyejun/douyin-open-api ## Basic Information - **Project Name**: PHP抖音开放平台SDK - **Description**: 抖音开放平台PHP SDK - **Primary Language**: PHP - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 2 - **Created**: 2025-02-21 - **Last Updated**: 2025-02-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # PHP抖音开放平台SDK #### 介绍 抖音开放平台PHP SDK,目前接入抖音支付相关接口 #### 软件架构 目录结构 pay 担保支付 ------ecpay 支付 #### 安装教程 ``` composer require stlswm/douyin-open-api ``` #### 使用说明 具体用法见单元测试 ****** 注意:运行单元测试需要将tests/config/Config.php.example重命名为Config.php并填写相关参数 * 很多人在问异步通知签名校验怎么用,下面是一个简单的举例 ``` json($responseData);//这里是laravel的写法,返回json } $msgSignature = $inBodyArray['msg_signature']; if ($msgSignature != NotifySign::sign('你的支付token', $inBodyArray)) { //签名校验不通过 $responseData['err_no'] = 400; $responseData['err_tips'] = '签名不匹配'; return response()->json($responseData); } if ($inBodyArray['type'] !== 'payment') { //不是支付通知,其他乱七遭八的通知直接响应成功 $responseData['err_no'] = 0; $responseData['err_tips'] = 'success'; return response()->json($responseData); } //这后面就可以处理你自己的业务了 ``` #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request #### 特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)