소스 검색

充值到账

lizhen_gitee 3 년 전
부모
커밋
90641f2161
3개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 0
      application/admin/controller/Payment.php
  2. 1 1
      application/api/controller/Pay.php
  3. 1 1
      application/common/model/Paymentdo.php

+ 1 - 0
application/admin/controller/Payment.php

@@ -10,6 +10,7 @@ class Payment extends \think\Controller
 {
     public function notify(){
         $paytype = input('paytype','wechat');
+        $paytype = 'alipay';
 
         $pay = Service::checkNotify($paytype);
         filePut('[payment][receive]异步回调开始:'.json_encode($pay));

+ 1 - 1
application/api/controller/Pay.php

@@ -93,7 +93,7 @@ class Pay extends Api
             //'method'       => 'miniapp',
             'method'       => 'app',
             //'openid'       => $openid,
-            'notifyurl' => $this->request->root(true) . '/notify.php',
+            'notifyurl' => $this->request->root(true) . '/notify.php?paytype='.$pay_type,
             'returnurl' => '',
         ];
         $res = Service::submitOrder($params);

+ 1 - 1
application/common/model/Paymentdo.php

@@ -37,7 +37,7 @@ class Paymentdo
             }
             //获取到它使用的支付接口
             //$pay = new Pay($info['payment_class']);
-            //Db::startTrans(); 修改为:充值+扣款,防止扣款失败时充值也回滚
+
             //if ($rs = $pay->receive())
             if (1 === 1)
             {