This commit is contained in:
aozhiwei 2019-08-21 11:13:42 +08:00
parent a5fe2c79b0
commit 495c458483
2 changed files with 10 additions and 11 deletions

@ -1 +1 @@
Subproject commit 32c79e29db8b7086ceb3f44de69cd2398c51e16f Subproject commit 7a9631684fdb8672d80a94dfbe9745bea2b8a556

View File

@ -219,26 +219,24 @@ class PayController {
'RandomStr' => $orderid, 'RandomStr' => $orderid,
'ChannelNo' => '', 'ChannelNo' => '',
'MerchantInfo' => array( 'MerchantInfo' => array(
'MerName' => '', 'MerName' => '上海画石网络科技有限公司',
'ShortName' => '', 'ShortName' => '画石网络',
'ContactName' => '', 'Business' => '203',
'Business' => '', 'SubAppID' => 'wx7d6509053659d9ed'
) )
); );
$params['SignInfo'] = $this->_reaEncode( $params['SignInfo'] = $this->_reaEncode(
'AdviceUrl=' . $advice_url . '&' . 'MerNo=' . $params['MerNo'] . '&' .
'Amount=' . $params['Amount'] . '&' .
'MerchantNo=' . $params['MerchantNo'] . '&' .
'MerchantOrderNo=' . $params['MerchantOrderNo'] . '&' .
'PayType=' . $params['PayType'] . '&' . 'PayType=' . $params['PayType'] . '&' .
'RandomStr=' . $params['RandomStr'] . 'RandomStr=' . $params['RandomStr'] .
'' ''
); );
$xml_txt = phpcommon\objectToXml($params, '<ScanMerchantInRequest/>'); $xml_txt = phpcommon\objectToXml($params, '<ScanMerchantInRequest/>');
$xml_txt = str_replace('<?xml version="1.0"?>', '<?xml version="1.0" encoding="utf-8"?>', $xml_txt); $xml_txt = str_replace('<?xml version="1.0"?>', '<?xml version="1.0" encoding="utf-8"?>', $xml_txt);
echo $xml_txt;
$requestDomain = base64_encode($xml_txt); $requestDomain = base64_encode($xml_txt);
$response = ''; $response = '';
if (phpcommon\HttpClient::post(self::SCAN_PAY_API_URL, if (phpcommon\HttpClient::post('https://gwapi.yemadai.com/scanpay/merchantIn',
'requestDomain='. urlencode($requestDomain), 'requestDomain='. urlencode($requestDomain),
$response) $response)
) { ) {
@ -248,7 +246,8 @@ class PayController {
)); ));
die();*/ die();*/
} }
var_dump($response); echo $response;
var_dump(base64_decode($response));
} }
public function merchantInQuery() public function merchantInQuery()