xuguohong

服务端文档更新

No preview for this file type
......@@ -8,6 +8,8 @@
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface PoolUtils : NSObject
+(NSString *)md5:(NSString *)str;
......@@ -15,4 +17,8 @@
+(NSString *)createPayOrderUrl;
//*充值回调地址
+(NSString *)createPayUrl;
+(UIActivityIndicatorView *)showLoadingDialog:(UIView*)parentView;
+(void)dismissLoadingDialog:(UIActivityIndicatorView*)indicatorView;
@end
\ No newline at end of file
......
import shutil
import os
import plistlib
import config
import json
import packageProj
from mod_pbxproj import XcodeProject
gameProjName = config.gameProjName
channelName = "bingxue"
#copy dir xcodeproj
copyNewDirName = gameProjName + '_' + channelName + '.xcodeproj'
currentPath = os.path.abspath('.')
currentPath += '/' + copyNewDirName
if os.path.exists(currentPath):
shutil.rmtree(currentPath)
shutil.copytree(gameProjName + '.xcodeproj',currentPath)
project = XcodeProject.Load(copyNewDirName + '/project.pbxproj')
project.add_other_ldflags('-ObjC')
#frameworks = project.add_folder('poolsdk_file/poolsdk_itools')
#print(frameworks);
#add search path
channelRootPath = config.channelRootPath#'poolsdk_file'
frameworksPath = '$(PROJECT_DIR)/' + channelRootPath + '/poolsdk_' + channelName + '/SDK'
print(frameworksPath);
#add header search path
project.add_header_search_paths(frameworksPath, recursive=False)
#add framework search path
project.add_framework_search_paths(frameworksPath, recursive=False)
#add library search path
project.add_library_search_paths(frameworksPath, recursive=False)
#add poolsdk_xy dir all file into project
project.remove_group_by_name('poolsdk')
frameworkRelativePath = project.add_folder(channelRootPath + '/poolsdk_' + channelName + '/SDK')
#add sdk lib framework
#project.add_file_if_doesnt_exist('XYPlatform.framework',parent=frameworkRelativePath, weak=True)
#project.add_file_if_doesnt_exist('XYPlatformResources.bundle',parent=frameworkRelativePath, weak=True)
#remove demo file and replace sdk file
#project.remove_file_by_path('poolsdk_file/Demo')
#project.remove_group_by_name('poolsdk_file')
#project.add_file_if_doesnt_exist('PoolSdk.h',parent=frameworkRelativePath, weak=True)
#project.add_file_if_doesnt_exist('PoolSdk.m',parent=frameworkRelativePath, weak=True)
#project.add_file_if_doesnt_exist('SDKInterface.h',parent=frameworkRelativePath, weak=True)
#project.add_file_if_doesnt_exist('SDKInterface.m',parent=frameworkRelativePath, weak=True)
#ignore_unknown_type
project.add_file_if_doesnt_exist('pool_setting',parent=frameworkRelativePath, weak=True,ignore_unknown_type=True)
systemFrameworks = project.get_or_create_group('Frameworks')
#add system framework
project.add_file_if_doesnt_exist('System/Library/Frameworks/CoreTelephony.framework',parent=systemFrameworks, weak=True, tree='SDKROOT')
project.add_file_if_doesnt_exist('System/Library/Frameworks/SystemConfiguration.framework',parent=systemFrameworks, weak=True, tree='SDKROOT')
#add system dylib
systemLibs = project.get_or_create_group('Libraries')
project.add_file_if_doesnt_exist('/usr/lib/libsqlite3.dylib',parent=systemLibs, weak=True, tree='<absolute>')#absolute path
#modify info.plist reference path
project.add_single_valued_flag('INFOPLIST_FILE',channelRootPath + '/poolsdk_' + channelName + '/Info.plist')
project.add_single_valued_flag('ENABLE_BITCODE', 'NO')
readInfoPlistFilePath = channelRootPath + '/poolsdk/Info.plist'
writeInfoFilePath = channelRootPath + '/poolsdk_' + channelName + '/Info.plist'
infoContent = plistlib.readPlist(readInfoPlistFilePath)
xyInfoPath = channelRootPath + '/poolsdk_' + channelName + '/Info_' + channelName + '.plist'
xyInfoContent = plistlib.readPlist(xyInfoPath)
#read pool_setting file
settingFile = open(channelRootPath + '/poolsdk_' + channelName + '/SDK/pool_setting','rw')
try:
settingFileContent = settingFile.read( )
finally:
settingFile.close( )
#json op
jsonStr = json.loads(settingFileContent)
#modify bundle id
project.add_single_valued_flag('PRODUCT_BUNDLE_IDENTIFIER',jsonStr["appScheme"])
#update and add info.plist content
infoContent.update(xyInfoContent)
#write
plistlib.writePlist(infoContent,writeInfoFilePath)
project.save()
packageProj.buildProjName = gameProjName + '_' + channelName
packageProj.targetName = gameProjName
packageProj.buildProj()
No preview for this file type
No preview for this file type
No preview for this file type
......@@ -7,13 +7,15 @@
userType | int | 用户类型 ID(渠道类型,兼容以 前帐号体系)
openId | string | 平台渠道方返回用户ID
timestamp | string | 时间戳,公共SDK发送到客户端的参数timestamp, 服务端可以判断 timestamp 是否 在有效的登录时间内
serverSign | string | 验证密钥,公共 SDK 发送到 客户端的参数 serverSign,加密串:gameAppkey=%s&userType=% s&openId=%s&timestamp=%s注意:(游戏测试验证时 gameAppkey 默认值为 fytx_onlie#@12&34 进行验证, 出正式母包时改为游戏本身的gameAppkey值)
serverSign | string | 验证密钥,公共 SDK 发送到 客户端的参数 serverSign,加密串:gameAppkey=%s&userType=% s&openId=%s&timestamp=%s注意:(改为游戏本身的gameAppkey值)
验证方式:
serverSign=MD5(gameAppkey=%s&userType=%s&openId=%s&timestamp=%s) 如:
md5("gameAppkey=xxxx&userType=1&openId=123&timestamp=111111111111")
gameAppkey : 在公共SDK后台的 Md5加密的KEY
`注意!CP必须要以userType+openId保证帐号唯一性`
### 2. 充值验证(通知游戏方发货)
公共SDK服务器接收到渠道服务器充值回调,对回调进行 MD5 验证,如果验证通过, 则采用Post方式马上回调给游戏充值服务器,否则不会回调充值服务器,然后再返回 信息给渠道服务器。回调参数如下:
参数 | 类型 | 描述
......@@ -24,16 +26,21 @@ orderId | string | 渠道方订单 ID
payAmount | double | 充值金额(如有商品 ID,此值为商 品的金额)
currency | string | 充值货币(CNY:人民币)
goodsId | string | 商品ID,参数对一些有商品列表 的充值有效
goodsName | string | 客户端充值 IP
goodsName | string | 商品名称
remoteIp | string | 客户端充值 IP
custom | string | 透传参数 ,长度 512
serverSign | string | 发给充值服务器验证的注意:(游戏测试验证时 gameAppkey 默认值为fytx_onlie#@12&34 进行验证, 出正式母包时改为游戏本身的 gameAppkey 值)
serverSign | string | 发给充值服务器验证的注意:(改为游戏本身的 gameAppkey 值)
uId | string | 平台渠道帐号 ID
gameSimpleName | string | 公告SDK后台游戏
sdkSimpleName | string | 平台渠道代号
queryId | string | 公共SDK订单号
gameSimpleName | string | 平台SDK后台游戏代号
sdkSimpleName | string | 平台SDK代号
queryId | string | 平台SDK订单号
postTime | string | 订单创建时间戳
验证方式:
serverSign=MD5(serverId=%s&playerId=%s&orderId=%s&gameAppKe y=%s)%s:为相应的值
旧:serverSign=MD5(serverId=%s&playerId=%s&orderId=%s&gameAppKey=%s)
升级:sign=Md5('serverId=%s&playerId=%s&orderId=%s&payAmount=%s&goodsId=%s&sdkSimpleName=%s&gameAppKey=%s')
%s:为相应的值
gameAppkey : 在公共SDK后台的Md5加密的KEY
验证通过后,返回公共 SDK 服务器数据,数据格式:{"code":0,"message":"无订 单"}。code:0 表示失败,1 表示成功,message:描述原因。
\ No newline at end of file
验证通过后,返回公共 SDK 服务器数据,数据格式:{"code":0,"message":"无订 单"}。code:0 表示失败,1 表示成功,message:描述原因。
`注意!CP必须要以orderId+sdkSimpleName保证订单唯一性,建议使用sign验证`
\ No newline at end of file
......
......@@ -8,6 +8,8 @@
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface PoolUtils : NSObject
+(NSString *)md5:(NSString *)str;
......@@ -15,4 +17,8 @@
+(NSString *)createPayOrderUrl;
//*充值回调地址
+(NSString *)createPayUrl;
+(UIActivityIndicatorView *)showLoadingDialog:(UIView*)parentView;
+(void)dismissLoadingDialog:(UIActivityIndicatorView*)indicatorView;
@end
\ No newline at end of file
......
2017-09-28:<br>
1、open事件添加idfa参数处理
2017-07-12:<br>
1、完善接口,生命周期接口添加,添加登录代理回调,订单创建回调字段添加,角色数据提交字段添加
......