1
This commit is contained in:
parent
17a8188a8a
commit
3223793a59
@ -64,7 +64,7 @@ class PayController {
|
||||
return openssl_sign($str, $sign, $prikey, OPENSSL_ALGO_SHA1) ? base64_encode($sign) : false;
|
||||
}
|
||||
|
||||
public function scanPay()
|
||||
public function aggregatePay()
|
||||
{
|
||||
/*
|
||||
if (!phpcommon\isValidSessionId(
|
||||
@ -114,7 +114,7 @@ class PayController {
|
||||
);
|
||||
$xml_txt = phpcommon\objectToXml($params, '<AggregatePayRequest/>');
|
||||
$xml_txt = str_replace('<?xml version="1.0"?>', '<?xml version="1.0" encoding="utf-8"?>', $xml_txt);
|
||||
echo $xml_txt;
|
||||
# echo $xml_txt;
|
||||
$requestDomain = base64_encode($xml_txt);
|
||||
$response = '';
|
||||
if (phpcommon\HttpClient::post(self::SCAN_PAY_API_URL,
|
||||
@ -127,12 +127,23 @@ class PayController {
|
||||
));
|
||||
die();*/
|
||||
}
|
||||
var_dump(base64_decode($response));
|
||||
error_log(base64_decode($response));
|
||||
$xmlobj = new \SimpleXMLElement(base64_decode($response));
|
||||
var_dump($xmlobj->respCode);
|
||||
if ($xmlobj->respCode == '0000') {
|
||||
if ($xmlobj->RespCode == '0000') {
|
||||
$conn = $this->getMysql($_REQUEST['account_id']);
|
||||
$ret = $conn->execScript();
|
||||
# $ret = $conn->execScript();
|
||||
echo json_encode(array(
|
||||
'errcode' => 0,
|
||||
'errmsg' => '',
|
||||
'pay_str' => $xmlobj->PayStr
|
||||
));
|
||||
die();
|
||||
} else {
|
||||
echo json_encode(array(
|
||||
'errcode' => 1,
|
||||
'errmsg' => '平台错误:' . $xmlobj->RespCode,
|
||||
));
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
@ -193,7 +204,6 @@ class PayController {
|
||||
'SignInfo' => '',
|
||||
'PayType' => 'WXZF_ONLINE',
|
||||
'RandomStr' => $orderid,
|
||||
'PayType' => 'WXZF_ONLINE',
|
||||
);
|
||||
$params['SignInfo'] = $this->_reaEncode(
|
||||
'MerNo=' . $params['MerNo'] . '&' .
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
class PayNotifyController {
|
||||
|
||||
const PUB_KEY = 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCVd+f/YkGDi8s9AKhZvmHCxZ2+sPKIsr+JVS2Uj4pP6qApuNq5lEwtF4c6LzHJbUUxKge/OttiR7pR481tqW3PgeSYjyU6rayx0rSEo8/xqVHnh4XugbJREUVyq/Evp79f0BePO69zC0AdYZSjXOAVG8uduRzHl4RWb7BiDLBL3QIDAQAB';
|
||||
const PUB_KEY = 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC2g2T98rLysZAS1pVv2gE/2DOf9+LkHI9oEFVeKvVZKLHMNzEpZkXK+IXJMHpxlMNLStiwuLxLpnvCQQptGbFohqDsHACademc6/t+YVF2FX4F6GIgBuaPDdJwSGAljtU5P3vsCbJpGPXh6QNyKveBAJKILbXem6pPl+J01CMXyQIDAQAB';
|
||||
|
||||
protected function getMysql($accountid)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user