lizhihui

更新190214版本

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