Browse Source

调试支付

Robin 6 years ago
parent
commit
684f4bc06c
1 changed files with 5 additions and 5 deletions
  1. 5 5
      normandcrm/service/common/pay/PayForm.php

+ 5 - 5
normandcrm/service/common/pay/PayForm.php

@@ -174,15 +174,15 @@ class PayForm extends Model
      */
     public function handleNotify($data)
     {
-        if($data['payType']=="wy_bb" || $data['payType']=="alipay_bb"){
-            $data['payType'] = 19;
-        }
         $payType = isset($data['payType']) ? trim($data['payType']) : '';
         file_put_contents('huiqi4.txt',$payType);
+        if($data['payType']=="wy_bb" || $data['payType']=="alipay_bb"){
+            $handler = BasePayHandler::getPayHandlerByPayType(19);
+        }else{
+            $handler = BasePayHandler::getPayHandlerByPayType($payType);
+        }
         unset($data['token']);
         unset($data['payType']);
-
-        $handler = BasePayHandler::getPayHandlerByPayType($payType);
         $success = false;
         if ($handler != null) {
             file_put_contents('huiqidata.txt',\GuzzleHttp\json_encode($data));