body = array( 'orderCode' => $order_no, //'totalAmount' => '000000000012', 'totalAmount' => $amout, 'subject' => $body, 'body' => $body, 'payMode' => 'sand_h5', 'clientIp' => get_client_ip(), //'notifyUrl' => 'http://192.168.1.66/sandpay-qr-phpdemo/notifyurl.php', 'notifyUrl' => $notifyurl, //'frontUrl' => 'http://192.168.1.66/sandpay-qr-phpdemo/notifyurl.php', 'frontUrl' => $frontUrl, ); // 返回结果 $ret = $client->request('orderPay'); return $ret; } // 订单查询接口 public function orderQuery() { $client = new \H5FastPay; // 参数, 每次需要重新赋值 $client->body = array( 'orderCode' => date('YmdHis', time()) + '0601', 'extend' => '' ); // 返回结果 $ret = $client->request('orderQuery'); echo '
';
        print_r($ret);
        echo '
'; } // 退款申请 public function orderRefund() { $client = new \H5FastPay; // 参数 $client->body = array( 'orderCode' => 'Y20181204170925675836', //新的订单号 'oriOrderCode' => '2017091551421977', //原订单号 'refundAmount' => '000000000012', //退款金额 'refundMarketAmount' => '000000000012', //退营销金额 'notifyUrl' => 'http://192.168.22.171/sandpay-qr-phpdemo.bak/test/dist/notifyUrl.php', 'refundReason' => 'test', 'extend' => '' ); // 返回结果 $ret = $client->request('orderRefund'); echo '
';
        print_r($ret);
        echo '
'; } // 异步通知通用接口 public function notify() { $client = new H5FastPay; $sign = $_POST['sign']; //签名 $data = stripslashes($_POST['data']); //支付数据 // 验签 try { $verifyFlag = $client->verify($data, $sign); if ($verifyFlag) { echo '签名正确'; } else { echo '签名错误'; } } catch (\Exception $e) { echo $e->getMessage(); } } // 商户自主重发异步通知接口 public function orderMcAutoNotice() { $client = new H5FastPay; // 参数 $client->body = array( 'orderCode' => 'Y201805071725592', 'noticeType' => '00', ); // 返回结果 $ret = $client->request('orderMcAutoNotice'); echo '
';
        print_r($ret);
        echo '
'; } // 对账单申请接口 public function clearfileDownload() { $client = new H5FastPay; // 参数 $client->body = array( 'clearDate' => '20200611', // 结算日期 'fileType' => '1', // 文件返回类型 'extend' => '' ); // 返回值 $ret = $client->request('clearfileDownload'); echo '
';
        print_r($ret);
        echo '
'; } }