123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?php
- /**
- * GameUtils.php UTF-8
- * 游戏面板
- *
- * @date : 2018/4/27 21:32
- *
- * @license 这不是一个自由软件,未经授权不许任何使用和传播。
- * @author : wuyonghong <wyh@huosdk.com>
- * @version : HUOSDK 8.0
- */
- namespace huolib\utils;
- use huolib\constant\GameConst;
- use huolib\status\DeviceStatus;
- use huolib\status\GameStatus;
- class GameUtils {
- /**
- * 校验SDK订单
- *
- * @param array $game_data
- *
- * @return int
- */
- public static function checkGame($game_data = []) {
- if (empty($game_data)) {
- return DeviceStatus::INVALID_PARAMS;
- }
- return DeviceStatus::NO_ERROR;
- }
- /**
- * 校验支付方式
- *
- * @param int $server_type
- *
- * @return int
- */
- public static function checkServerType($server_type = 0) {
- if (empty($server_type)) {
- return GameStatus::NO_ERROR;
- }
- $_rs = GameConst::getServerMsg($server_type);
- if (false == $_rs) {
- return GameStatus::SERVER_TYPE_ERROR;
- }
- return GameStatus::NO_ERROR;
- }
- }
|