<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>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                ### Native 掃碼支付(主掃) API * * * 掃碼請求步驟: 1. 構建請求參數 2. POST 參數到請求地址 3. 根據返回內容展示二維碼 4. 用戶支付成功后接收異步通知 * * * 請求地址:[https://mch.xiaoweijufu.com/wxpay/native](https://mch.xiaoweijufu.com/wxpay/native) 請求參數: | 字段名稱 | 字段類型 | 必填參數 | 說明 | | --- | --- | --- | --- | | mchid | string(16) | Y | 商戶號 | | total\_fee | int(16) | Y | 金額。單位:分 | | out\_trade\_no | string(32) | Y | 用戶端自主生成的訂單號 | | product\_id | int(16) | Y | 購買商品編號 | | body | string(128) | N | 訂單內容 | | title | string(32) | N | 訂單標題,非必填 | | attach | string(127) | N | 用戶自定義數據,在notify的時候會原樣返回 | | notify\_url | string(255) | N | 接收微信支付異步通知的回調地址。必須為可直接訪問的URL,不能帶參數、session驗證、csrf驗證。留空則不通知 | | access\_key | string(32) | Y | 用戶對應access\_key | | sign | string(32) | Y | 數據簽名 詳見[簽名算法](http://help.xiaoweijufu.com/1368912) | 請求返回: | 字段名稱 | 字段類型 | 必填參數 | 說明 | | --- | --- | --- | --- | | order\_no | string(16) | Y | 小微聚付 平臺訂單號 | | out\_trade\_no | string(16) | Y | 用戶生成的訂單號原樣返回 | | qrcode | string(128) | Y | 二維碼圖片地址 | | code\_url | string(64) | Y | 可將該參數生成二維碼展示出來進行掃碼支付 | * * * 掃碼支付演示代碼: ~~~ <?php class PayapiHelper { private $url = 'https://mch.xiaoweijufu.com/wxpay/native'; private $access_key = 'xxxxxx'; // 填寫通信Key private $secret_key = 'xxxxxx'; // 填寫通信secret public function __construct($data=null) { $this->data = $data; } public function pay(){ $data = $this->data; $data['access_key'] = $this->access_key; $data['sign'] = $this->sign($data); return $this->post($data, $this->url); } public function post($data, $url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); $rst = curl_exec($ch); curl_close($ch); return $rst; } // 簽名方法 private function sign(array $attributes) { ksort($attributes); $sign = strtoupper(md5(urldecode(http_build_query($attributes)).'&key='.$this->secret_key)); return $sign; } } $order = [ 'mchid' => 'xxxxx', //商戶號 'total_fee' => 120, 'title' => 'test', // 訂單標題 'body' => 'test', // 訂單說明 'product_id' => '1234567890', 'out_trade_no' => time(), // 訂單號 ]; $payapi = new PayapiHelper($order); $rst = $payapi->pay(); print_r($rst); ?> ~~~
                  <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>

                              哎呀哎呀视频在线观看