123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395 |
- <?php
- /**
- * AppleParamConfusion-php UTF-8
- * 苹果ios切换版本混淆表
- *
- * @date : 2018/6/11 22:24
- *
- * @license 这不是一个自由软件,未经授权不许任何使用和传播。
- * @author : liuhongliang <lhl@huosdk-com>
- * @version : HUOOA 1-0
- */
- namespace huolib\constant;
- class AppleParamConfusion {
- /***
- * 客户端服务端配对 第一版
- * 客服端key => 服务端 key
- */
- public $confusion
- = [
- 'ts' => 'ts',
- 'apple_id' => 'apple_id',
- 'sign' => 'sign',
- 'token' => 'token',
- 'game' => 'game',
- 'game-pkg_name' => 'game-pkg_name',
- 'game-app_ver' => 'game-app_ver',
- 'game-h_ver' => 'game-h_ver',
- 'game-sdk_ver' => 'game-sdk_ver',
- 'game-build_id' => 'game-build_id',
- 'agent' => 'agent',
- 'agent-ch' => 'agent-ch',
- 'agent-sub_ch' => 'agent-sub_ch',
- 'device' => 'device',
- 'device-device_id' => 'device-device_id',
- 'device-mac' => 'device-mac',
- 'device-ip' => 'device-ip',
- 'device-brand' => 'device-brand',
- 'device-model' => 'device-model',
- 'device-os' => 'device-os',
- 'device-os_version' => 'device-os_version',
- 'device-screen' => 'device-screen',
- 'device-net' => 'device-net',
- 'device-imsi' => 'device-imsi',
- 'device-longitude' => 'device-longitude',
- 'device-latitude' => 'device-latitude',
- 'device-userua' => 'device-userua',
- 'open_cnt' => 'open_cnt',
- 'mem-username' => 'mem-username',
- 'mem-password' => 'mem-password',
- 'mem_id' => 'mem_id',
- 'cp_user_token' => 'cp_user_token',
- 'agentgame' => 'agentgame',
- 'user_token' => 'user_token',
- 'float_status' => 'float_status',
- 'float_image' => 'float_image',
- 'is_bind' => 'is_bind',
- 'sms-type' => 'sms-type',
- 'sms-mobile' => 'sms-mobile',
- 'sms-code' => 'sms-code',
- 'role' => 'role',
- 'role-event' => 'role-event',
- 'role-server_id' => 'role-server_id',
- 'role-server_name' => 'role-server_name',
- 'role-role_id' => 'role-role_id',
- 'role-role_name' => 'role-role_name',
- 'role-role_level' => 'role-role_level',
- 'role-role_vip' => 'role-role_vip',
- 'role-onlineTime' => 'role-onlineTime',
- 'role-scene' => 'role-scene',
- 'role-axis' => 'role-axis',
- 'order' => 'order',
- 'order-currency' => 'order-currency',
- 'order-cp_order_id' => 'order-cp_order_id',
- 'order-product_price' => 'order-product_price',
- 'order-product_id' => 'order-product_id',
- 'order-product_name' => 'order-product_name',
- 'order-product_desc' => 'order-product_desc',
- 'order-order_id' => 'order-order_id',
- 'order-ext' => 'order-ext',
- 'order-receipt_data' => 'order-receipt_data',
- 'order-trans_id' => 'order-trans_id',
- 'order-sandbox' => 'order-sandbox',
- 'order_id' => 'order_id',
- 'check' => 'check',
- 'pay_token' => 'pay_token',
- 'pay_url' => 'pay_url',
- 'product_name' => 'product_name',
- 'product_price' => 'product_price',
- 'real_amount' => 'real_amount',
- 'ptb_cnt' => 'ptb_cnt',
- 'ptb_rate' => 'ptb_rate',
- 'gm_cnt' => 'gm_cnt',
- 'gm_rate' => 'gm_rate',
- 'benefit_type' => 'benefit_type',
- 'pay_type' => 'pay_type',
- 'pay_type-name' => 'pay_type-name',
- 'pay_type-mem_rate' => 'pay_type-mem_rate',
- 'pay_type-rebate_cnt' => 'pay_type-rebate_cnt',
- 'pay_type-icon' => 'pay_type-icon',
- 'pay_type-payway' => 'pay_type-payway',
- 'pay_type-url' => 'pay_type-url',
- 'status' => 'status',
- 'cp_status' => 'cp_status',
- 'is_native' => 'is_native',
- 'product_id' => 'product_id',
- 'trans_id' => 'trans_id',
- 'receipt_data' => 'receipt_data',
- 'sandbox' => 'sandbox',
- 'username' => 'username',
- 'nickname' => 'nickname',
- 'last_login_time' => 'last_login_time',
- 'last_login_game' => 'last_login_game',
- 'mobile' => 'mobile',
- 'email' => 'email',
- 'from' => 'from',
- 'device-info' => 'device-info',
- 'device-idfv' => 'device-idfv',
- 'device-idfa' => 'device-idfa',
- 'event-event' => 'event-event',
- 'event-status' => 'event-status',
- 'event-context' => 'event-context',
- 'crash-active' => 'crash-active',
- 'crash-msg' => 'crash-msg',
- 'device-disk_space' => 'device-disk_space',
- 'device-open_time' => 'device-open_time',
- 'device-is_charge' => 'device-is_charge',
- 'device-screen_luminance' => 'device-screen_luminance',
- 'device-has_sim' => 'device-has_sim',
- 'device-is_break' => 'device-is_break',
- ];
- /***
- * 客户端服务端配对 第二版
- * 客服端key => 服务端 key
- */
- private $new_confusion
- = [
- 'ts' => 'ts',
- 'apple_id' => 'apple_id',
- 'sign' => 'sign',
- 'tk' => 'token',
- 'gm' => 'game',
- 'gm-pkg' => 'game-pkg_name',
- 'gm-aver' => 'game-app_ver',
- 'gm-hver' => 'game-h_ver',
- 'gm-sver' => 'game-sdk_ver',
- 'gm-bid' => 'game-build_id',
- 'ag' => 'agent',
- 'ag-ch' => 'agent-ch',
- 'ag-sub_ch' => 'agent-sub_ch',
- 'dv' => 'device',
- 'dv-ida' => 'device-device_id',
- 'dv-mc' => 'device-mac',
- 'dv-ip' => 'device-ip',
- 'dv-brd' => 'device-brand',
- 'dv-md' => 'device-model',
- 'dv-os' => 'device-os',
- 'dv-osv' => 'device-os_version',
- 'dv-scr' => 'device-screen',
- 'dv-net' => 'device-net',
- 'dv-imsi' => 'device-imsi',
- 'dv-lot' => 'device-longitude',
- 'dv-lat' => 'device-latitude',
- 'dv-ua' => 'device-userua',
- 'opct' => 'open_cnt',
- 'mem-uname' => 'mem-username',
- 'mem-pwd' => 'mem-password',
- 'mid' => 'mem_id',
- 'cutk' => 'cp_user_token',
- 'agm' => 'agentgame',
- 'utk' => 'user_token',
- 'fs' => 'float_status',
- 'fimg' => 'float_image',
- 'isb' => 'is_bind',
- 'sms-tp' => 'sms-type',
- 'sms-mb' => 'sms-mobile',
- 'sms-cd' => 'sms-code',
- 'rl' => 'role',
- 'rl-ev' => 'role-event',
- 'rl-sd' => 'role-server_id',
- 'rl-sn' => 'role-server_name',
- 'rl-rd' => 'role-role_id',
- 'rl-rn' => 'role-role_name',
- 'rl-rl' => 'role-role_level',
- 'rl-rv' => 'role-role_vip',
- 'rl-ont' => 'role-onlineTime',
- 'rl-sc' => 'role-scene',
- 'rl-ax' => 'role-axis',
- 'ord' => 'order',
- 'ord-cry' => 'order-currency',
- 'ord-coi' => 'order-cp_order_id',
- 'ord-pp' => 'order-product_price',
- 'ord-pi' => 'order-product_id',
- 'ord-pn' => 'order-product_name',
- 'ord-pd' => 'order-product_desc',
- 'ord-oi' => 'order-order_id',
- 'ord-ext' => 'order-ext',
- 'ord-recedt' => 'order-receipt_data',
- 'ord-trid' => 'order-trans_id',
- 'ord-sandbox' => 'order-sandbox',
- 'oi' => 'order_id',
- 'cc' => 'check',
- 'pt' => 'pay_token',
- 'pul' => 'pay_url',
- 'pn' => 'product_name',
- 'pp' => 'product_price',
- 'ram' => 'real_amount',
- 'pcnt' => 'ptb_cnt',
- 'prt' => 'ptb_rate',
- 'gcnt' => 'gm_cnt',
- 'grt' => 'gm_rate',
- 'bftp' => 'benefit_type',
- 'pyyp' => 'pay_type',
- 'pyyp-nm' => 'pay_type-name',
- 'pyyp-mrt' => 'pay_type-mem_rate',
- 'pyyp-rbcn' => 'pay_type-rebate_cnt',
- 'pyyp-ic' => 'pay_type-icon',
- 'pyyp-py' => 'pay_type-payway',
- 'pyyp-ul' => 'pay_type-url',
- 'stt' => 'status',
- 'cstt' => 'cp_status',
- 'isnt' => 'is_native',
- 'pdid' => 'product_id',
- 'trid' => 'trans_id',
- 'recedt' => 'receipt_data',
- 'sandbox' => 'sandbox',
- 'urnm' => 'username',
- 'nknm' => 'nickname',
- 'lalt' => 'last_login_time',
- 'lalg' => 'last_login_game',
- 'mb' => 'mobile',
- 'eml' => 'email',
- 'from' => 'from',
- 'dv-info' => 'device-info',
- 'dv-idfv' => 'device-idfv',
- 'dv-idfa' => 'device-idfa',
- 'ev-ev' => 'event-event',
- 'ev-stt' => 'event-status',
- 'ev-ctt' => 'event-context',
- 'cr-act' => 'crash-active',
- 'cr-msg' => 'crash-msg',
- 'dv-disk_space' => 'device-disk_space',
- 'dv-open_time' => 'device-open_time',
- 'dv-is_charge' => 'device-is_charge',
- 'dv-screen_luminance' => 'device-screen_luminance',
- 'dv-has_sim' => 'device-has_sim',
- 'dv-is_break' => 'device-is_break',
- ];
- /***
- * 客户端需转换新的 配置
- * 旧的key=>新的key
- */
- public $replace_confusion
- = [
- 'ts' => 'ts',
- 'apple_id' => 'apple_id',
- 'sign' => 'sign',
- 'token' => 'tk',
- 'game' => 'gm',
- 'game-pkg_name' => 'gm-pkg',
- 'game-app_ver' => 'gm-aver',
- 'game-h_ver' => 'gm-hver',
- 'game-sdk_ver' => 'gm-sver',
- 'game-build_id' => 'gm-bid',
- 'agent' => 'ag',
- 'agent-ch' => 'ag-ch',
- 'agent-sub_ch' => 'ag-sub_ch',
- 'device' => 'dv',
- 'device-device_id' => 'dv-ida',
- 'device-mac' => 'dv-mc',
- 'device-ip' => 'dv-ip',
- 'device-brand' => 'dv-brd',
- 'device-model' => 'dv-md',
- 'device-os' => 'dv-os',
- 'device-os_version' => 'dv-osv',
- 'device-screen' => 'dv-scr',
- 'device-net' => 'dv-net',
- 'device-imsi' => 'dv-imsi',
- 'device-longitude' => 'dv-lot',
- 'device-latitude' => 'dv-lat',
- 'device-userua' => 'dv-ua',
- 'open_cnt' => 'opct',
- 'mem-username' => 'mem-uname',
- 'mem-password' => 'mem-pwd',
- 'mem_id' => 'mid',
- 'cp_user_token' => 'cutk',
- 'agentgame' => 'agm',
- 'user_token' => 'utk',
- 'float_status' => 'fs',
- 'float_image' => 'fimg',
- 'is_bind' => 'isb',
- 'sms-type' => 'sms-tp',
- 'sms-mobile' => 'sms-mb',
- 'sms-code' => 'sms-cd',
- 'role' => 'rl',
- 'role-event' => 'rl-ev',
- 'role-server_id' => 'rl-sd',
- 'role-server_name' => 'rl-sn',
- 'role-role_id' => 'rl-rd',
- 'role-role_name' => 'rl-rn',
- 'role-role_level' => 'rl-rl',
- 'role-role_vip' => 'rl-rv',
- 'role-onlineTime' => 'rl-ont',
- 'role-scene' => 'rl-sc',
- 'role-axis' => 'rl-ax',
- 'order' => 'ord',
- 'order-currency' => 'ord-cry',
- 'order-cp_order_id' => 'ord-coi',
- 'order-product_price' => 'ord-pp',
- 'order-product_id' => 'ord-pi',
- 'order-product_name' => 'ord-pn',
- 'order-product_desc' => 'ord-pd',
- 'order-order_id' => 'ord-oi',
- 'order-ext' => 'ord-ext',
- 'order-receipt_data' => 'ord-recedt',
- 'order-trans_id' => 'ord-trid',
- 'order-sandbox' => 'ord-sandbox',
- 'order_id' => 'oi',
- 'check' => 'cc',
- 'pay_token' => 'pt',
- 'pay_url' => 'pul',
- 'product_name' => 'pn',
- 'product_price' => 'pp',
- 'real_amount' => 'ram',
- 'ptb_cnt' => 'pcnt',
- 'ptb_rate' => 'prt',
- 'gm_cnt' => 'gcnt',
- 'gm_rate' => 'grt',
- 'benefit_type' => 'bftp',
- 'pay_type' => 'pyyp',
- 'pay_type-name' => 'pyyp-nm',
- 'pay_type-mem_rate' => 'pyyp-mrt',
- 'pay_type-rebate_cnt' => 'pyyp-rbcnt',
- 'pay_type-icon' => 'pyyp-ic',
- 'pay_type-payway' => 'pyyp-py',
- 'pay_type-url' => 'pyyp-ul',
- 'status' => 'stt',
- 'cp_status' => 'cstt',
- 'is_native' => 'isnt',
- 'product_id' => 'pdid',
- 'trans_id' => 'trid',
- 'receipt_data' => 'recedt',
- 'sandbox' => 'sandbox',
- 'username' => 'urnm',
- 'nickname' => 'nknm',
- 'last_login_time' => 'lalt',
- 'last_login_game' => 'lalg',
- 'mobile' => 'mb',
- 'email' => 'eml',
- 'from' => 'from',
- 'device-info' => 'info',
- 'device-idfv' => 'idfv',
- 'device-idfa' => 'idfa',
- 'event-event' => 'ev-ev',
- 'event-status' => 'ev-stt',
- 'event-context' => 'ev-ctt',
- 'crash-active' => 'cr-act',
- 'crash-msg' => 'cr-msg',
- 'device-disk_space' => 'dv-disk_space',
- 'device-open_time' => 'dv-open_time',
- 'device-is_charge' => 'dv-is_charge',
- 'device-screen_luminance' => 'dv-screen_luminance',
- 'device-has_sim' => 'dv-has_sim',
- 'device-is_break' => 'dv-is_break',
- ];
- /***
- * 服务器获取现用key
- */
- public function getConfusion() {
- $_data = [];
- $_new_data = [];
- // foreach ($this->confusion as $_k => $_v) {
- // $_data['v8ios_'.$_k.'_v8ios'] = $_v;
- // }
- foreach ($this->new_confusion as $_k => $_v) {
- $_new_data['sdkios_'.$_k.'_sdkios'] = $_v;
- }
- //$_data = array_merge($_data, $_new_data);
- return $_new_data;
- }
- /**
- * 返回用于客户端替换
- */
- public function getReConfusion() {
- $_data = [];
- foreach ($this->replace_confusion as $_k => $_v) {
- $_data['v8ios_'.$_k.'_v8ios'] = 'sdkios_'.$_v.'_sdkios';
- }
- return $_data;
- }
- }
|