Jelajahi Sumber

支付改进ing

wanggangzero 5 bulan lalu
induk
melakukan
59993f95da
69 mengubah file dengan 162 tambahan dan 282 penghapusan
  1. 1 1
      Gameserver/App/Services/AppServer.php
  2. 49 34
      Gameserver/App/base/ErrCode.php
  3. 0 3
      Gameserver/App/base/Req.php
  4. 1 1
      Gameserver/App/model/Const/GameConfig.php
  5. 1 1
      Gameserver/App/model/Const/sm_accumulaterecharge.php
  6. 1 1
      Gameserver/App/model/Const/sm_achieve_new.php
  7. 1 1
      Gameserver/App/model/Const/sm_activeTask.php
  8. 1 1
      Gameserver/App/model/Const/sm_activeTask_type.php
  9. 1 1
      Gameserver/App/model/Const/sm_active_day7_accumulate.php
  10. 1 1
      Gameserver/App/model/Const/sm_activepointreward.php
  11. 1 1
      Gameserver/App/model/Const/sm_activity.php
  12. 1 1
      Gameserver/App/model/Const/sm_activity_battlepass.php
  13. 1 1
      Gameserver/App/model/Const/sm_activity_battlepass_type.php
  14. 1 1
      Gameserver/App/model/Const/sm_activity_day7.php
  15. 1 1
      Gameserver/App/model/Const/sm_activity_day7sign_newplayer.php
  16. 1 1
      Gameserver/App/model/Const/sm_activity_lottery_tree.php
  17. 1 1
      Gameserver/App/model/Const/sm_activity_lotteryitem_exchange.php
  18. 1 1
      Gameserver/App/model/Const/sm_activity_lotterynum_accumulate.php
  19. 1 1
      Gameserver/App/model/Const/sm_activity_promopackinfo.php
  20. 1 1
      Gameserver/App/model/Const/sm_activity_promopackinfo_type.php
  21. 1 1
      Gameserver/App/model/Const/sm_announcement.php
  22. 1 1
      Gameserver/App/model/Const/sm_clientVersionHistory.php
  23. 1 1
      Gameserver/App/model/Const/sm_equip.php
  24. 1 1
      Gameserver/App/model/Const/sm_equip_compose.php
  25. 1 1
      Gameserver/App/model/Const/sm_equip_levelupgrade.php
  26. 1 1
      Gameserver/App/model/Const/sm_equip_position.php
  27. 1 1
      Gameserver/App/model/Const/sm_equip_suit.php
  28. 1 1
      Gameserver/App/model/Const/sm_errmsg.php
  29. 1 1
      Gameserver/App/model/Const/sm_evolve.php
  30. 1 1
      Gameserver/App/model/Const/sm_firstrecharge_reward.php
  31. 1 1
      Gameserver/App/model/Const/sm_fun_unlock.php
  32. 1 1
      Gameserver/App/model/Const/sm_gate.php
  33. 1 1
      Gameserver/App/model/Const/sm_gate_sbox.php
  34. 1 1
      Gameserver/App/model/Const/sm_gate_unlock.php
  35. 1 1
      Gameserver/App/model/Const/sm_gem.php
  36. 1 1
      Gameserver/App/model/Const/sm_gem_slotposition.php
  37. 1 1
      Gameserver/App/model/Const/sm_glc2.php
  38. 1 1
      Gameserver/App/model/Const/sm_globalsettings.php
  39. 1 1
      Gameserver/App/model/Const/sm_hero.php
  40. 1 1
      Gameserver/App/model/Const/sm_heroType_typeId.php
  41. 1 1
      Gameserver/App/model/Const/sm_heroattr.php
  42. 1 1
      Gameserver/App/model/Const/sm_item.php
  43. 1 1
      Gameserver/App/model/Const/sm_item_2023_box.php
  44. 1 1
      Gameserver/App/model/Const/sm_player_level.php
  45. 1 1
      Gameserver/App/model/Const/sm_plots.php
  46. 1 1
      Gameserver/App/model/Const/sm_predicate.php
  47. 1 1
      Gameserver/App/model/Const/sm_rank_fightpowerreward.php
  48. 1 1
      Gameserver/App/model/Const/sm_rank_passgatereward.php
  49. 1 1
      Gameserver/App/model/Const/sm_service_schedule.php
  50. 1 1
      Gameserver/App/model/Const/sm_shop.php
  51. 1 1
      Gameserver/App/model/Const/sm_shop_box.php
  52. 1 1
      Gameserver/App/model/Const/sm_shop_cash.php
  53. 1 1
      Gameserver/App/model/Const/sm_shop_daily.php
  54. 1 1
      Gameserver/App/model/Const/sm_shop_gategift.php
  55. 1 1
      Gameserver/App/model/Const/sm_shop_gold.php
  56. 1 1
      Gameserver/App/model/Const/sm_shop_junbei.php
  57. 1 1
      Gameserver/App/model/Const/sm_shop_monthcard.php
  58. 1 1
      Gameserver/App/model/Const/sm_shop_supply.php
  59. 1 1
      Gameserver/App/model/Const/sm_skills.php
  60. 1 1
      Gameserver/App/model/Const/sm_subfun_unlock.php
  61. 1 1
      Gameserver/App/model/Const/sm_sysmail.php
  62. 1 1
      Gameserver/App/model/Const/sm_token_PublicGift.php
  63. 1 1
      Gameserver/App/model/Const/sm_token_gift.php
  64. 1 1
      Gameserver/App/model/Const/sm_waveItem.php
  65. 1 1
      Gameserver/App/model/Const/sm_waves.php
  66. 20 148
      Gameserver/App/process/PayProc.php
  67. 18 13
      Gameserver/App/service_call/pay/Mo/payRequest.php
  68. 8 8
      Gameserver/App/service_call/pay/official/pay_op.php
  69. 4 13
      Gameserver/App/test.php

+ 1 - 1
Gameserver/App/Services/AppServer.php

@@ -155,7 +155,7 @@ class AppServer {
             return ErrCode::clientversionlow_err;
         }
 
-        $limit_Ver = "1.0.1";                                                   # 限制客户端最低版本
+        $limit_Ver = "1.0.3";                                                   # 限制客户端最低版本
         $clientArr = CommUtil::split(req()->CV, ".");
         $serverArr = CommUtil::split($limit_Ver, ".");
         $client = $clientArr[0] * 1000 * 1000 + $clientArr[1] * 1000 + $clientArr[2];

+ 49 - 34
Gameserver/App/base/ErrCode.php

@@ -205,7 +205,7 @@ class ErrCode {
     const pay_order_no = 8812;
 
     /**
-     * 充值 - 付款状态不正确 正在重新查询...
+     * 充值 - 付款状态尚未同步 请稍后重新查询...
      */
     const pay_order_paystatus = 8813;
 
@@ -220,19 +220,19 @@ class ErrCode {
     const pay_order_uid = 8815;
 
     /**
-     * 神秘商城 - 免费刷新时间未到
+     * 订单号错误
      */
-    const pay_secretshopt_freeRefresh_Time = 8816;
+    const pay_order_id = 8816;
 
     /**
-     * 订单号为null无法支付
+     * 订单 - 道具id错误
      */
     const pay_order_product_id = 8817;
 
     /**
-     * 支付失败
+     * 支付失败(无发货逻辑)
      */
-    const pay_fail = 8818;
+    const pay_fail_nologic = 8818;
 
     /**
      * 不能重复购买
@@ -243,17 +243,32 @@ class ErrCode {
      * 充值奖励重复领取
      */
     const pay_repeatReceive = 8820;
-    
+
     /**
      * 没有到充值奖励领取时间
      */
     const pay_rewardReceive_ts_limit = 8821;
-    
+
     /**
      * 累计元宝数量不足无法领取奖励
      */
     const pay_accumulateYuanBaoNotEnough = 8822;
-    
+
+    /**
+     * 神秘商城 - 免费刷新时间未到
+     */
+    const pay_secretshopt_freeRefresh_Time = 8823;
+
+    /**
+     * 支付失败(发货逻辑)
+     */
+    const pay_fail_logic = 8824;
+
+    /**
+     * 支付失败(数据库写入)
+     */
+    const pay_fail_db = 8825;
+
 // </editor-fold>
 //
 // <editor-fold defaultstate="collapsed" desc="    not enough 系列    ">
@@ -418,7 +433,7 @@ class ErrCode {
      * 没有达到解锁等级
      */
     const evolve_canotUnlock_levelLimit = 3215;
-    
+
     /**
      * 关卡没有被胜利通关
      */
@@ -471,51 +486,51 @@ class ErrCode {
      * 没有找到对应词条信息
      */
     const user_store_NoFindPredicate = 3309;
-    
+
     /**
      * 装备等级已经达到最大值
      */
     const user_store_equipLevelLimit = 3310;
-    
+
     /**
      * 不存在该装备
      */
-    const user_store_NotExistEquip = 3311; 
-    
+    const user_store_NotExistEquip = 3311;
+
     /**
      * 装备部位与宝石部位不匹配
      */
-    const user_store_PositionNotFit = 3312; 
-    
+    const user_store_PositionNotFit = 3312;
+
     /**
      * 装备材料类型错误
      */
-    const user_store_equipMaterialTypeErr = 3313; 
-    
+    const user_store_equipMaterialTypeErr = 3313;
+
     /**
      * 装备材料品阶错误
      */
-    const user_store_equipMaterialQualErr = 3314; 
-    
+    const user_store_equipMaterialQualErr = 3314;
+
     /**
      * 装备材料数量错误
      */
-    const user_store_equipMaterialNumErr = 3315; 
-    
+    const user_store_equipMaterialNumErr = 3315;
+
     /**
      * 装备已经在最低等级
      */
-    const user_store_equip_minlevel = 3316; 
-    
+    const user_store_equip_minlevel = 3316;
+
     /**
      * 装备已经在最低品阶
      */
-    const user_store_equip_minQual = 3317; 
-    
+    const user_store_equip_minQual = 3317;
+
     /**
      * 装备合成材料不能参与此次合成
      */
-    const user_store_equip_composeMaterialErr = 3318; 
+    const user_store_equip_composeMaterialErr = 3318;
 // </editor-fold>
 //
 //   // <editor-fold defaultstate="collapsed" desc="    shop 3400    ">
@@ -607,37 +622,37 @@ class ErrCode {
      * 抽奖次数非法
      */
     const active_lotteryNumErr = 3509;
-    
+
     /**
      * 抽奖次数已经用完
      */
     const active_lotteryNumLimit = 3510;
-    
+
     /*
      * 抽奖券数据错误
      */
     const active_lotteryCostErr = 3511;
-    
+
     /**
      * 寻宝券数量充足不需要兑换
      */
     const active_lottery_unwantedExchange = 3512;
-    
+
     /**
      * 抽奖次数不足
      */
     const active_lotteryNumNotEnough = 3513;
-    
+
     /**
      * 兑换次数已经用完无法再次兑换
      */
     const active_lotteryExchangeNumLimit = 3514;
-    
+
     /**
      * 消耗体力值不足
      */
     const active_costTiliNotEnough = 3515;
-    
+
     /**
      * 活跃点数量不足
      */

+ 0 - 3
Gameserver/App/base/Req.php

@@ -82,9 +82,6 @@ class Req extends Object_ext {
         if ($this->CV == "unityEditor") {                                       # 对特殊CV做下处理
             $this->CV = "999.999.999";
         }
-        if ($this->CV == "unity") {
-            $this->CV = "1.1.11";
-        }
         self::$_req = $this;                                                    // ---赋值---
         switch ($this->cmd) {
             case CmdCode::cmd_user_getzonelist:                                 # 下载分区列表

+ 1 - 1
Gameserver/App/model/Const/GameConfig.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-12-17 17:52:35
+ // 日期: 2024-12-23 11:20:43
 ////////////////////
 
 /**

+ 1 - 1
Gameserver/App/model/Const/sm_accumulaterecharge.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-09-05 17:01:24
+ // 日期: 2024-12-18 15:24:39
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_achieve_new.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-06-07 18:24:29
+ // 日期: 2024-12-20 09:05:03
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_activeTask.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-12-16 10:05:55
+ // 日期: 2024-12-20 09:05:03
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_activeTask_type.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-12-16 10:05:55
+ // 日期: 2024-12-20 09:05:03
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_active_day7_accumulate.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-09-29 16:05:51
+ // 日期: 2024-12-20 09:05:01
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_activepointreward.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-04-29 11:24:54
+ // 日期: 2024-12-18 15:24:39
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_activity.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-09-20 15:50:58
+ // 日期: 2024-12-20 09:05:03
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_activity_battlepass.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-10-15 15:06:52
+ // 日期: 2024-12-18 15:24:40
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_activity_battlepass_type.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-10-15 15:06:52
+ // 日期: 2024-12-18 15:24:40
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_activity_day7.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-11-22 16:05:54
+ // 日期: 2024-12-20 09:05:03
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_activity_day7sign_newplayer.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-11-28 09:13:30
+ // 日期: 2024-12-20 09:05:03
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_activity_lottery_tree.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-09-11 14:37:02
+ // 日期: 2024-12-18 15:24:40
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_activity_lotteryitem_exchange.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-09-12 17:11:58
+ // 日期: 2024-12-18 15:24:40
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_activity_lotterynum_accumulate.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-09-11 14:53:30
+ // 日期: 2024-12-18 15:24:40
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_activity_promopackinfo.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-10-09 17:58:39
+ // 日期: 2024-12-18 15:24:40
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_activity_promopackinfo_type.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-10-09 17:58:39
+ // 日期: 2024-12-18 15:24:40
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_announcement.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-09-30 09:35:51
+ // 日期: 2024-12-20 09:05:04
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_clientVersionHistory.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-06-07 18:24:30
+ // 日期: 2024-12-20 09:05:04
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_equip.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-12-16 09:37:06
+ // 日期: 2024-12-20 09:05:04
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_equip_compose.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-11-01 16:19:57
+ // 日期: 2024-12-18 15:24:41
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_equip_levelupgrade.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-11-14 11:27:49
+ // 日期: 2024-12-20 09:05:05
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_equip_position.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-12-17 10:29:52
+ // 日期: 2024-12-20 09:05:05
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_equip_suit.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-10-30 14:43:38
+ // 日期: 2024-12-18 15:24:42
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_errmsg.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-10-09 18:05:52
+ // 日期: 2024-12-20 09:05:06
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_evolve.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-12-17 15:05:55
+ // 日期: 2024-12-20 09:05:05
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_firstrecharge_reward.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-09-04 16:07:40
+ // 日期: 2024-12-18 15:24:42
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_fun_unlock.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-12-17 17:35:55
+ // 日期: 2024-12-20 09:05:06
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_gate.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-12-12 21:02:39
+ // 日期: 2024-12-20 09:05:06
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_gate_sbox.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-07-24 15:35:47
+ // 日期: 2024-12-20 09:05:06
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_gate_unlock.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-12-12 21:02:39
+ // 日期: 2024-12-20 09:05:06
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_gem.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-11-20 17:31:21
+ // 日期: 2024-12-20 09:05:06
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_gem_slotposition.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-10-29 16:16:44
+ // 日期: 2024-12-18 15:24:43
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_glc2.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-12-17 09:33:54
+ // 日期: 2024-12-20 09:05:06
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_globalsettings.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-12-17 14:34:30
+ // 日期: 2024-12-20 09:05:06
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_hero.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-12-16 16:05:55
+ // 日期: 2024-12-20 09:05:07
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_heroType_typeId.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-12-16 16:05:55
+ // 日期: 2024-12-20 09:05:07
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_heroattr.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-06-07 18:24:31
+ // 日期: 2024-12-20 09:05:07
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_item.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-12-17 15:03:37
+ // 日期: 2024-12-20 09:05:07
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_item_2023_box.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-06-07 14:15:10
+ // 日期: 2024-12-18 15:24:44
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_player_level.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-12-16 10:23:40
+ // 日期: 2024-12-20 09:05:12
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_plots.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-12-06 10:05:55
+ // 日期: 2024-12-20 09:05:12
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_predicate.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-12-17 15:38:46
+ // 日期: 2024-12-20 09:05:12
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_rank_fightpowerreward.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-05-27 17:24:24
+ // 日期: 2024-12-18 15:24:45
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_rank_passgatereward.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-05-27 17:21:59
+ // 日期: 2024-12-18 15:24:46
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_service_schedule.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-06-07 18:24:33
+ // 日期: 2024-12-20 09:05:12
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_shop.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-12-12 17:58:23
+ // 日期: 2024-12-20 09:05:12
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_shop_box.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-04-17 10:49:26
+ // 日期: 2024-12-18 15:24:46
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_shop_cash.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-06-07 18:24:33
+ // 日期: 2024-12-20 09:05:12
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_shop_daily.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-03-20 15:21:17
+ // 日期: 2024-12-18 15:24:46
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_shop_gategift.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-03-20 15:21:17
+ // 日期: 2024-12-18 15:24:47
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_shop_gold.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-03-20 15:21:18
+ // 日期: 2024-12-18 15:24:47
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_shop_junbei.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-03-20 15:21:18
+ // 日期: 2024-12-18 15:24:47
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_shop_monthcard.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-04-24 14:44:52
+ // 日期: 2024-12-18 15:24:47
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_shop_supply.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-03-20 15:21:18
+ // 日期: 2024-12-18 15:24:48
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_skills.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-12-10 10:35:55
+ // 日期: 2024-12-20 09:05:12
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_subfun_unlock.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-09-09 18:06:13
+ // 日期: 2024-12-18 15:24:48
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_sysmail.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-09-30 11:05:09
+ // 日期: 2024-12-20 09:05:12
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_token_PublicGift.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-06-20 17:00:35
+ // 日期: 2024-12-18 15:24:49
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_token_gift.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-06-20 17:35:46
+ // 日期: 2024-12-20 09:05:07
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_waveItem.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-12-17 17:10:09
+ // 日期: 2024-12-20 17:31:20
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_waves.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-12-17 17:10:09
+ // 日期: 2024-12-20 17:31:20
 ////////////////////
 
 

+ 20 - 148
Gameserver/App/process/PayProc.php

@@ -334,7 +334,7 @@ class PayProc {
 
         $result = pay_op::CheckAndDrawOrder(req()->uid, $cpOrderId, array(new PayProc, 'distributePayGoods'));
         CLog::pay($result);
-        my_Assert($result->err == 0, ErrCode::pay_fail);
+        my_Assert($result->err == 0, $result->err);                             # 发货失败
 
         $user = ctx();
         NormalEventProc::OnPaySuccess();
@@ -398,106 +398,6 @@ class PayProc {
             }
         }
 
-        // <editor-fold defaultstate="collapsed" desc="已废弃逻辑">
-//        else if ($order->product_id == 1) {
-//            $user->base(true)->Add_Cash($order->product_count);
-//            self::$retArr[] = "2," . $order->product_count;
-//        } else if ($order->product_id >= 6 && $order->product_id <= 1000) {//充值表
-//            $mo = GameConfig::recharge_getItem($order->product_id);
-//            my_Assert($mo != null, ErrCode::err_const_no);
-//
-//            if (!StlUtil::dictHasProperty($user->shopdata, 'rechargeRecordList')) {
-//                $user->shopdata->rechargeRecordList = array();
-//            }
-//
-//            $cash = $mo->rmd * 10;
-//            if (!in_array($order->product_id, $user->shopdata->rechargeRecordList)) {
-//                $cash = $mo->rmd * 10 * $mo->firstDouble;
-//                $user->shopdata->rechargeRecordList[] = $order->product_id;
-//            }
-//            $user->base(true)->Add_Cash($cash);
-//            self::$retArr[] = "2," . $cash;
-//        } elseif ($order->product_id >= 801001 && $order->product_id <= 803999) {//限购
-//            self::checklimitBuyRecharge($order->product_id);
-//
-//            $mo = GameConfig::shop_limit_getItem($order->product_id);
-//            if ($mo->subType == 1) {
-//                $user->shopdata->dayRechargeAmt += $order->amount;
-//            } else if ($mo->subType == 2) {
-//                $user->shopdata->weekRechargeAmt += $order->amount;
-//            }
-//        } elseif ($order->product_id >= 804001 && $order->product_id <= 804999) {//每日特惠
-//            $mo = GameConfig::shop_limit_getItem($order->product_id);
-//            my_Assert($mo != null, ErrCode::err_const_no);
-//            if ($mo->price == 60) {
-//                $user->shopdata->daliySpecial_ts = now();
-//            } else {
-//                $itemid = explode(',', $mo->reward)[0];
-//                $itemMO = GameConfig::item_package_getItem($itemid);
-//                my_Assert(null != $itemMO, ErrCode::err_const_no);
-//                StoreProc::AddMultiItemInStore($itemMO->contents);
-//                $user->shopdata->daliySpecialPackages[] = $mo->typeId;
-//                self::$retArr[] = $itemMO->contents;
-//            }
-//        } elseif ($order->product_id >= 805001 && $order->product_id <= 805999) {//限时
-//            $mo = GameConfig::shop_limit_getItem($order->product_id);
-//            my_Assert($mo != null, ErrCode::err_const_no);
-//            my_Assert(!in_array($order->product_id, $user->shopdata->limitTsActiveRewardsList), ErrCode::err_const_no);
-//
-//            $user->shopdata->limitTsActiveRewardsList[] = $mo->typeId;
-//            $itemid = explode(',', $mo->reward)[0];
-//            $itemMO = GameConfig::item_package_getItem($itemid);
-//            my_Assert(null != $itemMO, ErrCode::err_const_no);
-//            StoreProc::AddMultiItemInStore($itemMO->contents); //领取奖励
-//            self::$retArr[] = $itemMO->contents;
-//        } elseif ($order->product_id >= 806001 && $order->product_id <= 806999) {//首充【2022-10-19新的首充功能】
-//            $mo = GameConfig::shop_accumulating_getItem($order->product_id);
-//            my_Assert($mo != null, ErrCode::err_const_no);
-//            $shopdata = new Info_UserShop(ctx()->shopdata);
-//            $amount = $mo->amount;
-//            if (!StlUtil::dictHasProperty($shopdata->fRechargeTime, $amount)) {
-//                $shopdata->fRechargeTime->$amount = TimeUtil::tsDay();
-//            }
-//            $cost = 0;
-//            $dic = GameConfig::shop_accumulating();
-//            foreach ($dic as $k => $item) {
-//                if ($cost <= $item->amount) {
-//                    $cost = $item->amount;
-//                }
-//            }
-//            if ($cost <= $amount && $shopdata->suitGiftStartTs == 0) {
-//                $shopdata->suitGiftStartTs = now();
-//            }
-//            ctx()->shopdata = $shopdata;
-//            //self::$retArr[] = $mo->goods;
-//        } elseif ($order->product_id >= 807001 && $order->product_id <= 807999) {//终身礼包
-//            self::checklimitBuyRecharge($order->product_id);
-//        } elseif ($order->product_id >= 808001 && $order->product_id <= 808999) {//套装礼包
-//            self::checklimitBuyRecharge($order->product_id);
-//        } elseif ($order->product_id >= 901001 && $order->product_id <= 999999) {//月卡
-//            $shopdata = new Info_UserShop(ctx()->shopdata);
-//            $packageCfg = GameConfig::shop_monthVIP_getItem($order->product_id);
-//            my_Assert(null != $packageCfg, ErrCode::err_const_no);
-//            if ($packageCfg->subType == 4) {
-//                my_Assert($shopdata->monthlyVIP1_ts + $packageCfg->ExpireTs * 3600 * 24 < now(), ErrCode::shop_monthlyvip_buyed);
-//            } elseif ($packageCfg->subType == 5) {
-//                my_Assert($shopdata->monthlyVIP2_ts + $packageCfg->ExpireTs * 3600 * 24 < now(), ErrCode::shop_monthlyvip_buyed);
-//            }
-//            $err = StoreProc::AddMultiItemInStore($packageCfg->pri_reward);     # 发放一次性奖励
-//            self::$retArr[] = $packageCfg->pri_reward;
-//            my_Assert(ErrCode::ok == $err, $err);
-//            if ($packageCfg->subType == 4) {
-//                $shopdata->monthlyVIP1_ts = 3600 * 24 * (totalDays() + 1) - 1;
-//            } elseif ($packageCfg->subType == 5) {
-//                $shopdata->monthlyVIP2_ts = 3600 * 24 * (totalDays() + 1) - 1;
-//            }
-//
-//            EmailProc::SendMonthlyVIPDailyReward(req()->zoneid, req()->uid, $packageCfg->name, $packageCfg->daily_reward);
-//
-//            ctx()->shopdata = $shopdata;
-//        }
-// </editor-fold>
-
         $user->baseInfo->charge_amt += $order->amount;                          # 统计下累充金额
 
         if ($order->amount > 0) {
@@ -580,8 +480,7 @@ class PayProc {
      */
     static function GetPayRecoreds() {
         $uid = req()->uid;
-        $table = "tpl_order_tab";
-        $arr = daoInst()->select(" cpOrderId as '订单' ,product_name as '道具',amount as '金额' ,from_unixtime(order_ts) as '时间' ")->from($table)
+        $arr = daoInst()->select(" cpOrderId as '订单' ,product_name as '道具',amount as '金额' ,from_unixtime(order_ts) as '时间' ")->from(self::orderTab)
                 ->where("uid")->eq($uid)
                 ->andWhere("status")->eq(1)
                 ->fetchall();
@@ -593,6 +492,7 @@ class PayProc {
 
     /**
      *  刷新充值订单(领取充值结果)
+     * @deprecated since version 2024.12.20
      */
     public static function m_refreshChargeOrders() {
 # 客户端参数解析
@@ -694,65 +594,37 @@ class PayProc {
     }
 
     /**
-     * 检查异常订单, 补发道具
+     * [8811] 检查异常订单, 补发道具
      */
     public static function selfhelpCheckOrders() {
         $uid = req()->uid;
         $orders = daoInst()->select()
-                ->from('tpl_order_tab')
+                ->from(self::orderTab)
                 ->where('uid')->eq($uid)
                 ->andWhere('status')->eq(1)
                 ->andWhere('drawed_ts')->le(0)
                 ->fetchAll();
         if (count($orders) > 0) {
             foreach ($orders as $order) {
-                // 准备补发
-                $product_id = $order->product_id;
-                $product_count = $order->product_count;
-                $typid = substr("$product_id", 0, 3);                           # 提取商品编号前缀
-                $goods = '';
-                switch ($typid) {
-                    case '802':                                                 # 神秘商城物品
-                        $item = GameConfig::secretshop_typeId_getItem($product_id);
-                        break;
-                    case '801':                                                 # 商城物品
-                        $item = GameConfig::shop_getItem($product_id);
-                        break;
-                    default :
-                        return Resp::err(ErrCode::pay_systembusy_err);
-                }
-                if (!$item) {
-                    return Resp::err(ErrCode::pay_shopItem_cosnt_goods_err);
-                }
-                if ($item->pricetype != 0) {                                    # 并非人民币定价
-                    CLog::pay(" 道具付费类型异常:" . $product_id);
-                    return Resp::err(ErrCode::pay_m_type_err);
-                }
-                for ($i = 0; $i < $product_count; $i++) {                       # 默认为1,还没有设计为n的情况
-                    StoreProc::AddMultiItemInStore($item->goods, 5);      # 发货
-                }
-                $goods .= $item->goods;
-                $n = daoInst()->update(self::orderTab)                          # 更新订单状态
-                        ->data(array('drawed_ts' => now()))
-                        ->where('cpOrderId')->eq($order->cpOrderId)
-                        ->exec();
-                if (!$n) {                                                      # 影响条数应为1
-                    CLog::pay(req()->uid . ' 登录补发订单失败 ' . $order->cpOrderId);
-                    return Resp::err(ErrCode::err_db);              # 数据库操作失败
-                }
-                ctx()->baseInfo->charge_amt += $order->amount;             # 历史充值记录(单位分)
+                $result = pay_op::CheckAndDrawOrder(req()->uid, $order->cpOrderId, array(new PayProc, 'distributePayGoods'));
+                CLog::pay($result);
+                my_Assert($result->err == 0, $result->err);                             # 发货失败
+
                 UserProc::updateUserInfo();                                 # 回写玩家数据
                 CLog::pay(req()->uid . ' 登录补发订单 ' . $order->cpOrderId);
             }
-            return Resp::ok(# 返回
-                            array('cash' => ctx()->baseInfo->cash, #       # 直接将游戏币的最新值返回给客户端
-                                'store' => ctx()->store, #               # 背包
-                                'goods' => $goods, #                                    # 发货内容
-                                'count' => count($orders), #                            # 发货数量
-                                'msg' => "找到并处理" . count($orders) . "条未发货订单."
-            ));
         }
-        return Resp::ok('ok');                                      # everything is ok!
+        return Resp::ok(array(
+                    "ret" => self::$retArr, #                                   # 奖励串
+                    "mod" => '', #                                              # 商品刷新模块名
+                    "baseInfo" => ctx()->baseInfo,
+//                    "shopdata" => $user->shopdata,
+                    "store" => ctx()->store,
+                    'task' => ctx()->task,
+                    'heros' => ctx()->heros,
+                    'privateState' => ctx()->privateState,
+        ));
+//        return Resp::ok('ok');                                      # everything is ok!
     }
 
 // </editor-fold>

+ 18 - 13
Gameserver/App/service_call/pay/Mo/payRequest.php

@@ -106,6 +106,11 @@ class PayRequest extends loyalsoft\Object_ext {
      */
     public $sign;
 
+    /**
+     * @var string 客户端版本号
+     */
+    public $clientVer;
+
     /**
      * @var int 订单编号
      */
@@ -225,21 +230,21 @@ class PayRequest extends loyalsoft\Object_ext {
         }
         $this->callbackInfo = $this->accountId . "," . $this->zoneid;
         if (self::isTest) {
-            $this->amount *= 0.01;  // 也可以改成固定值 0.01, 更省钱些.
+            $this->amount *= 0.01;                                 // 也可以改成固定值 0.01, 更省钱些.
         }
-//        if ($this->channel == "mi") {
-//            $this->amount = 1;
-//        }
+
         if (!self::isTest and $this->amount) {
-//            $this->amount = number_format($this->amount, 2, '.', '');
-//            if ('soft' == $this->channel) {                                     # 2018年1月15号以前固定为1分钱测试
-//                $this->amount = number_format(0.01, 2, '.', '');
-//                $this->product_price = 0.01;
-//            } else  //
-            if ($this->amount != loyalsoft\GameConfig::shop_getItem($this->product_id)->price) {
-//                var_dump($this->product_id);
-//                var_dump(loyalsoft\GameConfig::shop_getItem($this->product_id)->price);
-                \loyalsoft\CLog::pay('金额不符' . $this->amount . " ");
+            new loyalsoft\Req(null);                                            # 初始化
+            \loyalsoft\req()->CV = $this->clientVer;                            # 设定配置数据版本号(2024.12增补)
+//            var_dump(loyalsoft\req()->CV);
+            $itemMo = loyalsoft\GameConfig::shop_getItem($this->product_id);
+
+            if (null != $itemMo && $this->amount != $itemMo->price) {
+                \loyalsoft\CLog::pay($this->product_id);
+//                \loyalsoft\CLog::pay(var_export(loyalsoft\gMem()));
+                \loyalsoft\CLog::pay(loyalsoft\GameConfig::shop_getItem($this->product_id)->price);
+
+                \loyalsoft\CLog::pay('金额不符: ' . $this->amount . " <=> " . $itemMo->price);
                 exit('{"err":1,"msg":"金额不符!"}');
             }
         }

+ 8 - 8
Gameserver/App/service_call/pay/official/pay_op.php

@@ -41,38 +41,38 @@ class pay_op {
      */
     static function CheckAndDrawOrder($uid, $cpOrderId, $deliverFunc) {
         if (!$uid || strlen($cpOrderId) != 19) {                                # 订单编号长19位
-            return Resp::err(1, "参数错误");
+            return Resp::err(ErrCode::pay_order_id, "参数错误");
         }
         $order = daoInst()->select()->from(self::orderTab)                      # 取订单数据
                         ->where('cpOrderId')->eq($cpOrderId)
                         ->limit(1)->fetch();
         if (!$order) {
             CLog::pay(' 订单不存在! ' . $cpOrderId);
-            return Resp::err(2, "订单不存在");
+            return Resp::err(ErrCode::pay_order_no, "订单不存在");
         }
         if (false === strpos($uid, $order->uid)) {                              # UID不符
-            return Resp::err(3, "UID不符");
+            return Resp::err(ErrCode::pay_order_uid, "UID不符");
         }
 
         if ($order->channel != "imitate" #                                      # 校验是否已支付的代码, -- imitate的不校验
                 && $order->status != 1) {                                       # 订单状态
             CLog::pay(' 订单尚未完成支付!');
-            return Resp::err(4, "订单尚未完成支付");
+            return Resp::err(ErrCode::pay_order_paystatus, "订单尚未完成支付");
         }
 
         if ($order->drawed_ts > 0) {                                            # 定单已经发过货了
             CLog::pay(' 订单重复请求发货!' . $cpOrderId);
-            return Resp::err(5, "订单重复请求发货");
+            return Resp::err(ErrCode::pay_order_drawed, "订单重复请求发货");
         }
         if (!is_callable($deliverFunc)) {                                       # 校验回调函数是否可执行
             CLog::pay('发货回调函数不是可执行对象!' . $cpOrderId);
-            return Resp::err(6, "发货函数不可调用!");
+            return Resp::err(ErrCode::pay_fail_nologic, "发货函数不可调用!");
         }
 
         [$bOk, $mod] = call_user_func($deliverFunc, $order);                    # 调用游戏发货逻辑, 要求游戏逻辑返回true/false, $mod
         if (!$bOk) {
             CLog::pay("订单发货失败: $cpOrderId");
-            return Resp::err(7, "游戏发货逻辑执行失败");
+            return Resp::err(ErrCode::pay_fail_logic, "游戏发货逻辑执行失败");
         }
         $n = daoInst()->update(self::orderTab)                                  # 更新订单状态
                 ->data(array('drawed_ts' => now()))
@@ -80,7 +80,7 @@ class pay_op {
                 ->exec();
         if (!$n) {
             CLog::pay("数据库更新订单状态失败: $cpOrderId");
-            return Resp::err(8, "更新订单状态,数据库操作失败");                   # 数据库操作失败
+            return Resp::err(ErrCode::pay_fail_db, "更新订单状态,数据库操作失败");                   # 数据库操作失败
         }
 
         CLog::pay("订单发货成功: $cpOrderId  ( $mod )");

+ 4 - 13
Gameserver/App/test.php

@@ -23,18 +23,9 @@ SelfChecker::checkModules();
 //\loyalsoft\TapDBUtil::TestPay();
 //\loyalsoft\CLog::err("wg");
 //$a = new \sm_activity_tiligift();
-$s = '{"uid":"639743559740E0681F7E0EBBFE60B5C8","cmd":6000,"paras":[false],"ts":1716347687,"zoneid":1,"SN":1,"TK":"","CV":"unityEditor"}';
-new Req($s);
+//$s = '{"uid":"639743559740E0681F7E0EBBFE60B5C8","cmd":6000,"paras":[false],"ts":1716347687,"zoneid":1,"SN":1,"TK":"","CV":"unityEditor"}';
+new Req(null);
 req()->CV = "999.999.999";
-//$arr = GameConfig::waves_getItemArray(FightProc::TowerGateId);
-//var_dump($arr);
+$arr = GameConfig::shop_getItem(8001);
+var_dump($arr);
 
-$bytes = \msgpack_pack(array('age' => 35, 'name' => 'wg'));
-var_dump($bytes);
-$data = file_get_contents('R:/Client');
-
-$obj = \msgpack_unpack($data);
-//var_dump($obj);
-//var_dump(nameof());
-$t =new MsgpackUtil();
-$t->Test();