lizhihui

更新190214版本

Showing 23 changed files with 91 additions and 50 deletions
No preview for this file type
No preview for this file type
......@@ -7,8 +7,8 @@
objects = {
/* Begin PBXBuildFile section */
2622C83022002B3300BF5D56 /* HNYouai.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2622C82F22002B3300BF5D56 /* HNYouai.framework */; };
269F653821B6613F006AEC88 /* HaiBaoJuheSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 269F653721B6613F006AEC88 /* HaiBaoJuheSDK.framework */; };
26DE4C5A22151D3F00327175 /* HNYouai.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26DE4C5922151D3F00327175 /* HNYouai.framework */; };
845D18221C8D778400F27EB9 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 845D181B1C8D778400F27EB9 /* Images.xcassets */; };
846BD2241EE9342700E89A1D /* haibao_setting in Resources */ = {isa = PBXBuildFile; fileRef = 846BD21F1EE9342700E89A1D /* haibao_setting */; };
846BD2261EE9342700E89A1D /* SDKInterface.m in Sources */ = {isa = PBXBuildFile; fileRef = 846BD2231EE9342700E89A1D /* SDKInterface.m */; };
......@@ -59,8 +59,8 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
2622C82F22002B3300BF5D56 /* HNYouai.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = HNYouai.framework; sourceTree = "<group>"; };
269F653721B6613F006AEC88 /* HaiBaoJuheSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = HaiBaoJuheSDK.framework; sourceTree = "<group>"; };
26DE4C5922151D3F00327175 /* HNYouai.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = HNYouai.framework; sourceTree = "<group>"; };
845D181B1C8D778400F27EB9 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = poolsdk_file/poolsdk/Images.xcassets; sourceTree = "<group>"; };
845D181C1C8D778400F27EB9 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = poolsdk_file/poolsdk/Info.plist; sourceTree = "<group>"; };
846BD21F1EE9342700E89A1D /* haibao_setting */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = haibao_setting; path = poolsdk_file/poolsdk/haibao_setting; sourceTree = "<group>"; };
......@@ -109,8 +109,8 @@
8484E5101EE7E29A00B402D1 /* libc++.1.dylib in Frameworks */,
8484E5001EE7E20C00B402D1 /* CFNetwork.framework in Frameworks */,
8484E5061EE7E24A00B402D1 /* CoreMotion.framework in Frameworks */,
2622C83022002B3300BF5D56 /* HNYouai.framework in Frameworks */,
8484E5021EE7E21F00B402D1 /* UIKit.framework in Frameworks */,
26DE4C5A22151D3F00327175 /* HNYouai.framework in Frameworks */,
8484E50C1EE7E27100B402D1 /* CoreGraphics.framework in Frameworks */,
8484E5081EE7E25600B402D1 /* CoreText.framework in Frameworks */,
8484E50E1EE7E28000B402D1 /* QuartzCore.framework in Frameworks */,
......@@ -143,7 +143,7 @@
8476DF641C4DD71D00EC42BA /* poolsdk */ = {
isa = PBXGroup;
children = (
2622C82F22002B3300BF5D56 /* HNYouai.framework */,
26DE4C5922151D3F00327175 /* HNYouai.framework */,
84A090AC1F174E21003D23FB /* TrackingIO.h */,
84A090AA1F160A69003D23FB /* TrackingIO.a */,
846BD21F1EE9342700E89A1D /* haibao_setting */,
......
#import <Foundation/Foundation.h>
#import "OtherSetting.h"
@interface RailwayHaiBaoJuheBaseModel : NSObject
@interface HNYouaiHaiBaoJuheBaseModel : NSObject
- (NSString *)RailwayHaiBaoJuheObjectToJsonString;
- (NSString *)HNYouaiHaiBaoJuheObjectToJsonString;
- (NSMutableString *)paramAddToString;
- (id)initWithDiction:(NSDictionary *)diction;
......
......@@ -11,7 +11,7 @@ typedef NS_ENUM(NSInteger, DGLoggerLevel)
ELogError
};
@interface RailwayHaiBaoJuheDGLogger : NSObject
@interface HNYouaiHaiBaoJuheDGLogger : NSObject
+ (void)showLog:(NSString *)fmt,...;
......
......@@ -15,11 +15,11 @@
- (void)initChecker;
- (void)startCheck:(HaiBaoJuheLoginInfo *)loginInfo;
- (void) createOrder:(HaiBaoJuheCreateOrderInfo *)gzyazfInfo;
- (void) RailwayHaiBaoJuhereportOpen;
- (void) RailwayHaiBaoJuhereportSDKOpen;
- (void)RailwayHaiBaoJuhehandleFirstOpenApp:(NSString*) path;
- (void) HNYouaiHaiBaoJuhereportOpen;
- (void) HNYouaiHaiBaoJuhereportSDKOpen;
- (void)HNYouaiHaiBaoJuhehandleFirstOpenApp:(NSString*) path;
- (void) reportEnter:(HaiBaoJuheReportInfo *)reInfo;
- (void) RailwayHaiBaoJuheReport:(NSString *)_action :(HaiBaoJuheReportInfo *)reInfo;
- (void) HNYouaiHaiBaoJuheReport:(NSString *)_action :(HaiBaoJuheReportInfo *)reInfo;
- (void)sendNotice:(HaiBaoJuheSDKNotificationType)notiType
notiName:(NSString *)notiName
statusCode:(int)nCode
......@@ -28,7 +28,7 @@
- (void)startCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo;
- (void)RailwayHaiBaoJuheStartCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo type:(int)type;
- (void)HNYouaiHaiBaoJuheStartCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo type:(int)type;
/*
*初始化时调用
......
#import "HaiBaoJuheSDK/RailwayHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheCreateOrderInfo : RailwayHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/HNYouaiHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheCreateOrderInfo : HNYouaiHaiBaoJuheBaseModel
@property(nonatomic,strong)NSString *serverId;//服务器ID
@property(nonatomic, strong)NSString *serverName;//服务器名称
......@@ -16,7 +16,7 @@
@property(nonatomic, strong)NSString *userId;//用户ID
@property(nonatomic, strong)NSString *timestamp;//时间戳
- (NSString *) RailwayHaiBaoJuheGetTsign ;
- (NSString *) RailwayHaiBaoJuheGetTimestamp ;
- (NSString *) HNYouaiHaiBaoJuheGetTsign ;
- (NSString *) HNYouaiHaiBaoJuheGetTimestamp ;
@end
......
#import "HaiBaoJuheSDK/RailwayHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheGzyazfInfo : RailwayHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/HNYouaiHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheGzyazfInfo : HNYouaiHaiBaoJuheBaseModel
@property(nonatomic, strong)NSString *serverId;
@property(nonatomic, strong)NSString *queryId;
......
#import "HaiBaoJuheSDK/RailwayHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheLoginInfo : RailwayHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/HNYouaiHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheLoginInfo : HNYouaiHaiBaoJuheBaseModel
@property(nonatomic,strong)NSString *timestamp;
@property(nonatomic, strong)NSString *sign;
......
//
// RailwayHaiBaoJuheReportInfo.h
// HNYouaiHaiBaoJuheReportInfo.h
// HaiBaoJuheSDK
//
// Created by winFan on 12/21/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import "HaiBaoJuheSDK/RailwayHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheReportInfo : RailwayHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/HNYouaiHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheReportInfo : HNYouaiHaiBaoJuheBaseModel
@property(nonatomic, strong)NSString *reportType;//类型
@property(nonatomic, strong)NSString *playerId;//玩家ID
......
......@@ -4,7 +4,7 @@
@interface HaiBaoJuheUtils : NSObject
+(NSString *)md5:(NSString *)str;
+ (NSDictionary *)RailwayHaiBaoJuheDictionaryWithJsonString:(NSString *)jsonString;
+ (NSDictionary *)HNYouaiHaiBaoJuheDictionaryWithJsonString:(NSString *)jsonString;
+(NSString *)createGzyazfOrderUrl;
//*充值回调地址
+(NSString *)createGzyazfUrl;
......
......@@ -10,7 +10,7 @@
@property(assign) BOOL HNYouaiYouYuanJiao;
- (void)HNYouaiSettingCKAssetsView:(int)webViewWidth :(int) webViewHeight :(int) screenwidth :(int) screenHeight;
- (void)HNYouaiSettingHNYouaiView:(int)webViewWidth :(int) webViewHeight :(int) screenwidth :(int) screenHeight;
- (void)HNYouaiChuShiHuaWebView;
- (void)loadWebPageWithString:(NSString *)url;
- (void)loadWebPageWithJs:(NSString *)content;
......
......@@ -5,7 +5,7 @@
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>DEMO</string>
<string>南游爱DEMO</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
......
......@@ -12,6 +12,7 @@
int mExchange;
NSString *HNYouaiAppId;
NSString *HNYouaiAppKey;
NSString *HNYouaiLeakOrderUrl;
- (void)SDKinit:(UIViewController *) control
{
......@@ -81,35 +82,35 @@ NSString *HNYouaiAppKey;
- (void)HCKAssetsToolCallBack:(NSNotification *)notification
{
NSDictionary* payResultDic = notification.object;
NSString* receiptStr = [payResultDic objectForKey:@"HNYouaiToolResult"];
NSString* queryId = [payResultDic objectForKey:@"query_id"];
NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil];
NSString* result = [[NetCenter getInstance] httpPostSyn:[HaiBaoJuheUtils createGzyazfUrl] :receiptDic];
//收到回调,保存queryid和data
NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
NSMutableArray* queryIdArray = [userDefaults objectForKey:@"queryIds"];
NSMutableArray* tempQueryIdArray = [[NSMutableArray alloc] initWithCapacity:10];
if (queryIdArray) {
}else{
queryIdArray = [[NSMutableArray alloc]initWithCapacity:10];
}
for (NSString* arrayQueryId in queryIdArray) {
[tempQueryIdArray addObject:arrayQueryId];
}
[tempQueryIdArray addObject:queryId];
[userDefaults setObject:tempQueryIdArray forKey:@"queryIds"];
[userDefaults setObject:receiptStr forKey:queryId];
NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil];
NSString* result = [[NetCenter getInstance] httpPostSyn:HNYouaiLeakOrderUrl :receiptDic];
if([@"success" isEqualToString:result]){//确认订单成功
}else{//失败
NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
NSMutableArray* queryIdArray = [userDefaults objectForKey:@"queryIds"];
NSMutableArray* tempQueryIdArray = [[NSMutableArray alloc] initWithCapacity:10];
if (queryIdArray) {
}else{
queryIdArray = [[NSMutableArray alloc]initWithCapacity:10];
}
for (NSString* arrayQueryId in queryIdArray) {
[tempQueryIdArray addObject:arrayQueryId];
}
[tempQueryIdArray addObject:queryId];
//删除已保存的
[userDefaults removeObjectForKey:queryId];
[tempQueryIdArray removeObject:queryId];
[userDefaults setObject:tempQueryIdArray forKey:@"queryIds"];
[userDefaults setObject:receiptStr forKey:queryId];
[userDefaults synchronize];
[userDefaults removeObjectForKey:@"lastqueryid"];
}
[userDefaults synchronize];
}
/**
......@@ -117,8 +118,38 @@ NSString *HNYouaiAppKey;
*/
- (void)SDKgzyazfWithGzyazfmentInfo:(HaiBaoJuheCreateOrderInfo *)payInfo
{
NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
NSString* lastqueryid = [userDefaults objectForKey:@"lastqueryid"];
HNYouaiLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
[HaiBaoJuheUtils createGzyazfUrl],
[payInfo userId],
[payInfo playerId]];
[userDefaults setObject:HNYouaiLeakOrderUrl forKey:@"lastHNYouaiLeakOrderUrl"];
if (lastqueryid!=nil) {
//创建订单前进行补单
NSData* receiptData = [NSData dataWithContentsOfURL:[[NSBundle mainBundle] appStoreReceiptURL]];
NSString* receiptStr = [receiptData base64EncodedStringWithOptions:NSDataBase64Encoding64CharacterLineLength];
if (receiptStr!=nil) {
receiptStr = [receiptStr stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
//如果不为空,进行最后一次补单
NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",lastqueryid,@"query_id", nil];
NSString* result = [[NetCenter getInstance] httpPostSyn:HNYouaiLeakOrderUrl :receiptDic];
if([@"success" isEqualToString:result]){//确认订单成功
//删除已保存的
[userDefaults removeObjectForKey:@"lastqueryid"];
}
}
}
mExchange = [payInfo exchange].intValue;
[super SDKgzyazfWithGzyazfmentInfo:payInfo];
HNYouaiLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
[HaiBaoJuheUtils createGzyazfUrl],
[payInfo userId],
[payInfo playerId]];
[userDefaults synchronize];
}
/**
......@@ -181,7 +212,13 @@ NSString *HNYouaiAppKey;
for (NSString* queryId in queryIdArray) {
NSString* receiptStr = [userDefaults valueForKey:queryId];
NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil];
NSString* result = [[NetCenter getInstance] httpPostSyn:[HaiBaoJuheUtils createGzyazfUrl] :receiptDic];
NSString* lastHNYouaiLeakOrderUrl = [userDefaults objectForKey:@"lastHNYouaiLeakOrderUrl"];
NSString* result;
if (lastHNYouaiLeakOrderUrl!=nil) {
result = [[NetCenter getInstance] httpPostSyn:lastHNYouaiLeakOrderUrl :receiptDic];
}else{
result = [[NetCenter getInstance] httpPostSyn:[HaiBaoJuheUtils createGzyazfUrl] :receiptDic];
}
if([@"success" isEqualToString:result]){//成功
[userDefaults removeObjectForKey:queryId];
}else{//补单失败
......@@ -219,6 +256,10 @@ NSString *HNYouaiAppKey;
[[HNYouaiAllManager HNYouaiInstance] HNYouaiQuery:serverId :roleName :amount :[payInfo queryId] :self.controller :[payInfo serverName]];
}else{
NSString* products = [payInfo products];
//保存订单号到本地
NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
[userDefaults setObject:queryId forKey:@"lastqueryid"];
[userDefaults synchronize];
[[HNYouaiAllManager HNYouaiInstance] HNYouaiQueryOperation:self.controller HNYouaiHuoWuID:products HNYouaiJiaGe:[payInfo postAmount] HNYouaiHuoWuMing:[payInfo productName] HNYouaiDingDanHao:queryId];
}
}
......
......@@ -10,9 +10,9 @@
7、``` 所有接口PoolSdk 替换成 HaiBaoJuheSDK(如不理解可以参考demo或者详细文档) ``` <br>
已更新 海豹聚合SDK 2018年12月05日版本 快速更新到 2019年01月25日版本方法<br>
已更新 海豹聚合SDK 2018年12月05日版本 快速更新到 2019年02月14日版本方法<br>
1、``` 删除poolsdk_file文件夹中原来framework ``` <br>
2、``` 引入poolsdk_file文件夹中Railway.framework ``` <br>
2、``` 引入poolsdk_file文件夹中HNYouai.framework ``` <br>
3、``` 替换SDKInterface.m文件 ``` <br>
4、``` 替换HaiBaoJuheSDK.framework ``` <br>
5、``` 原 URL Schemes 中的 i9133public 改为 sdk.uuufish.com (可参考demo中info设置) ``` <br>
\ No newline at end of file
......
No preview for this file type