소스 검색

debug alipay

stanley-king 9 년 전
부모
커밋
22cdf0e5d0

+ 0 - 1
data/logic/payment.logic.php

@@ -17,7 +17,6 @@ class paymentLogic
      */
     public function getRealOrderInfo($pay_sn, $member_id = null)
     {
-
         //验证订单信息
         $model_order = Model('order');
         $condition = array();

+ 1 - 2
mobile/alipay_notify_url.php

@@ -17,7 +17,7 @@ Log::record("verify_result={$verify_result}, out_trade_no={$out_trade_no}", Log:
 
 echo("Content-Type: text/plain; charset=UTF-8\r\n\r\n");
 
-Log::record("ali post data:{$_POST['original_querystring']}",Log::DEBUG);
+Log::record("ali post data:{$_SERVER['original_querystring']}",Log::DEBUG);
 
 if ($verify_result)
 {
@@ -38,7 +38,6 @@ if ($verify_result)
         if(!$ret){
             Log::record("updateMember fail : out_trade_no={$out_trade_no}",Log::ERR);
         }
-
     } else if ($trade_status == 'WAIT_BUYER_PAY') {
 
     }

+ 3 - 2
mobile/api/payment/alipay/lib/alipay_core.function.php

@@ -14,10 +14,11 @@
  * @param $para 需要拼接的数组
  * return 拼接完成以后的字符串
  */
-function createLinkstring($para) {
+function createLinkstring($para)
+{
 	$arg  = "";
 	while (list ($key, $val) = each ($para)) {
-		$arg.=$key."=".urldecode($val)."&";
+		$arg.= ($key."=".urldecode($val)."&");
 	}
 	//去掉最后一个&字符
 	$arg = substr($arg,0,count($arg)-2);

+ 1 - 1
mobile/wxnotify.php

@@ -51,7 +51,7 @@ echo("Content-Type: text/html; charset=UTF-8\r\n\r\n");
 
 try
 {
-    $content = $_POST['original_querystring'];//request_helper::content();
+    $content = $_SERVER['original_querystring'];//request_helper::content();
     wxLog::DEBUG("content = {$content}");
     $result = WxPayResults::Init($content);
     $ret_wx = array();

+ 1 - 2
request_helper.php

@@ -238,8 +238,7 @@ class request_helper
         if ($squery == '') {
             return;
         } else {
-            $_GET['original_querystring'] = $squery;
-            $_POST['original_querystring'] = $squery;
+            $_SERVER['original_querystring'] = $squery;
         }
 
         $params = preg_split('/&|=/', $squery);

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 3
research/function_test.php