From 495c458483358700f660dc62aadbeb629a736474 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 21 Aug 2019 11:13:42 +0800 Subject: [PATCH] 1 --- third_party/phpcommon | 2 +- webapp/controller/PayController.class.php | 19 +++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/third_party/phpcommon b/third_party/phpcommon index 32c79e2..7a96316 160000 --- a/third_party/phpcommon +++ b/third_party/phpcommon @@ -1 +1 @@ -Subproject commit 32c79e29db8b7086ceb3f44de69cd2398c51e16f +Subproject commit 7a9631684fdb8672d80a94dfbe9745bea2b8a556 diff --git a/webapp/controller/PayController.class.php b/webapp/controller/PayController.class.php index cd57aab..b2f82d9 100644 --- a/webapp/controller/PayController.class.php +++ b/webapp/controller/PayController.class.php @@ -219,26 +219,24 @@ class PayController { 'RandomStr' => $orderid, 'ChannelNo' => '', 'MerchantInfo' => array( - 'MerName' => '', - 'ShortName' => '', - 'ContactName' => '', - 'Business' => '', + 'MerName' => '上海画石网络科技有限公司', + 'ShortName' => '画石网络', + 'Business' => '203', + 'SubAppID' => 'wx7d6509053659d9ed' ) ); $params['SignInfo'] = $this->_reaEncode( - 'AdviceUrl=' . $advice_url . '&' . - 'Amount=' . $params['Amount'] . '&' . - 'MerchantNo=' . $params['MerchantNo'] . '&' . - 'MerchantOrderNo=' . $params['MerchantOrderNo'] . '&' . + '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(self::SCAN_PAY_API_URL, + if (phpcommon\HttpClient::post('https://gwapi.yemadai.com/scanpay/merchantIn', 'requestDomain='. urlencode($requestDomain), $response) ) { @@ -248,7 +246,8 @@ class PayController { )); die();*/ } - var_dump($response); + echo $response; + var_dump(base64_decode($response)); } public function merchantInQuery()