wanggangzero пре 9 месеци
родитељ
комит
22f8f906cb

+ 50 - 51
Gameserver/App/process/PayProc.php

@@ -31,10 +31,11 @@ class PayProc {
             // 支付相关的活动
             case CmdCode::cmd_pay_getfirstpaygift:                              # 8802 领取首充礼包
                 return PayProc::m_GetFirstPayGift();
-            case CmdCode::cmd_pay_resetFirstRechargeUI_OpenTip:                 # 8803 重置弹框 
+            case CmdCode::cmd_pay_resetFirstRechargeUI_OpenTip:                 # 8803 重置弹框
                 return PayProc::resetFirstRechargeUI_OpenTip();
             case CmdCode::cmd_pay_accumulateRechargeRewardReceived:             # 8804 累计充值领取奖励
                 return PayProc::accumulateRechargeRewardReceived();
+
 // 游戏内二级货币消费
             case CmdCode::cmd_mpay_pay:                                         # 8807 消费..
                 return self::m_pay();                                           # ::==> 购买普通商城物品
@@ -61,56 +62,56 @@ class PayProc {
                 return Resp::err(ErrCode::cmd_err);
         }
     }
-    
+
     /**
      * 8804 累计充值
      */
-    static function accumulateRechargeRewardReceived(){
+    static function accumulateRechargeRewardReceived() {
         list($id) = req()->paras;
-        $mo = GameConfig::accumulaterecharge_getItem($id);        
+        $mo = GameConfig::accumulaterecharge_getItem($id);
         my_Assert($mo != null, ErrCode::err_const_no);
-        
-        my_Assert(ctx()->baseInfo->accumulateYuanBao >= $id , ErrCode::pay_accumulateYuanBaoNotEnough);
-        my_Assert(in_array($id, ctx()->privateState->accumulateRechargeRewardRecord) , ErrCode::pay_repeatReceive);
-        
+
+        my_Assert(ctx()->baseInfo->accumulateYuanBao >= $id, ErrCode::pay_accumulateYuanBaoNotEnough);
+        my_Assert(in_array($id, ctx()->privateState->accumulateRechargeRewardRecord), ErrCode::pay_repeatReceive);
+
         ctx()->privateState->accumulateRechargeRewardRecord[] = $id;
         StoreProc::AddMultiItemInStore($mo->reward);
-        
+
         $reset = true;
         $dic = GameConfig::accumulaterecharge();
         $max_yuanbao = 0;
         foreach ($dic as $aMo) {
-            if(!in_array($aMo->yuanbao, ctx()->privateState->accumulateRechargeRewardRecord)){
+            if (!in_array($aMo->yuanbao, ctx()->privateState->accumulateRechargeRewardRecord)) {
                 $reset = false;
-            }          
-            
-            if($aMo->yuanbao > $max_yuanbao){
+            }
+
+            if ($aMo->yuanbao > $max_yuanbao) {
                 $max_yuanbao = $aMo->yuanbao;
             }
         }
-        
-        if($reset){
+
+        if ($reset) {
             ctx()->privateState->accumulateRechargeRewardRecord = array();
             ctx()->baseInfo->accumulateYuanBao -= $max_yuanbao;
-            if(ctx()->baseInfo->accumulateYuanBao <= 0){
+            if (ctx()->baseInfo->accumulateYuanBao <= 0) {
                 ctx()->baseInfo->accumulateYuanBao = 0;
             }
         }
-        
+
         UserProc::updateUserInfo();
         return Resp::ok(array('gold' => ctx()->baseInfo->gold,
                     'cash' => ctx()->baseInfo->cash,
                     'store' => ctx()->store,
                     'privateState' => ctx()->privateState,
-                    'reward'=> StoreProc::$reward,
-                    'reward_Gem'=> StoreProc::$reward_Gem,
-            ));   
+                    'reward' => StoreProc::$reward,
+                    'reward_Gem' => StoreProc::$reward_Gem,
+        ));
     }
-    
+
     /**
-     * 8803 重置弹框 
+     * 8803 重置弹框
      */
-    static function resetFirstRechargeUI_OpenTip(){
+    static function resetFirstRechargeUI_OpenTip() {
         ctx()->privateState->firstRechargeUI_OpenTip = 0;
         UserProc::updateUserInfo();
         return Resp::ok();
@@ -334,10 +335,10 @@ class PayProc {
         NormalEventProc::OnPaySuccess();
         UserProc::updateUserInfo();                                             # 回写玩家数据
         return Resp::ok(array(
-                    "ret" => self::$retArr,
-                    "pay" => $user->pay,
-                    "base" => $user->baseInfo,
-                    "shopdata" => $user->shopdata,
+                    "ret" => self::$retArr, #                                   # 奖励串
+//                    "pay" => $user->pay,
+                    "baseInfo" => $user->baseInfo,
+//                    "shopdata" => $user->shopdata,
                     "store" => $user->store,
         ));
     }
@@ -931,7 +932,6 @@ class PayProc {
      */
     public static function m_GetFirstPayGift() {
         //list($day) = req()->paras;
-        
 //        $itemId = glc()->FirstPay_ItemId;
 //        $privateState = ctx()->privateState;
 //
@@ -946,51 +946,50 @@ class PayProc {
 //            return Resp::err(ErrCode::err_const_no);
 //        }
 //        ctx()->privateState->firstPayGift = true;               # 设置首付标志
-        
-        my_Assert(ctx()->baseInfo->charge_amt != 0, ErrCode::pay_firstpayno_err);    
-        //my_Assert(!in_array($day, ctx()->privateState->firstRechargeRewardRecord), ErrCode::pay_repeatReceive);   
-        
+
+        my_Assert(ctx()->baseInfo->charge_amt != 0, ErrCode::pay_firstpayno_err);
+        //my_Assert(!in_array($day, ctx()->privateState->firstRechargeRewardRecord), ErrCode::pay_repeatReceive);
 //        $ts = TimeUtil::totalDays(ctx()->privateState->firstRechargeTs);
 //        $sTs = $ts + $day -1;
-//        my_Assert(TimeUtil::totalDays() >= $sTs, ErrCode::pay_rewardReceive_ts_limit);    
-       
+//        my_Assert(TimeUtil::totalDays() >= $sTs, ErrCode::pay_rewardReceive_ts_limit);
+
         for ($i = 1; $i <= ctx()->privateState->firstRecharge_receiveTag; $i++) {
-            if(!in_array($i,ctx()->privateState->firstRechargeRewardRecord)){
-                ctx()->privateState->firstRechargeRewardRecord[] = $i;               
+            if (!in_array($i, ctx()->privateState->firstRechargeRewardRecord)) {
+                ctx()->privateState->firstRechargeRewardRecord[] = $i;
                 $mo = GameConfig::firstrecharge_reward_getItem($i);
-                my_Assert($mo != null, ErrCode::err_const_no);                          
+                my_Assert($mo != null, ErrCode::err_const_no);
                 StoreProc::AddMultiItemInStore($mo->reward);                            # 发放首付礼包到玩家仓库
             }
-        }              
-        
+        }
+
         ctx()->privateState->firstRechargeUI_OpenTip = 0;
-        
+
         UserProc::updateUserInfo();                                             # 更新玩家数据
-     
+
         return Resp::ok(array('gold' => ctx()->baseInfo->gold,
                     'cash' => ctx()->baseInfo->cash,
                     'store' => ctx()->store,
                     'privateState' => ctx()->privateState,
-                    'reward'=> StoreProc::$reward,
-                    'reward_Gem'=> StoreProc::$reward_Gem,
-            ));                 
+                    'reward' => StoreProc::$reward,
+                    'reward_Gem' => StoreProc::$reward_Gem,
+        ));
     }
 
     public static function setFirstRechargeLoginTag() {
-        if(ctx()->baseInfo->charge_amt == 0){
+        if (ctx()->baseInfo->charge_amt == 0) {
             return;
-        }  
-        
-        if(ctx()->privateState->firstRecharge_receiveTag == 3){
+        }
+
+        if (ctx()->privateState->firstRecharge_receiveTag == 3) {
             return;
         }
-        
-        if(ctx()->privateState->firstRecharge_receiveTag <1){
+
+        if (ctx()->privateState->firstRecharge_receiveTag < 1) {
             return;
         }
         ctx()->privateState->firstRecharge_receiveTag += 1;
     }
-    
+
 // </editor-fold>
 //
 //

+ 2 - 3
Gameserver/App/service_call/pay/official/wxpayv2/lib/WxPay.Config.php

@@ -32,10 +32,10 @@ class WxPayConfig {
      * 获取地址:https://mp.weixin.qq.com/advanced/advanced?action=dev&t=advanced/dev&token=2005451881&lang=zh_CN
      * @var string
      */
-    const APPID = 'wx1fde06d2783aaaf2';                                         // 言灵世界ol (开平&支付平台的唯一appid)
+    const APPID = 'wxac5f9f9f36131eb0';                                         // jzhj (开平&支付平台的唯一appid)
     const MCHID = '1494582952';                                                 // 商户号
     const KEY = 'e5aa9eb1de292bfc64588de9c13121b9';                             // v2秘钥
-    const APPSECRET = '4adf1a6c582476e9c8131f4174f9025b';                       // 开放平台 appsecret 更新 2023年1月12日
+    const APPSECRET = '153004f0ddd6775cb4bf9a3086915605';                       // 开放平台 appsecret 更新 2023年1月12日
 //=======【证书路径设置】=====================================
 
     /**
@@ -105,5 +105,4 @@ class WxPayConfig {
         $result = strtoupper($string);
         return $result;
     }
-
 }