<h2 style="box-sizing: inherit; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; text-size-adjust: none; font-family: "Helvetica Neue", NotoSansHans-Regular, AvenirNext-Regular, arial, "Hiragino Sans GB", "Microsoft Yahei", "WenQuanYi Micro Hei", 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: "Helvetica Neue", NotoSansHans-Regular, AvenirNext-Regular, arial, "Hiragino Sans GB", "Microsoft Yahei", "WenQuanYi Micro Hei", 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, "Andale Mono", "Ubuntu Mono", 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: "Helvetica Neue", NotoSansHans-Regular, AvenirNext-Regular, arial, "Hiragino Sans GB", "Microsoft Yahei", "WenQuanYi Micro Hei", serif; font-size: 15px; white-space: normal; background-color: rgb(255, 255, 255);">
接口規則參考Api幫助文檔(<a href="http://www.hmoore.net/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;">http://www.hmoore.net/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: "Helvetica Neue", NotoSansHans-Regular, AvenirNext-Regular, arial, "Hiragino Sans GB", "Microsoft Yahei", "WenQuanYi Micro Hei", 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: "Helvetica Neue", NotoSansHans-Regular, AvenirNext-Regular, arial, "Hiragino Sans GB", "Microsoft Yahei", "WenQuanYi Micro Hei", 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: "Helvetica Neue", NotoSansHans-Regular, AvenirNext-Regular, arial, "Hiragino Sans GB", "Microsoft Yahei", "WenQuanYi Micro Hei", 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: "Helvetica Neue", NotoSansHans-Regular, AvenirNext-Regular, arial, "Hiragino Sans GB", "Microsoft Yahei", "WenQuanYi Micro Hei", 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, "Andale Mono", "Ubuntu Mono", 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,'SUCCESS');// 向平臺下級渠道發送當前訂單異步通知 參數:訂單號 成功返回字段 失敗返回字段
}else {
die('SUCCESS');//當前通道異步結果
}</pre>
<p>
<br/>
</p>