企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
<h2 style="box-sizing: inherit; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; text-size-adjust: none; font-family: &quot;Helvetica Neue&quot;, NotoSansHans-Regular, AvenirNext-Regular, arial, &quot;Hiragino Sans GB&quot;, &quot;Microsoft Yahei&quot;, &quot;WenQuanYi Micro Hei&quot;, Arial, Helvetica, sans-serif; padding: 0px 0px 0.3em; font-weight: 400; line-height: 1.225; margin: 0px 0px 14px; font-size: 1.3em; border-bottom: 1px solid rgb(238, 238, 238); color: rgb(82, 82, 82); white-space: normal; background-color: rgb(255, 255, 255);"> Api接口二次开发 </h2> <p style="box-sizing: inherit; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; text-size-adjust: none; line-height: 2; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(82, 82, 82); font-family: &quot;Helvetica Neue&quot;, NotoSansHans-Regular, AvenirNext-Regular, arial, &quot;Hiragino Sans GB&quot;, &quot;Microsoft Yahei&quot;, &quot;WenQuanYi Micro Hei&quot;, serif; font-size: 15px; white-space: normal; background-color: rgb(255, 255, 255);"> 系统已经完整封装Api接口 支持多通道 此API扩展无需改动即可快速整合<br/>Api类文件路径 </p> <pre style="box-sizing: inherit; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; text-size-adjust: none; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 15px; line-height: 1.45; margin-top: 14px; margin-bottom: 14px; padding: 16px; background-color: rgb(247, 247, 247); border: 0px; border-radius: 3px; overflow: auto; color: rgb(82, 82, 82);">App/Pays/Controller/GatewayController.class.php 入口文件 App/Pays/Controller/GatewayBaseController.class.php 核心验证文件</pre> <p style="box-sizing: inherit; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; text-size-adjust: none; line-height: 2; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(82, 82, 82); font-family: &quot;Helvetica Neue&quot;, NotoSansHans-Regular, AvenirNext-Regular, arial, &quot;Hiragino Sans GB&quot;, &quot;Microsoft Yahei&quot;, &quot;WenQuanYi Micro Hei&quot;, serif; font-size: 15px; white-space: normal; background-color: rgb(255, 255, 255);"> 接口规则参考Api帮助文档(<a href="https://www.kancloud.cn/dianfu/pay_doc/591789" target="_blank" style="box-sizing: inherit; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; text-size-adjust: none; background-color: transparent; color: rgb(65, 131, 196); text-decoration-line: none;">https://www.kancloud.cn/yqpay168/a1234/818792</a>) </p> <p style="box-sizing: inherit; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; text-size-adjust: none; line-height: 2; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(82, 82, 82); font-family: &quot;Helvetica Neue&quot;, NotoSansHans-Regular, AvenirNext-Regular, arial, &quot;Hiragino Sans GB&quot;, &quot;Microsoft Yahei&quot;, &quot;WenQuanYi Micro Hei&quot;, serif; font-size: 15px; white-space: normal; background-color: rgb(255, 255, 255);"> 二次开发规则请按照API帮助文档返回字段统一要求 </p> <p style="box-sizing: inherit; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; text-size-adjust: none; line-height: 2; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(82, 82, 82); font-family: &quot;Helvetica Neue&quot;, NotoSansHans-Regular, AvenirNext-Regular, arial, &quot;Hiragino Sans GB&quot;, &quot;Microsoft Yahei&quot;, &quot;WenQuanYi Micro Hei&quot;, serif; font-size: 15px; white-space: normal; background-color: rgb(255, 255, 255);"> 对应通道mothod方法 api_$mothod 所有经Api的前缀统一已api_开头 </p> <p style="box-sizing: inherit; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; text-size-adjust: none; line-height: 2; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(82, 82, 82); font-family: &quot;Helvetica Neue&quot;, NotoSansHans-Regular, AvenirNext-Regular, arial, &quot;Hiragino Sans GB&quot;, &quot;Microsoft Yahei&quot;, &quot;WenQuanYi Micro Hei&quot;, serif; font-size: 15px; white-space: normal; background-color: rgb(255, 255, 255);"> 异步回调注意<br/>系统默认按照通道方规则处理当前系统Api对外异步通知 </p> <p style="box-sizing: inherit; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; text-size-adjust: none; line-height: 2; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(82, 82, 82); font-family: &quot;Helvetica Neue&quot;, NotoSansHans-Regular, AvenirNext-Regular, arial, &quot;Hiragino Sans GB&quot;, &quot;Microsoft Yahei&quot;, &quot;WenQuanYi Micro Hei&quot;, serif; font-size: 15px; white-space: normal; background-color: rgb(255, 255, 255);"> 每个通道异步方法处理完 附加上Api异步通知 </p> <pre style="box-sizing: inherit; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; text-size-adjust: none; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 15px; line-height: 1.45; margin-top: 14px; margin-bottom: 0px; padding: 16px; background-color: rgb(247, 247, 247); border: 0px; border-radius: 3px; overflow: auto; color: rgb(82, 82, 82);"> 这里先处理当前订单结果存至数据库 订单状态: 1成功订单 0未支付/待支付 2退款 切记:不要直接返回成功状态给通道方异步接口 先附加上下面Api接口后再返回成功状态 .... if(IsApiOrder($out_trade_no)){ //Api接口请求的订单号统一已大小A开头 所以这里判断异步过来的订单是否是Api的订单,如果是返回true send_notify($out_trade_no,&#39;SUCCESS&#39;);// 向平台下级渠道发送当前订单异步通知 参数:订单号 成功返回字段 失败返回字段 }else { die(&#39;SUCCESS&#39;);//当前通道异步结果 }</pre> <p> <br/> </p>