From 5202915550a1eb833d8f61641b0927cac25ff536 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 16 Oct 2020 15:09:40 +0800 Subject: [PATCH] 1 --- .../controller/MerchantController.class.php | 99 ------------------- 1 file changed, 99 deletions(-) delete mode 100644 webapp/controller/MerchantController.class.php diff --git a/webapp/controller/MerchantController.class.php b/webapp/controller/MerchantController.class.php deleted file mode 100644 index a4d4dd8..0000000 --- a/webapp/controller/MerchantController.class.php +++ /dev/null @@ -1,99 +0,0 @@ - self::MER_NO, - 'SignInfo' => '', - 'PayType' => 'WXZF_ONLINE', - 'RandomStr' => $orderid, - 'ChannelNo' => '235009412', - 'MerchantInfo' => array( - 'MerName' => '上海画石网络科技有限公司', - 'ShortName' => '画石网络', - 'ServicePhone' => '17891958491', - 'Business' => '203', - 'SubAppID' => 'wx7d6509053659d9ed' - ) - ); - $params['SignInfo'] = $this->_reaEncode( - 'MerNo=' . $params['MerNo'] . '&' . - 'PayType=' . $params['PayType'] . '&' . - 'RandomStr=' . $params['RandomStr'] . - '' - ); - $xml_txt = phpcommon\objectToXml($params, ''); - $xml_txt = str_replace('', '', $xml_txt); - echo $xml_txt; - $requestDomain = base64_encode($xml_txt); - $response = ''; - if (phpcommon\HttpClient::post('https://gwapi.yemadai.com/scanpay/merchantIn', - 'requestDomain='. urlencode($requestDomain), - $response) - ) { - /* echo json_encode(array( - 'errcode' => 101, - 'errmsg' => '交易失败:' . $response, - )); - die();*/ - } - echo $response; - var_dump(base64_decode($response)); - } - - private function merchantInQuery() - { - $orderid = uniqid(); - if (empty($orderid)) { - die(); - } - $params = array( - 'MerNo' => self::MER_NO, - 'CompanyNo' => 'sweep-f4fea613fec043f8bd81e9b70375e364', - 'SignInfo' => '', - 'PayType' => 'WXZF_ONLINE', - 'RandomStr' => $orderid, - ); - $params['SignInfo'] = $this->_reaEncode( - 'MerNo=' . $params['MerNo'] . '&' . - 'CompanyNo=' . $params['CompanyNo'] . '&' . - 'PayType=' . $params['PayType'] . '&' . - 'RandomStr=' . $params['RandomStr'] . - '' - ); - $xml_txt = phpcommon\objectToXml($params, ''); - $xml_txt = str_replace('', '', $xml_txt); - $requestDomain = base64_encode($xml_txt); - $response = ''; - if (phpcommon\HttpClient::post('https://gwapi.yemadai.com/scanpay/merchantInQuery', - 'requestDomain='. urlencode($requestDomain), - $response) - ) { - /* echo json_encode(array( - 'errcode' => 101, - 'errmsg' => '交易失败:' . $response, - )); - die();*/ - } - var_dump(base64_decode($response)); - } - -}