浏览代码

Merge branch 'goods' of 121.43.114.153:/home/git/repositories/shopnc into goods

root 9 年之前
父节点
当前提交
96285f6036

+ 0 - 1
fcgi_run.php

@@ -35,7 +35,6 @@ function run_fcgi()
             if(file_exists($file))
             {
                 if(pays_execute($file)) {
-                    echo("Content-Type: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8; charset=UTF-8\r\n\r\n");
                     include $file;
                 } else {
                     echo("Content-Type: text/html; charset=UTF-8\r\n\r\n");

+ 5 - 2
mobile/alipay_notify_url.php

@@ -15,8 +15,12 @@ $alipayNotify = new AlipayNotify($alipay_config);
 $verify_result = $alipayNotify->verifyReturn();
 Log::record("verify_result={$verify_result}, out_trade_no={$out_trade_no}", Log::DEBUG);
 
-if ($verify_result) {
+echo("Content-Type: text/plain; charset=UTF-8\r\n\r\n");
 
+Log::record("ali post data:{$_POST['original_querystring']}",Log::DEBUG);
+
+if ($verify_result)
+{
     $trade_status = $_POST['trade_status'];
     if ($trade_status === 'TRADE_FINISHED' || $trade_status === 'TRADE_SUCCESS') {
 
@@ -39,7 +43,6 @@ if ($verify_result) {
     } else if ($trade_status == 'WAIT_BUYER_PAY') {
 
     }
-
     echo("success"); // 交易正确时,返回success
 } else {
 

+ 2 - 1
mobile/api/payment/alipay/lib/alipay_rsa.function.php

@@ -44,7 +44,8 @@ function rsaVerify($data, $ali_public_key_path, $sign)  {
     $sign = base64_decode($sign);
     $result = (bool)openssl_verify($data, $sign, $res);
     $err = openssl_error_string();
-    openssl_free_key($res);    
+    Log::record("openssl last error={$err}",Log::DEBUG);
+    openssl_free_key($res);
     return $result;
 }
 

+ 1 - 1
mobile/control/app_pay.php

@@ -97,7 +97,7 @@ class app_payControl extends mobileMemberControl
         $fee = $pay_info['pay_amount'];
 
         if ($payment == 'wxpay') {
-            return $this->uniorder($subject, $pay_sn, 1);
+            return $this->uniorder($subject, $pay_sn, $fee);
         }
         else if ($payment === 'alipay')
         {

+ 3 - 1
mobile/dispatch_notify.php

@@ -6,6 +6,8 @@
  * Time: 上午10:22
  */
 
+echo("Content-Type: text/plain; charset=UTF-8\r\n\r\n");
+
 try
 {
     //tid-订单号,status-1,consign_time-发货时间,logistics_no-快递流水,logistics_company-快递公司
@@ -42,4 +44,4 @@ try
 } catch (WxPayException $e){
     Log::record($e->errorMessage(),Log::ERR);
     echo 'AGAIN';
-}
+}

+ 2 - 0
mobile/wxnotify.php

@@ -47,6 +47,8 @@ if(empty($log)) {
 //<transaction_id><![CDATA[1002150763201512142078937308]]></transaction_id>
 //</xml>';
 
+echo("Content-Type: text/html; charset=UTF-8\r\n\r\n");
+
 try
 {
     $content = $_POST['original_querystring'];//request_helper::content();