stanley-king vor 9 Jahren
Ursprung
Commit
91bd5ecb02
1 geänderte Dateien mit 7 neuen und 2 gelöschten Zeilen
  1. 7 2
      mobile/wxnotify.php

+ 7 - 2
mobile/wxnotify.php

@@ -62,16 +62,20 @@ try
         $out_trade_no = $result['out_trade_no'];
         $transaction_id=$result['transaction_id'];
         wxLog::DEBUG("out_trade_no=".$out_trade_no . " and transaction_id = " . $transaction_id);
+        Log::record("out_trade_no={$out_trade_no} and transaction_id = {$transaction_id}",Log::DEBUG);
 
-        $cb_info = app_payControl::update_order($out_trade_no,$transaction_id,'wxpay');
         if($cb_info['state'] == false) {
-            wxLog::ERROR('wxpay error.');
+            wxLog::ERROR('wxpay error 1.');
+            Log::record('wxpay error.',Log::DEBUG);
         } else {
             wxLog::DEBUG('wxpay success.');
+            Log::record('wxpay success.',Log::DEBUG);
+            $cb_info = app_payControl::update_order($out_trade_no,$transaction_id,'wxpay');
         }
         $ret_wx['return_code'] = 'SUCCESS';
         $ret_wx['return_msg'] = 'OK';
     } else {
+        Log::record('wxpay error 2.',Log::DEBUG);
         $ret_wx['return_code'] = 'FAIL';
         $ret_wx['return_msg'] = 'Error.';
     }
@@ -81,6 +85,7 @@ try
     $xml = $retoper->ToXml();
 
     wxLog::DEBUG($xml);
+    Log::record("return to wx= {$xml}",Log::DEBUG);
 
     echo($xml);
 } catch (WxPayException $e){