<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                [TOC] 官方文檔: https://pay.weixin.qq.com/wiki/doc/api/native.php?chapter=9_2 >注:需要“證書”才能進行訂單退款 ## (一)【證書路徑設置】 設置商戶證書路徑: 證書路徑,注意應該填寫絕對路徑(僅退款、撤銷訂單時需要,可登錄商戶平臺下載,API證書下載地址:`https://pay.weixin.qq.com/index.php/account/api_cert`,下載之前需要安裝商戶操作證書) 下載證書地址,如圖: ![mark](http://qiniu.newthink.cc/blog/20170919-232049462.png) ![mark](http://qiniu.newthink.cc/blog/20170919-232419969.png) 我里我們在根目錄下新建一個 `cert` 文件夾,把下載的文件放置到該路徑下: ![mark](http://qiniu.newthink.cc/blog/20170919-233157934.png) ## (二)配置情況如下 ![mark](http://qiniu.newthink.cc/blog/20170919-234042543.png) ## (三)代碼使用 ``` // 微信支付-退款(報錯了,需要證書 public function refund() { wxpayRefund('4200000011201709193042132589','2017091910048541',100,10); } ``` ## (四)退款函數 ``` /** * 訂單退款 * 需要配置中有 * 微信訂單號和商戶訂單號選少填一個,微信訂單號優先 * @param $transaction_id 微信訂單號 * @param $out_trade_no 商戶訂單號 * @param $total_fee 訂單總金額(分) * @param $refund_fee 退款金額(分) */ function wxpayRefund($transaction_id,$out_trade_no,$total_fee,$refund_fee) { //導入 WxPay.Api.php 類 import('WxpayAPI.lib.WxPay',EXTEND_PATH,'.Api.php'); //導入 WxPay.Data.php 類 import('WxpayAPI.lib.WxPay',EXTEND_PATH,'.Data.php'); $input = new WxPayRefund(); $input->SetTransaction_id($transaction_id); $input->SetOut_trade_no($out_trade_no); $input->SetTotal_fee($total_fee); $input->SetRefund_fee($refund_fee); $input->SetOut_refund_no(WxPayConfig::MCHID.date("YmdHis")); $input->SetOp_user_id(WxPayConfig::MCHID); dump(WxPayApi::refund($input)); } ``` ## (五)返回數據 ``` array(18) { ["appid"] => string(18) "wx92dedc49b3405e25" ["cash_fee"] => string(3) "100" ["cash_refund_fee"] => string(2) "10" ["coupon_refund_count"] => string(1) "0" ["coupon_refund_fee"] => string(1) "0" ["mch_id"] => string(10) "1404807102" ["nonce_str"] => string(16) "VrsDVJc3l6NRHf5s" ["out_refund_no"] => string(24) "140480710220170919233847" ["out_trade_no"] => string(16) "2017091910048541" ["refund_channel"] => array(0) { } ["refund_fee"] => string(2) "10" ["refund_id"] => string(29) "50000504262017091901789042036" ["result_code"] => string(7) "SUCCESS" ["return_code"] => string(7) "SUCCESS" ["return_msg"] => string(2) "OK" ["sign"] => string(32) "D185FD4E87F712A34B7B3A6C8754CE38" ["total_fee"] => string(3) "100" ["transaction_id"] => string(28) "4200000011201709193042132589" } ``` ## (六)手機微信退款通知 退款交易通知 ![mark](http://qiniu.newthink.cc/blog/20170919-234313931.png =300x500) 退款交易詳情 ![mark](http://qiniu.newthink.cc/blog/20170919-234321913.png =300x500) ## (七)PC退款通知 退款交易通知 ![mark](http://qiniu.newthink.cc/blog/20170919-234609179.png ) 退款交易詳情 ![mark](http://qiniu.newthink.cc/blog/20170919-235456198.png ) ## (八)手機微信已退款通知 已退款交易通知 ![mark](http://qiniu.newthink.cc/blog/20170920-102919883.png =300x500) 已退款交易詳情 ![mark](http://qiniu.newthink.cc/blog/20170920-102926097.png =300x500) ## (九)官網參考 ![mark](http://qiniu.newthink.cc/blog/20170920-103230981.png)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看