lizhihui

update

Showing 90 changed files with 886 additions and 410 deletions
No preview for this file type
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
7 objects = { 7 objects = {
8 8
9 /* Begin PBXBuildFile section */ 9 /* Begin PBXBuildFile section */
10 - 2692FA5A21FFFDF900371736 /* Resident.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2692FA5921FFFDF900371736 /* Resident.framework */; }; 10 + 265B2A59228015D600F193F4 /* Reluctant.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 265B2A58228015D600F193F4 /* Reluctant.framework */; };
11 269897F921A54A6500E0AE84 /* PoolSdk.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 269897F821A54A6500E0AE84 /* PoolSdk.framework */; }; 11 269897F921A54A6500E0AE84 /* PoolSdk.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 269897F821A54A6500E0AE84 /* PoolSdk.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 /* public_setting in Resources */ = {isa = PBXBuildFile; fileRef = 846BD21F1EE9342700E89A1D /* public_setting */; }; 13 + 846BD2241EE9342700E89A1D /* pool_setting in Resources */ = {isa = PBXBuildFile; fileRef = 846BD21F1EE9342700E89A1D /* pool_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 */; };
15 847EE5E21EE9007E003A4B7B /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 847EE5E11EE9007E003A4B7B /* MainViewController.m */; }; 15 847EE5E21EE9007E003A4B7B /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 847EE5E11EE9007E003A4B7B /* MainViewController.m */; };
16 8484E4F51EE7E0DC00B402D1 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8484E4F21EE7E0DC00B402D1 /* AppDelegate.m */; }; 16 8484E4F51EE7E0DC00B402D1 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8484E4F21EE7E0DC00B402D1 /* AppDelegate.m */; };
...@@ -59,11 +59,11 @@ ...@@ -59,11 +59,11 @@
59 /* End PBXCopyFilesBuildPhase section */ 59 /* End PBXCopyFilesBuildPhase section */
60 60
61 /* Begin PBXFileReference section */ 61 /* Begin PBXFileReference section */
62 - 2692FA5921FFFDF900371736 /* Resident.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Resident.framework; sourceTree = "<group>"; }; 62 + 265B2A58228015D600F193F4 /* Reluctant.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Reluctant.framework; sourceTree = "<group>"; };
63 269897F821A54A6500E0AE84 /* PoolSdk.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = PoolSdk.framework; sourceTree = "<group>"; }; 63 269897F821A54A6500E0AE84 /* PoolSdk.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = PoolSdk.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 /* public_setting */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = public_setting; path = poolsdk_file/poolsdk/public_setting; sourceTree = "<group>"; }; 66 + 846BD21F1EE9342700E89A1D /* pool_setting */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = pool_setting; path = poolsdk_file/poolsdk/pool_setting; sourceTree = "<group>"; };
67 846BD2221EE9342700E89A1D /* SDKInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDKInterface.h; path = poolsdk_file/poolsdk/SDKInterface.h; sourceTree = "<group>"; }; 67 846BD2221EE9342700E89A1D /* SDKInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDKInterface.h; path = poolsdk_file/poolsdk/SDKInterface.h; sourceTree = "<group>"; };
68 846BD2231EE9342700E89A1D /* SDKInterface.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDKInterface.m; path = poolsdk_file/poolsdk/SDKInterface.m; sourceTree = "<group>"; }; 68 846BD2231EE9342700E89A1D /* SDKInterface.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDKInterface.m; path = poolsdk_file/poolsdk/SDKInterface.m; sourceTree = "<group>"; };
69 847EE5E01EE9007E003A4B7B /* MainViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainViewController.h; sourceTree = "<group>"; }; 69 847EE5E01EE9007E003A4B7B /* MainViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainViewController.h; sourceTree = "<group>"; };
...@@ -107,7 +107,6 @@ ...@@ -107,7 +107,6 @@
107 8484E5121EE7E2B800B402D1 /* libz.1.dylib in Frameworks */, 107 8484E5121EE7E2B800B402D1 /* libz.1.dylib in Frameworks */,
108 8484E5101EE7E29A00B402D1 /* libc++.1.dylib in Frameworks */, 108 8484E5101EE7E29A00B402D1 /* libc++.1.dylib in Frameworks */,
109 8484E5001EE7E20C00B402D1 /* CFNetwork.framework in Frameworks */, 109 8484E5001EE7E20C00B402D1 /* CFNetwork.framework in Frameworks */,
110 - 2692FA5A21FFFDF900371736 /* Resident.framework in Frameworks */,
111 8484E5061EE7E24A00B402D1 /* CoreMotion.framework in Frameworks */, 110 8484E5061EE7E24A00B402D1 /* CoreMotion.framework in Frameworks */,
112 8484E5021EE7E21F00B402D1 /* UIKit.framework in Frameworks */, 111 8484E5021EE7E21F00B402D1 /* UIKit.framework in Frameworks */,
113 8484E50C1EE7E27100B402D1 /* CoreGraphics.framework in Frameworks */, 112 8484E50C1EE7E27100B402D1 /* CoreGraphics.framework in Frameworks */,
...@@ -119,6 +118,7 @@ ...@@ -119,6 +118,7 @@
119 8484E5041EE7E24400B402D1 /* StoreKit.framework in Frameworks */, 118 8484E5041EE7E24400B402D1 /* StoreKit.framework in Frameworks */,
120 8484E4FE1EE7E1F700B402D1 /* CoreTelephony.framework in Frameworks */, 119 8484E4FE1EE7E1F700B402D1 /* CoreTelephony.framework in Frameworks */,
121 84A090AB1F160A69003D23FB /* TrackingIO.a in Frameworks */, 120 84A090AB1F160A69003D23FB /* TrackingIO.a in Frameworks */,
121 + 265B2A59228015D600F193F4 /* Reluctant.framework in Frameworks */,
122 ); 122 );
123 runOnlyForDeploymentPostprocessing = 0; 123 runOnlyForDeploymentPostprocessing = 0;
124 }; 124 };
...@@ -143,10 +143,10 @@ ...@@ -143,10 +143,10 @@
143 8476DF641C4DD71D00EC42BA /* poolsdk */ = { 143 8476DF641C4DD71D00EC42BA /* poolsdk */ = {
144 isa = PBXGroup; 144 isa = PBXGroup;
145 children = ( 145 children = (
146 - 2692FA5921FFFDF900371736 /* Resident.framework */, 146 + 265B2A58228015D600F193F4 /* Reluctant.framework */,
147 84A090AC1F174E21003D23FB /* TrackingIO.h */, 147 84A090AC1F174E21003D23FB /* TrackingIO.h */,
148 84A090AA1F160A69003D23FB /* TrackingIO.a */, 148 84A090AA1F160A69003D23FB /* TrackingIO.a */,
149 - 846BD21F1EE9342700E89A1D /* public_setting */, 149 + 846BD21F1EE9342700E89A1D /* pool_setting */,
150 846BD2221EE9342700E89A1D /* SDKInterface.h */, 150 846BD2221EE9342700E89A1D /* SDKInterface.h */,
151 846BD2231EE9342700E89A1D /* SDKInterface.m */, 151 846BD2231EE9342700E89A1D /* SDKInterface.m */,
152 845D181B1C8D778400F27EB9 /* Images.xcassets */, 152 845D181B1C8D778400F27EB9 /* Images.xcassets */,
...@@ -280,7 +280,7 @@ ...@@ -280,7 +280,7 @@
280 TargetAttributes = { 280 TargetAttributes = {
281 BB5F3C871C1811BC00DA339D = { 281 BB5F3C871C1811BC00DA339D = {
282 CreatedOnToolsVersion = 6.4; 282 CreatedOnToolsVersion = 6.4;
283 - DevelopmentTeam = A3DGN26BA8; 283 + DevelopmentTeam = PNDD7Y396D;
284 ProvisioningStyle = Manual; 284 ProvisioningStyle = Manual;
285 }; 285 };
286 BB5F3CA01C1811BC00DA339D = { 286 BB5F3CA01C1811BC00DA339D = {
...@@ -315,7 +315,7 @@ ...@@ -315,7 +315,7 @@
315 files = ( 315 files = (
316 845D18221C8D778400F27EB9 /* Images.xcassets in Resources */, 316 845D18221C8D778400F27EB9 /* Images.xcassets in Resources */,
317 BB5F3C971C1811BC00DA339D /* Main.storyboard in Resources */, 317 BB5F3C971C1811BC00DA339D /* Main.storyboard in Resources */,
318 - 846BD2241EE9342700E89A1D /* public_setting in Resources */, 318 + 846BD2241EE9342700E89A1D /* pool_setting in Resources */,
319 ); 319 );
320 runOnlyForDeploymentPostprocessing = 0; 320 runOnlyForDeploymentPostprocessing = 0;
321 }; 321 };
...@@ -469,7 +469,7 @@ ...@@ -469,7 +469,7 @@
469 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 469 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
470 CODE_SIGN_STYLE = Manual; 470 CODE_SIGN_STYLE = Manual;
471 DEAD_CODE_STRIPPING = NO; 471 DEAD_CODE_STRIPPING = NO;
472 - DEVELOPMENT_TEAM = A3DGN26BA8; 472 + DEVELOPMENT_TEAM = PNDD7Y396D;
473 ENABLE_BITCODE = NO; 473 ENABLE_BITCODE = NO;
474 FRAMEWORK_SEARCH_PATHS = ( 474 FRAMEWORK_SEARCH_PATHS = (
475 "$(inherited)", 475 "$(inherited)",
...@@ -487,10 +487,10 @@ ...@@ -487,10 +487,10 @@
487 ); 487 );
488 ONLY_ACTIVE_ARCH = NO; 488 ONLY_ACTIVE_ARCH = NO;
489 OTHER_LDFLAGS = ""; 489 OTHER_LDFLAGS = "";
490 - PRODUCT_BUNDLE_IDENTIFIER = com.mihuyo.beta; 490 + PRODUCT_BUNDLE_IDENTIFIER = com.test.youai;
491 PRODUCT_NAME = "$(TARGET_NAME)"; 491 PRODUCT_NAME = "$(TARGET_NAME)";
492 - PROVISIONING_PROFILE = "f5e11833-b2e3-48fd-8903-8da416b533f7"; 492 + PROVISIONING_PROFILE = "9303482b-bf64-4d76-83c5-97cec24e2bd5";
493 - PROVISIONING_PROFILE_SPECIFIER = dev_provision; 493 + PROVISIONING_PROFILE_SPECIFIER = dev;
494 TARGETED_DEVICE_FAMILY = "1,2"; 494 TARGETED_DEVICE_FAMILY = "1,2";
495 VALID_ARCHS = "arm64 armv7s"; 495 VALID_ARCHS = "arm64 armv7s";
496 }; 496 };
...@@ -503,7 +503,7 @@ ...@@ -503,7 +503,7 @@
503 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; 503 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
504 CODE_SIGN_STYLE = Manual; 504 CODE_SIGN_STYLE = Manual;
505 DEAD_CODE_STRIPPING = NO; 505 DEAD_CODE_STRIPPING = NO;
506 - DEVELOPMENT_TEAM = A3DGN26BA8; 506 + DEVELOPMENT_TEAM = PNDD7Y396D;
507 ENABLE_BITCODE = NO; 507 ENABLE_BITCODE = NO;
508 FRAMEWORK_SEARCH_PATHS = ( 508 FRAMEWORK_SEARCH_PATHS = (
509 "$(inherited)", 509 "$(inherited)",
...@@ -521,10 +521,10 @@ ...@@ -521,10 +521,10 @@
521 ); 521 );
522 ONLY_ACTIVE_ARCH = NO; 522 ONLY_ACTIVE_ARCH = NO;
523 OTHER_LDFLAGS = ""; 523 OTHER_LDFLAGS = "";
524 - PRODUCT_BUNDLE_IDENTIFIER = com.mihuyo.beta; 524 + PRODUCT_BUNDLE_IDENTIFIER = com.test.youai;
525 PRODUCT_NAME = "$(TARGET_NAME)"; 525 PRODUCT_NAME = "$(TARGET_NAME)";
526 - PROVISIONING_PROFILE = "efde732c-987c-4f2a-bc64-c11762722e03"; 526 + PROVISIONING_PROFILE = "8e8ee19d-d19f-41ba-9a9d-108915ed5380";
527 - PROVISIONING_PROFILE_SPECIFIER = dis_provision; 527 + PROVISIONING_PROFILE_SPECIFIER = dis;
528 TARGETED_DEVICE_FAMILY = "1,2"; 528 TARGETED_DEVICE_FAMILY = "1,2";
529 VALID_ARCHS = "arm64 armv7s"; 529 VALID_ARCHS = "arm64 armv7s";
530 }; 530 };
......
...@@ -113,7 +113,7 @@ NSString* sdkUserId = @""; ...@@ -113,7 +113,7 @@ NSString* sdkUserId = @"";
113 [payInfo setExchange:@"10"]; 113 [payInfo setExchange:@"10"];
114 [payInfo setServerName:@"servername"]; 114 [payInfo setServerName:@"servername"];
115 [payInfo setCustom:@"custom"]; 115 [payInfo setCustom:@"custom"];
116 - [[PoolSdk shareSDK] gzyazfWithGzyazfmentInfo:payInfo]; 116 + [[PoolSdk shareSDK] payWithPaymentInfo:payInfo];
117 } 117 }
118 118
119 -(NSString*)getCurrentTimestamp{ 119 -(NSString*)getCurrentTimestamp{
......
1 +//
2 +// PGLogger.h
3 +// PanguCommonLib
4 +//
5 +// Created by ouyanghua on 14-2-22.
6 +// Copyright (c) 2014年 pangu. All rights reserved.
7 +//
8 +
1 #import <Foundation/Foundation.h> 9 #import <Foundation/Foundation.h>
2 - 10 +
3 void DGLog(NSString *fmt, ...); 11 void DGLog(NSString *fmt, ...);
4 12
5 typedef NS_ENUM(NSInteger, DGLoggerLevel) 13 typedef NS_ENUM(NSInteger, DGLoggerLevel)
...@@ -11,7 +19,7 @@ typedef NS_ENUM(NSInteger, DGLoggerLevel) ...@@ -11,7 +19,7 @@ typedef NS_ENUM(NSInteger, DGLoggerLevel)
11 ELogError 19 ELogError
12 }; 20 };
13 21
14 -@interface ResidentDGLogger : NSObject 22 +@interface DGLogger : NSObject
15 23
16 + (void)showLog:(NSString *)fmt,...; 24 + (void)showLog:(NSString *)fmt,...;
17 25
......
1 +//
2 +// NetCenter.h
3 +// public_i9133
4 +//
5 +// Created by winFan on 12/2/15.
6 +// Copyright (c) 2015 winFan. All rights reserved.
7 +//
8 +
1 #import <Foundation/Foundation.h> 9 #import <Foundation/Foundation.h>
2 10
3 @interface NetCenter : NSObject 11 @interface NetCenter : NSObject
......
1 +//
2 +// OtherSetting.h
3 +// PoolSdk
4 +//
5 +// Created by winFan on 11/23/15.
6 +// Copyright (c) 2015 winFan. All rights reserved.
7 +//
8 +
1 #ifndef __PoolSdk__OtherSetting__ 9 #ifndef __PoolSdk__OtherSetting__
2 #define __PoolSdk__OtherSetting__ 10 #define __PoolSdk__OtherSetting__
3 11
......
1 +//
2 +// PoolBaseModel.h
3 +// public_i9133
4 +//
5 +// Created by winFan on 12/2/15.
6 +// Copyright (c) 2015 winFan. All rights reserved.
7 +//
8 +
9 +
10 +#import <Foundation/Foundation.h>
11 +#import "OtherSetting.h"
12 +@interface PoolBaseModel : NSObject
13 +
14 +- (NSString *)objectToJsonString;
15 +- (NSMutableString *)paramAddToString;
16 +- (id)initWithDiction:(NSDictionary *)diction;
17 +
18 +@end
...\ No newline at end of file ...\ No newline at end of file
1 +//
2 +// PoolLoginChecker.h
3 +// public_i9133
4 +//
5 +// Created by winFan on 12/1/15.
6 +// Copyright (c) 2015 winFan. All rights reserved.
7 +//
1 #import <Foundation/Foundation.h> 8 #import <Foundation/Foundation.h>
2 #import "PoolSdk/PoolLoginInfo.h" 9 #import "PoolSdk/PoolLoginInfo.h"
3 #import "PoolSdk/PoolNotification.h" 10 #import "PoolSdk/PoolNotification.h"
...@@ -5,21 +12,21 @@ ...@@ -5,21 +12,21 @@
5 #import "PoolSdk/PoolPayInfo.h" 12 #import "PoolSdk/PoolPayInfo.h"
6 #import "PoolReportInfo.h" 13 #import "PoolReportInfo.h"
7 #import "PoolSdkDelegate.h" 14 #import "PoolSdkDelegate.h"
8 - 15 +
9 @interface PoolChecker : NSObject<PoolSdkDelegate> 16 @interface PoolChecker : NSObject<PoolSdkDelegate>
10 @property(nonatomic, strong)NSString *userId; 17 @property(nonatomic, strong)NSString *userId;
11 @property(nonatomic, strong)id<PoolSdkDelegate> mPoolSdkDelegate; 18 @property(nonatomic, strong)id<PoolSdkDelegate> mPoolSdkDelegate;
12 19
13 -@property bool onlyOneTimeGzyazf; 20 +@property bool onlyOneTimePay;
14 + (PoolChecker *)getInstance; 21 + (PoolChecker *)getInstance;
15 - (void)initChecker; 22 - (void)initChecker;
16 - (void)startCheck:(PoolLoginInfo *)loginInfo; 23 - (void)startCheck:(PoolLoginInfo *)loginInfo;
17 -- (void) createOrder:(PoolCreateOrderInfo *)gzyazfInfo; 24 +- (void) createOrder:(PoolCreateOrderInfo *)payInfo;
18 -- (void) ResidentreportOpen; 25 +- (void) reportOpen;
19 -- (void) ResidentreportSDKOpen; 26 +- (void) reportSDKOpen;
20 -- (void)ResidenthandleFirstOpenApp:(NSString*) path; 27 +- (void)handleFirstOpenApp:(NSString*) path;
21 - (void) reportEnter:(PoolReportInfo *)reInfo; 28 - (void) reportEnter:(PoolReportInfo *)reInfo;
22 -- (void) ResidentReport:(NSString *)_action :(PoolReportInfo *)reInfo; 29 +- (void) report:(NSString *)_action :(PoolReportInfo *)reInfo;
23 - (void)sendNotice:(PoolSDKNotificationType)notiType 30 - (void)sendNotice:(PoolSDKNotificationType)notiType
24 notiName:(NSString *)notiName 31 notiName:(NSString *)notiName
25 statusCode:(int)nCode 32 statusCode:(int)nCode
...@@ -28,7 +35,10 @@ ...@@ -28,7 +35,10 @@
28 35
29 - (void)startCheckDelegate:(PoolLoginInfo *)loginInfo; 36 - (void)startCheckDelegate:(PoolLoginInfo *)loginInfo;
30 37
31 -- (void)ResidentStartCheckDelegate:(PoolLoginInfo *)loginInfo type:(int)type; 38 +/**
39 + *type PoolSDKNotificationLogin 为登录验证 PoolSDKNotificationSwitchAccount 为切换账号成功验证
40 + */
41 +- (void)startCheckDelegate:(PoolLoginInfo *)loginInfo type:(int)type;
32 42
33 /* 43 /*
34 *初始化时调用 44 *初始化时调用
......
1 +//
2 +// PoolConfig.h
3 +// PoolSdk
4 +//
5 +// Created by winFan on 12/11/15.
6 +// Copyright (c) 2015 winFan. All rights reserved.
7 +//
8 +
1 #import <Foundation/Foundation.h> 9 #import <Foundation/Foundation.h>
2 - 10 +
3 @interface PoolConfig : NSObject 11 @interface PoolConfig : NSObject
4 12
5 @property(nonatomic, strong)NSString *gameSimpleName; 13 @property(nonatomic, strong)NSString *gameSimpleName;
6 @property(nonatomic, strong)NSString *sdkSimpleName; 14 @property(nonatomic, strong)NSString *sdkSimpleName;
7 @property(nonatomic, strong)NSString *sdkVersionCode; 15 @property(nonatomic, strong)NSString *sdkVersionCode;
8 @property(nonatomic, strong)NSString *loginCheckUrl; 16 @property(nonatomic, strong)NSString *loginCheckUrl;
9 -@property(nonatomic, strong)NSString *gzyazfOrderUrl; 17 +@property(nonatomic, strong)NSString *payOrderUrl;
10 -@property(nonatomic, strong)NSString *gzyazfCheckUrl; 18 +@property(nonatomic, strong)NSString *payCheckUrl;
11 @property(nonatomic, strong)NSString *c1; 19 @property(nonatomic, strong)NSString *c1;
12 @property(nonatomic, strong)NSString *c2; 20 @property(nonatomic, strong)NSString *c2;
13 @property(nonatomic, strong)NSString *custom; 21 @property(nonatomic, strong)NSString *custom;
...@@ -20,4 +28,4 @@ ...@@ -20,4 +28,4 @@
20 28
21 - (void) updateC1C2Value:(NSString *)c1 c2:(NSString *)c2; 29 - (void) updateC1C2Value:(NSString *)c1 c2:(NSString *)c2;
22 30
23 -@end 31 +@end
...\ No newline at end of file ...\ No newline at end of file
......
1 -#import "PoolSdk/ResidentPoolBaseModel.h" 1 +//
2 -@interface PoolCreateOrderInfo : ResidentPoolBaseModel 2 +// PayInfo.h
3 +// public_i9133
4 +//
5 +// Created by winFan on 12/3/15.
6 +// Copyright (c) 2015 winFan. All rights reserved.
7 +//
8 +
9 +
10 +#import "PoolSdk/PoolBaseModel.h"
11 +@interface PoolCreateOrderInfo : PoolBaseModel
3 12
4 @property(nonatomic,strong)NSString *serverId;//服务器ID 13 @property(nonatomic,strong)NSString *serverId;//服务器ID
5 @property(nonatomic, strong)NSString *serverName;//服务器名称 14 @property(nonatomic, strong)NSString *serverName;//服务器名称
...@@ -16,7 +25,7 @@ ...@@ -16,7 +25,7 @@
16 @property(nonatomic, strong)NSString *userId;//用户ID 25 @property(nonatomic, strong)NSString *userId;//用户ID
17 @property(nonatomic, strong)NSString *timestamp;//时间戳 26 @property(nonatomic, strong)NSString *timestamp;//时间戳
18 27
19 -- (NSString *) ResidentGetTsign ; 28 +- (NSString *) getTsign ;
20 -- (NSString *) ResidentGetTimestamp ; 29 +- (NSString *) getTimestamp ;
21 30
22 -@end 31 +@end
...\ No newline at end of file ...\ No newline at end of file
......
1 -#import "PoolSdk/ResidentPoolBaseModel.h" 1 +//
2 -@interface PoolLoginInfo : ResidentPoolBaseModel 2 +// PoolLoginInfo.h
3 +// public_i9133
4 +//
5 +// Created by winFan on 12/1/15.
6 +// Copyright (c) 2015 winFan. All rights reserved.
7 +//
8 +
9 +#import "PoolSdk/PoolBaseModel.h"
10 +@interface PoolLoginInfo : PoolBaseModel
3 11
4 @property(nonatomic,strong)NSString *timestamp; 12 @property(nonatomic,strong)NSString *timestamp;
5 -@property(nonatomic, strong)NSString *sign; 13 +@property(nonatomic, strong)NSString *sign;//serverSign
6 -@property(nonatomic, strong)NSString *other; 14 +@property(nonatomic, strong)NSString *other;//透传
7 @property(nonatomic, strong)NSString *openId; 15 @property(nonatomic, strong)NSString *openId;
8 @property(nonatomic, strong)NSString *userType; 16 @property(nonatomic, strong)NSString *userType;
9 17
10 18
11 -@end 19 +@end
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -18,7 +18,7 @@ extern NSString * const _create_order_notification; /**< */ ...@@ -18,7 +18,7 @@ extern NSString * const _create_order_notification; /**< */
18 typedef NS_ENUM(int, PoolSDKNotificationType) { 18 typedef NS_ENUM(int, PoolSDKNotificationType) {
19 PoolSDKNotificationLogin = 1,//登录 19 PoolSDKNotificationLogin = 1,//登录
20 PoolSDKNotificationLogout,//注销 20 PoolSDKNotificationLogout,//注销
21 - PoolSDKNotificationGzyazf,//支付完成 21 + PoolSDKNotificationPay,//支付完成
22 PoolSDKNotificationPause,//暂停退出 22 PoolSDKNotificationPause,//暂停退出
23 PoolSDKNotificationRole,//创建角色 23 PoolSDKNotificationRole,//创建角色
24 PoolSDKNotificationInitSDK,//初始化SDK 24 PoolSDKNotificationInitSDK,//初始化SDK
......
1 -#import "PoolSdk/ResidentPoolBaseModel.h" 1 +//
2 -@interface PoolGzyazfInfo : ResidentPoolBaseModel 2 +// PoolPayInfo.h
3 +// public_i9133
4 +//
5 +// Created by winFan on 12/3/15.
6 +// Copyright (c) 2015 winFan. All rights reserved.
7 +//
8 +
9 +
10 +#import "PoolSdk/PoolBaseModel.h"
11 +@interface PoolPayInfo : PoolBaseModel
3 12
4 @property(nonatomic, strong)NSString *serverId; 13 @property(nonatomic, strong)NSString *serverId;
5 @property(nonatomic, strong)NSString *queryId; 14 @property(nonatomic, strong)NSString *queryId;
...@@ -19,4 +28,4 @@ ...@@ -19,4 +28,4 @@
19 @property(nonatomic, strong)NSString *productDesc;//产品描述 28 @property(nonatomic, strong)NSString *productDesc;//产品描述
20 @property(nonatomic, strong)NSString *exchange;//兑换比例 29 @property(nonatomic, strong)NSString *exchange;//兑换比例
21 30
22 -@end 31 +@end
...\ No newline at end of file ...\ No newline at end of file
......
1 // 1 //
2 -// ResidentPoolReportInfo.h 2 +// PoolReportInfo.h
3 // PoolSdk 3 // PoolSdk
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 "PoolSdk/ResidentPoolBaseModel.h" 9 +#import "PoolSdk/PoolBaseModel.h"
10 -@interface PoolReportInfo : ResidentPoolBaseModel 10 +@interface PoolReportInfo : PoolBaseModel
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
...@@ -30,16 +30,14 @@ ...@@ -30,16 +30,14 @@
30 30
31 @property(nonatomic, strong)NSString *openId; 31 @property(nonatomic, strong)NSString *openId;
32 32
33 -#define REPORT_URL @"https://statistic.public.sdk.gzyouai.com/sdk/statistic" 33 +#define REPORT_URL @"https://statistic.public.sdk.gzyouai.com/sdk/statistic" //http://183.57.76.181:9030/sdk/statistic
34 34
35 -#define REPORT_IDFA_URL @"https://statistic.public.sdk.gzyouai.com/sdk/last_channel?idfa=%@&sdkSimpleName=%@&gameSimpleName=%@" 35 +#define REPORT_IDFA_URL @"https://statistic.public.sdk.gzyouai.com/sdk/last_channel?idfa=%@&sdkSimpleName=%@&gameSimpleName=%@" //@"http://183.57.76.181:9030/sdk/last_channel?idfa="//
36 36
37 #define REPORT_OPEN @"open" 37 #define REPORT_OPEN @"open"
38 #define REPORT_ENTER @"enter" 38 #define REPORT_ENTER @"enter"
39 #define REPORT_CREATEROLE @"createrole" 39 #define REPORT_CREATEROLE @"createrole"
40 #define REPORT_ROLEUPGRADE @"roleupgrade" 40 #define REPORT_ROLEUPGRADE @"roleupgrade"
41 #define REPORT_SDK_OPEN @"opensdk" 41 #define REPORT_SDK_OPEN @"opensdk"
42 -#define REPORT_EXIT @"exit"
43 -#define REPORT_SELECT_SERVER @"selectserver"
44 42
45 @end 43 @end
......
1 +//
2 +// PoolSdk.h
3 +// PoolSdk
4 +//
5 +// Created by winFan on 11/23/15.
6 +// Copyright (c) 2015 winFan. All rights reserved.
7 +//
8 +
1 #import <Foundation/Foundation.h> 9 #import <Foundation/Foundation.h>
2 #import "PoolSdk2.h" 10 #import "PoolSdk2.h"
3 -
4 #import <UIKit/UIKit.h> 11 #import <UIKit/UIKit.h>
5 12
6 @interface PoolSdk : NSObject 13 @interface PoolSdk : NSObject
7 - 14 +/**
15 + * 当前SDK的版本
16 + */
8 @property(nonatomic, strong, readonly)NSString *sdkVersion; 17 @property(nonatomic, strong, readonly)NSString *sdkVersion;
9 18
10 - 19 +/**
20 + * 用于设置url types schemes 默认为工程名
21 + */
11 @property(nonatomic, strong)NSString *urlSchemes; 22 @property(nonatomic, strong)NSString *urlSchemes;
12 23
13 -@property BOOL isAppleGzyazfing;
14 24
15 -+ (PoolSdk *)shareSDK;
16 25
26 +/**
27 + 获取SDK实例对象
28 + */
29 ++ (PoolSdk *)shareSDK;
17 30
31 +/**
32 + 初始化SDK
33 + */
18 - (void)initSDK:(UIViewController *) control; 34 - (void)initSDK:(UIViewController *) control;
19 35
20 36
...@@ -22,60 +38,131 @@ ...@@ -22,60 +38,131 @@
22 38
23 - (void)setViewController:(UIViewController *)viewController; 39 - (void)setViewController:(UIViewController *)viewController;
24 40
25 - 41 +/**
42 + 登录SDK
43 + */
26 - (void)loginSDK; 44 - (void)loginSDK;
27 45
28 - (void)loginSDK:(UIViewController *)viewController; 46 - (void)loginSDK:(UIViewController *)viewController;
29 47
30 - 48 +/**
31 -- (void)gzyazfWithGzyazfmentInfo:(PoolCreateOrderInfo *)gzyazfInfo; 49 + 进行支付
50 + */
51 +- (void)payWithPaymentInfo:(PoolCreateOrderInfo *)payInfo;
32 52
33 53
54 +/**
55 + *是否含有用户中心接口
56 + **/
34 - (BOOL)hasUserCenter; 57 - (BOOL)hasUserCenter;
35 58
36 - 59 +/**
60 + 用户中心
61 + */
37 - (void)gotoUserCenter; 62 - (void)gotoUserCenter;
38 63
39 - 64 +/**
65 + report
66 + */
40 - (void)reportSDK:(PoolReportInfo *)reportInfo; 67 - (void)reportSDK:(PoolReportInfo *)reportInfo;
41 68
42 - 69 +/**
70 + *是否含有注销接口
71 + */
43 - (BOOL)hasLogout; 72 - (BOOL)hasLogout;
44 73
45 - 74 +/**
75 + 注销
76 + */
46 - (void)logoutSDK; 77 - (void)logoutSDK;
47 78
48 - 79 +/**
80 + *是否含有切换账号接口
81 + **/
49 - (BOOL)hasSwitchAccount; 82 - (BOOL)hasSwitchAccount;
50 83
51 - 84 +/**
85 + *切换账号
86 + **/
52 - (void)switchAccount; 87 - (void)switchAccount;
53 88
54 89
90 +/**
91 + *是否含有退出接口
92 + **/
55 - (BOOL)hasExit; 93 - (BOOL)hasExit;
56 94
57 - 95 +/**
96 + 退出
97 + */
58 - (void)exitSDK; 98 - (void)exitSDK;
59 99
100 +/**
101 + *SDK销毁操作(游戏退出时调用)
102 + */
60 - (void)destroySDK; 103 - (void)destroySDK;
61 104
105 +/**
106 + 显示/隐藏浮标
107 + */
108 +//- (void)showFloatIcon:(BOOL)bFlag;
109 +
110 +
111 +/**
112 + // called in - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url
113 + */
114 +
115 +/**
116 + 应用 appid
117 + */
118 +
119 +/**
120 + 应用支持的方向 默认为 EDreamSDKOrientationLandscape
121 + */
62 @property(nonatomic, assign)ESDKOrientation sdkOrientation; 122 @property(nonatomic, assign)ESDKOrientation sdkOrientation;
63 123
124 +/**
125 + 浮标是否已经显示,默认为NO
126 + */
64 @property(nonatomic, assign)BOOL bShowedFloat; 127 @property(nonatomic, assign)BOOL bShowedFloat;
65 128
66 129
130 +/**
131 + serverId
132 + */
67 @property(nonatomic, assign)int serverId; 133 @property(nonatomic, assign)int serverId;
68 134
69 - 135 +/**
136 + 获取gamechannelid
137 + */
70 -(NSString *) getGameChannelId; 138 -(NSString *) getGameChannelId;
71 139
140 +/**
141 + 获取Custom
142 + */
72 - (NSString *) getCustomValue; 143 - (NSString *) getCustomValue;
73 144
145 +/**
146 + 获取ChannelParameter1
147 + */
74 - (NSString *) getChannelParameter1; 148 - (NSString *) getChannelParameter1;
75 149
150 +/**
151 + 获取ChannelParameter2
152 + */
76 - (NSString *) getChannelParameter2; 153 - (NSString *) getChannelParameter2;
77 154
78 --(void)gzyazfmentSuccess:(NSString*)accountId orderId:(NSString*)orderId currencyAmount:(double)amount currencyType:(NSString*)currencyType gzyazfType:(NSString*)gzyazfType custom:(NSArray*)customArray; 155 +
156 +/**
157 + *充值统计参数
158 + *accountId 账号ID,必填项, 和登陆、注册使用的accountId保持一致即可。
159 + *orderId 订单Id,必填项,请保证该值的全局唯一,系统会使用订单Id进行付费订单排重。
160 + *currencyAmount 货币金额,单位为元,支持小数
161 + *currencyType 货币类型
162 + *payType 支付类型(渠道)
163 + *custom 自定义扩展参数
164 + */
165 +-(void)paymentSuccess:(NSString*)accountId orderId:(NSString*)orderId currencyAmount:(double)amount currencyType:(NSString*)currencyType payType:(NSString*)payType custom:(NSArray*)customArray;
79 166
80 167
81 - (void)handleOpenurl:(NSURL *)url; 168 - (void)handleOpenurl:(NSURL *)url;
...@@ -86,9 +173,9 @@ ...@@ -86,9 +173,9 @@
86 173
87 - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken; 174 - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken;
88 175
89 - 176 +//推送
90 - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo ; 177 - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo ;
91 - 178 +//推送
92 - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler; 179 - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler;
93 180
94 181
......
1 +//
2 +// PoolSdk.h
3 +// PoolSdk
4 +//
5 +// Created by 许 on 16/1/15.
6 +// Copyright © 2016年 许. All rights reserved.
7 +//
8 +// In this header, you should import all the public headers of your framework using statements like #import <PoolSdk/PublicHeader.h>
9 +
1 #import <UIKit/UIKit.h> 10 #import <UIKit/UIKit.h>
2 #import "PoolChecker.h" 11 #import "PoolChecker.h"
12 +#import "Interface.h"
3 #import "PoolReportInfo.h" 13 #import "PoolReportInfo.h"
4 #import "PoolLoginInfo.h" 14 #import "PoolLoginInfo.h"
5 -#import "Interface.h"
6 #import "PoolNotification.h" 15 #import "PoolNotification.h"
7 #import "PoolPayInfo.h" 16 #import "PoolPayInfo.h"
8 #import "UnionInterface.h" 17 #import "UnionInterface.h"
...@@ -12,3 +21,4 @@ ...@@ -12,3 +21,4 @@
12 #import "NetCenter.h" 21 #import "NetCenter.h"
13 #import "PoolSdk.h" 22 #import "PoolSdk.h"
14 #import "PoolSdkDelegate.h" 23 #import "PoolSdkDelegate.h"
24 +
......
1 +//
2 +// PoolSdkDelegate.h
3 +// PoolSdk_i9133
4 +//
5 +// Created by 许 on 17/6/30.
6 +// Copyright © 2017年 许. All rights reserved.
7 +//
8 +
1 #import <Foundation/Foundation.h> 9 #import <Foundation/Foundation.h>
2 - 10 +
3 @protocol PoolSdkDelegate <NSObject> 11 @protocol PoolSdkDelegate <NSObject>
4 @optional 12 @optional
5 -(void)PoolSdkLoginSuccess:(PoolLoginInfo*)loginInfo; 13 -(void)PoolSdkLoginSuccess:(PoolLoginInfo*)loginInfo;
......
1 +//
2 +// PoolUtils.h
3 +// public_i9133
4 +//
5 +// Created by winFan on 12/3/15.
6 +// Copyright (c) 2015 winFan. All rights reserved.
7 +//
8 +
9 +
1 #import <Foundation/Foundation.h> 10 #import <Foundation/Foundation.h>
2 #import <UIKit/UIKit.h> 11 #import <UIKit/UIKit.h>
3 - 12 +
4 @interface PoolUtils : NSObject 13 @interface PoolUtils : NSObject
5 14
6 +(NSString *)md5:(NSString *)str; 15 +(NSString *)md5:(NSString *)str;
7 -+ (NSDictionary *)ResidentDictionaryWithJsonString:(NSString *)jsonString; 16 ++ (NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString;
8 -+(NSString *)createGzyazfOrderUrl; 17 ++(NSString *)createPayOrderUrl;
9 //*充值回调地址 18 //*充值回调地址
10 -+(NSString *)createGzyazfUrl; 19 ++(NSString *)createPayUrl;
11 20
12 +(UIActivityIndicatorView *)showLoadingDialog:(UIView*)parentView; 21 +(UIActivityIndicatorView *)showLoadingDialog:(UIView*)parentView;
13 +(void)dismissLoadingDialog:(UIActivityIndicatorView*)indicatorView; 22 +(void)dismissLoadingDialog:(UIActivityIndicatorView*)indicatorView;
14 23
15 -@end 24 +@end
...\ No newline at end of file ...\ No newline at end of file
......
1 -#import <Foundation/Foundation.h>
2 -#import "OtherSetting.h"
3 -
4 -@interface ResidentPoolBaseModel : NSObject
5 -
6 -- (NSString *)ResidentObjectToJsonString;
7 -- (NSMutableString *)paramAddToString;
8 -- (id)initWithDiction:(NSDictionary *)diction;
9 -
10 -@end
1 +//
2 +// NewTtack.h
3 +// NewTtack
4 +//
5 +// Created by yun on 16/1/11.
6 +// Copyright © 2016年 yun. All rights reserved.
7 +//
1 #define TRACK_VERSION @"1.0.1" 8 #define TRACK_VERSION @"1.0.1"
9 +
2 #import <Foundation/Foundation.h> 10 #import <Foundation/Foundation.h>
3 #import <UIKit/UIKit.h> 11 #import <UIKit/UIKit.h>
4 12
13 +
14 +/*
15 + 热云移动广告效果监测 平台 api 请选择对应的api进行使用
16 + */
5 NS_ASSUME_NONNULL_BEGIN 17 NS_ASSUME_NONNULL_BEGIN
6 @interface TrackingIO : NSObject 18 @interface TrackingIO : NSObject
19 +//开启打印日志 正式上线包请关掉
7 +(void) setPrintLog :(BOOL)print; 20 +(void) setPrintLog :(BOOL)print;
21 +// 开启数据统计
8 + (void)initWithappKey:(NSString *)appKey withChannelId:(NSString *)channelId; 22 + (void)initWithappKey:(NSString *)appKey withChannelId:(NSString *)channelId;
23 +//注册成功后调用
9 + (void)setRegisterWithAccountID:(NSString *)account; 24 + (void)setRegisterWithAccountID:(NSString *)account;
25 +//登陆成功后调用
10 + (void)setLoginWithAccountID:(NSString *)account; 26 + (void)setLoginWithAccountID:(NSString *)account;
11 -+(void)setGzyazfmentStart:(NSString *)transactionId gzyazfmentType:(NSString*)gzyazfmentType currentType:(NSString*)currencyType currencyAmount:(float)currencyAmount; 27 +//开始付费时 调用(人民币单位是元)
12 -+(void)setGzyazfment:(NSString *)transactionId gzyazfmentType:(NSString*)gzyazfmentType currentType:(NSString*)currencyType currencyAmount:(float)currencyAmount; 28 ++(void)setPaymentStart:(NSString *)transactionId paymentType:(NSString*)paymentType currentType:(NSString*)currencyType currencyAmount:(float)currencyAmount;
29 +// 支付完成,付费分析,记录玩家充值的金额(人民币单位是元)
30 ++(void)setPayment:(NSString *)transactionId paymentType:(NSString*)paymentType currentType:(NSString*)currencyType currencyAmount:(float)currencyAmount;
31 +//自定义事件
13 +(void)setEvent:(NSString *)eventName andExtra:(nullable NSDictionary *)extra; 32 +(void)setEvent:(NSString *)eventName andExtra:(nullable NSDictionary *)extra;
33 +//标准接口
14 +(void)setProfile:(NSDictionary *)dataDic; 34 +(void)setProfile:(NSDictionary *)dataDic;
35 +//获取设备信息
15 +(NSString*)getDeviceId; 36 +(NSString*)getDeviceId;
16 @end 37 @end
17 NS_ASSUME_NONNULL_END 38 NS_ASSUME_NONNULL_END
......
1 +//
2 +// UnionInterface.h
3 +// PoolSdk
4 +//
5 +// Created by winFan on 11/23/15.
6 +// Copyright (c) 2015 winFan. All rights reserved.
7 +//
1 #import <Foundation/Foundation.h> 8 #import <Foundation/Foundation.h>
2 #import <UIKit/UIKit.h> 9 #import <UIKit/UIKit.h>
3 -#import "PoolSdk2.h" 10 +#import "PoolCreateOrderInfo.h"
4 - 11 +#import "PoolReportInfo.h"
12 +
5 @protocol UnionInterface 13 @protocol UnionInterface
6 /** 14 /**
7 初始化SDK 15 初始化SDK
8 */ 16 */
9 17
10 -//[[PoolChecker getInstance] sendNotice:PoolSDKNotificationGzyazf notiName:@"" statusCode:POOLSDK_NO_ERROR description:@"" extendData:order_id]; 18 +//[[PoolChecker getInstance] sendNotice:PoolSDKNotificationPay notiName:@"" statusCode:POOLSDK_NO_ERROR description:@"" extendData:order_id];
11 19
12 - (void)SDKinit:(UIViewController *) control; 20 - (void)SDKinit:(UIViewController *) control;
13 21
...@@ -83,7 +91,7 @@ ...@@ -83,7 +91,7 @@
83 进行支付 91 进行支付
84 */ 92 */
85 93
86 -- (void)SDKgzyazfWithGzyazfmentInfo:(PoolCreateOrderInfo *)gzyazfInfo; 94 +- (void)SDKpayWithPaymentInfo:(PoolCreateOrderInfo *)payInfo;
87 - (void)receiveCreateOrder: (NSNotification *)notification; 95 - (void)receiveCreateOrder: (NSNotification *)notification;
88 96
89 /** 97 /**
...@@ -92,9 +100,9 @@ ...@@ -92,9 +100,9 @@
92 *orderId 订单Id,必填项,请保证该值的全局唯一,系统会使用订单Id进行付费订单排重。 100 *orderId 订单Id,必填项,请保证该值的全局唯一,系统会使用订单Id进行付费订单排重。
93 *currencyAmount 货币金额,单位为元,支持小数 101 *currencyAmount 货币金额,单位为元,支持小数
94 *currencyType 货币类型 102 *currencyType 货币类型
95 - *gzyazfType 支付类型(渠道) 103 + *payType 支付类型(渠道)
96 */ 104 */
97 --(void)gzyazfmentSuccess:(NSString*)accountId orderId:(NSString*)orderId currencyAmount:(double)amount currencyType:(NSString*)currencyType gzyazfType:(NSString*)gzyazfType custom:(NSArray *)customArray; 105 +-(void)paymentSuccess:(NSString*)accountId orderId:(NSString*)orderId currencyAmount:(double)amount currencyType:(NSString*)currencyType payType:(NSString*)payType custom:(NSArray *)customArray;
98 106
99 - (void)handleOpenurl:(NSURL *)url; 107 - (void)handleOpenurl:(NSURL *)url;
100 - (NSUInteger) application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window; 108 - (NSUInteger) application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window;
...@@ -121,4 +129,4 @@ ...@@ -121,4 +129,4 @@
121 -(BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options; 129 -(BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options;
122 130
123 - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation; 131 - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation;
124 -@end 132 +@end
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
79 [payInfo setExchange:@"10"]; 79 [payInfo setExchange:@"10"];
80 [payInfo setCustom:@"custom"]; 80 [payInfo setCustom:@"custom"];
81 NSLog(@"start pay"); 81 NSLog(@"start pay");
82 - [[PoolSdk shareSDK] gzyazfWithGzyazfmentInfo:payInfo]; 82 + [[PoolSdk shareSDK] payWithPaymentInfo:payInfo];
83 } 83 }
84 else if(tag == 6){ 84 else if(tag == 6){
85 PoolSdk *poolSdk = [PoolSdk shareSDK]; 85 PoolSdk *poolSdk = [PoolSdk shareSDK];
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
122 } 122 }
123 } 123 }
124 break; 124 break;
125 - case PoolSDKNotificationGzyazf: 125 + case PoolSDKNotificationPay:
126 { 126 {
127 NSLog(@"收到登陆信息PoolSDKNotificationPay"); 127 NSLog(@"收到登陆信息PoolSDKNotificationPay");
128 } 128 }
......
1 +#import <UIKit/UIKit.h>
2 +#import "StoreKit/StoreKit.h"
3 +
4 +@interface ReluctantAllManager : NSObject
5 +{
6 + NSString* ReluctantAPPID_;
7 + NSString* ReluctantAPPKEY_;
8 +
9 + NSString* ReluctantInviterCode_;
10 +}
11 +
12 +@property bool ReluctantGeiWoHuaQianBa;
13 +
14 ++ (ReluctantAllManager *)ReluctantInstance;
15 +
16 +- (void)ReluctantChuShiHua;
17 +
18 +- (void)ReluctantDengLu:(NSString *)ReluctantAPPID : (NSString *)ReluctantAPPKEY : (UIViewController *)controller;
19 +
20 +- (void)ReluctantYangShi:(NSString*)ReluctantLeiXing;
21 +
22 +- (void)ReluctantQuery: (NSString *)ReluctantFuWuQiID : (NSString *)ReluctantNickName : (NSNumber *)ReluctantAmount : (NSString *)ReluctantCallBack : (UIViewController *)controller : (NSString *)ReluctantServerName;
23 +
24 +- (void)ReluctantQueryOperation:(UIViewController*)controll ReluctantHuoWuID:(NSString*)products ReluctantJiaGe:(NSString*)amount ReluctantHuoWuMing:(NSString*)productName ReluctantDingDanHao:(NSString*) DingDanHao;
25 +
26 +
27 +
28 +@end
1 +#import <Foundation/Foundation.h>
2 +
3 +extern NSString * const ReluctantExitNotification;
4 +extern NSString * const ReluctantLoginNotification;
5 +extern NSString * const ReluctantErrorNotification;
6 +
7 +
8 +@interface ReluctantHuiTiaoNotification : NSObject
9 +
10 +@end
1 +#import <UIKit/UIKit.h>
2 +
3 +@interface ReluctantIAPHelperControl : NSObject<UITableViewDelegate, UITableViewDataSource>
4 +
5 +@property(nonatomic,strong) NSString* ReluctantDingDanHao;
6 +@property(nonatomic,strong) NSDictionary* ReluctantHuoWuLieBiao;
7 +@property(nonatomic,strong) NSMutableArray* ReluctantHuoWuIDLieBiao;
8 +@property(nonatomic, strong) UITableView *ReluctantHuoWuLieBiaoView;
9 +
10 +- (void)ReluctantHuaQianView:(UIViewController*)controller ReluctantHuoWuD:(NSString*)products ReluctantQian:(NSString*)amount ReluctantHuoWuMing:(NSString*)productName ReluctantDingDanHao:(NSString*)DingDanHao;
11 +
12 +@end
1 #import <Foundation/Foundation.h> 1 #import <Foundation/Foundation.h>
2 2
3 -@interface ResidentInformation : NSObject 3 +@interface ReluctantInformation : NSObject
4 { 4 {
5 // 5 //
6 NSString *openId; 6 NSString *openId;
...@@ -12,5 +12,5 @@ NSString *timestamp; ...@@ -12,5 +12,5 @@ NSString *timestamp;
12 @property(retain,nonatomic) NSString *openId; 12 @property(retain,nonatomic) NSString *openId;
13 @property(retain,nonatomic) NSString *token; 13 @property(retain,nonatomic) NSString *token;
14 @property(retain,nonatomic) NSString *timestamp; 14 @property(retain,nonatomic) NSString *timestamp;
15 -+ (ResidentInformation *)getInstance; 15 ++ (ReluctantInformation *)getInstance;
16 @end 16 @end
......
1 #import <Foundation/Foundation.h> 1 #import <Foundation/Foundation.h>
2 2
3 -@interface ResidentInformationJM : NSObject 3 +@interface ReluctantInformationJM : NSObject
4 4
5 -+(NSString *)ResidentJM:(NSString *)jm; 5 ++(NSString *)ReluctantJM:(NSString *)jm;
6 6
7 @end 7 @end
......
1 #import <UIKit/UIKit.h> 1 #import <UIKit/UIKit.h>
2 2
3 -@interface ResidentLocation : NSObject 3 +@interface ReluctantLocation : NSObject
4 4
5 -+ (NSString *)ResidentSKCloudServiceSetupOptionsKey; 5 ++ (NSString *)ReluctantSKCloudServiceSetupOptionsKey;
6 @end 6 @end
7 7
......
1 #import <UIKit/UIKit.h> 1 #import <UIKit/UIKit.h>
2 -#import "ResidentInformation.h" 2 +#import "ReluctantInformation.h"
3 #import <JavaScriptCore/JavaScriptCore.h> 3 #import <JavaScriptCore/JavaScriptCore.h>
4 4
5 -@interface ResidentMain : UIViewController<UIWebViewDelegate,UIAlertViewDelegate> 5 +@interface ReluctantMain : UIViewController<UIWebViewDelegate,UIAlertViewDelegate>
6 { 6 {
7 - UIWebView *webView_; 7 + UIWebView *webReluctantView_;
8 UIActivityIndicatorView *activityIndicator; 8 UIActivityIndicatorView *activityIndicator;
9 } 9 }
10 10
11 -@property(assign) BOOL ResidentYouYuanJiao; 11 +@property(assign) BOOL ReluctantYouYuanJiao;
12 12
13 -- (void)ResidentSettingCKAssetsView:(int)webViewWidth :(int) webViewHeight :(int) screenwidth :(int) screenHeight; 13 +- (void)ReluctantSettingReluctantView:(int)webViewWidth :(int) webViewHeight :(int) screenwidth :(int) screenHeight;
14 -- (void)ResidentChuShiHuaWebView; 14 +- (void)ReluctantInitWebView;
15 - (void)loadWebPageWithString:(NSString *)url; 15 - (void)loadWebPageWithString:(NSString *)url;
16 - (void)loadWebPageWithJs:(NSString *)content; 16 - (void)loadWebPageWithJs:(NSString *)content;
17 - (void)postNotification:(NSString *)name : (NSString *)code; 17 - (void)postNotification:(NSString *)name : (NSString *)code;
......
No preview for this file type
1 -#import <UIKit/UIKit.h>
2 -
3 -@interface ResidentIAPHelperControl : NSObject<UITableViewDelegate, UITableViewDataSource>
4 -
5 -@property(nonatomic,strong) NSString* ResidentDingDanHao;
6 -@property(nonatomic,strong) NSDictionary* ResidentHuoWuLieBiao;
7 -@property(nonatomic,strong) NSMutableArray* ResidentHuoWuIDLieBiao;
8 -@property(nonatomic, strong) UITableView *ResidentHuoWuLieBiaoView;
9 -
10 -- (void)ResidentHuaQianView:(UIViewController*)controller ResidentHuoWuD:(NSString*)products ResidentQian:(NSString*)amount ResidentHuoWuMing:(NSString*)productName ResidentDingDanHao:(NSString*)DingDanHao;
11 -
12 -@end
1 -#import <UIKit/UIKit.h>
2 -#import "StoreKit/StoreKit.h"
3 -
4 -@interface ResidentAllManager : NSObject
5 -{
6 - NSString* ResidentAPPID_;
7 - NSString* ResidentAPPKEY_;
8 -
9 - NSString* ResidentInviterCode_;
10 -}
11 -
12 -@property bool ResidentGeiWoHuaQianBa;
13 -
14 -+ (ResidentAllManager *)ResidentInstance;
15 -
16 -- (void)ResidentChuShiHua;
17 -
18 -- (void)ResidentDengLu:(NSString *)ResidentAPPID : (NSString *)ResidentAPPKEY : (UIViewController *)controller;
19 -
20 -- (void)ResidentYangShi:(NSString*)ResidentLeiXing;
21 -
22 -- (void)ResidentQuery: (NSString *)ResidentFuWuQiID : (NSString *)ResidentNickName : (NSNumber *)ResidentAmount : (NSString *)ResidentCallBack : (UIViewController *)controller : (NSString *)ResidentServerName;
23 -
24 -- (void)ResidentQueryOperation:(UIViewController*)controll ResidentHuoWuID:(NSString*)products ResidentJiaGe:(NSString*)amount ResidentHuoWuMing:(NSString*)productName ResidentDingDanHao:(NSString*) DingDanHao;
25 -
26 -
27 -
28 -@end
1 -#import <Foundation/Foundation.h>
2 -
3 -extern NSString * const ResidentExitNotification;
4 -extern NSString * const ResidentLoginNotification;
5 -extern NSString * const ResidentErrorNotification;
6 -
7 -
8 -@interface ResidentHuiTiaoNotification : NSObject
9 -
10 -@end
...@@ -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>I9133</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>
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
17 <key>CFBundlePackageType</key> 17 <key>CFBundlePackageType</key>
18 <string>APPL</string> 18 <string>APPL</string>
19 <key>CFBundleShortVersionString</key> 19 <key>CFBundleShortVersionString</key>
20 - <string>1.1.408</string> 20 + <string>1.3</string>
21 <key>CFBundleSignature</key> 21 <key>CFBundleSignature</key>
22 <string>????</string> 22 <string>????</string>
23 <key>CFBundleURLTypes</key> 23 <key>CFBundleURLTypes</key>
......
1 +//
2 +// UnionInterface.m
3 +// PoolSdk
4 +//
5 +// Created by winFan on 11/23/15.
6 +// Copyright (c) 2015 winFan. All rights reserved.
7 +//
1 #include "SDKInterface.h" 8 #include "SDKInterface.h"
2 #import <UIKit/UIKit.h> 9 #import <UIKit/UIKit.h>
3 10
4 -#import "Resident/ResidentAllManager.h" 11 +#import "Reluctant/ReluctantAllManager.h"
5 -#import "Resident/ResidentHuiTiaoNotification.h" 12 +#import "Reluctant/ReluctantHuiTiaoNotification.h"
6 -#import "Resident/ResidentInformation.h" 13 +#import "Reluctant/ReluctantInformation.h"
7 -
8 #import "TrackingIO.h" 14 #import "TrackingIO.h"
9 15
16 +//SDK
17 +
18 +
10 @implementation SDKInterface : Interface 19 @implementation SDKInterface : Interface
11 20
21 +
12 int mExchange; 22 int mExchange;
13 -NSString *ResidentAppId; 23 + NSString *ReluctantAppId;
14 -NSString *ResidentAppKey; 24 + NSString *ReluctantAppKey;
25 + NSString *ReluctantLeakOrderUrl;
15 26
27 +/**
28 + 初始化SDK
29 + */
16 - (void)SDKinit:(UIViewController *) control 30 - (void)SDKinit:(UIViewController *) control
17 { 31 {
18 - 32 + //必须继承
19 [super SDKinit:control]; 33 [super SDKinit:control];
20 34
21 [PoolConfig getInstance]; 35 [PoolConfig getInstance];
22 - [[ResidentAllManager ResidentInstance]ResidentChuShiHua]; 36 + [[ReluctantAllManager ReluctantInstance]ReluctantChuShiHua];
23 - [[ResidentAllManager ResidentInstance]ResidentYangShi:@"sdk"]; 37 + [[ReluctantAllManager ReluctantInstance]ReluctantYangShi:@"sdk"];
24 - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveLoginMessage:) name:ResidentLoginNotification object:nil]; 38 + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveLoginMessage:) name:ReluctantLoginNotification object:nil];
25 - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(HCKAssetsToolCallBack:) name:@"ResidentToolCallBack" object:nil]; 39 + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(youaiToolCallBack:) name:@"ReluctantToolCallBack" object:nil];
26 -
27 [[PoolChecker getInstance] sendNotice:PoolSDKNotificationInitSDK notiName:@"InitSuccess" statusCode:POOLSDK_NO_ERROR description:@"initSuccess" extendData:nil]; 40 [[PoolChecker getInstance] sendNotice:PoolSDKNotificationInitSDK notiName:@"InitSuccess" statusCode:POOLSDK_NO_ERROR description:@"initSuccess" extendData:nil];
28 41
29 NSString* channelId = [[PoolConfig getInstance] getValueByKey:@"gamechannelid"]; 42 NSString* channelId = [[PoolConfig getInstance] getValueByKey:@"gamechannelid"];
...@@ -38,10 +51,10 @@ NSString *ResidentAppKey; ...@@ -38,10 +51,10 @@ NSString *ResidentAppKey;
38 */ 51 */
39 - (void)SDKloginSDK 52 - (void)SDKloginSDK
40 { 53 {
41 - //APPID APPKEY 54 + NSLog(@"调用了LoginSDK");
42 - ResidentAppId = [[PoolConfig getInstance] getValueByKey:@"APP_ID"]; 55 + ReluctantAppId = [[PoolConfig getInstance] getValueByKey:@"APP_ID"];
43 - ResidentAppKey =[[PoolConfig getInstance] getValueByKey:@"APP_KEY"]; 56 + ReluctantAppKey =[[PoolConfig getInstance] getValueByKey:@"APP_KEY"];
44 - [[ResidentAllManager ResidentInstance]ResidentDengLu:ResidentAppId :ResidentAppKey :self.controller]; 57 + [[ReluctantAllManager ReluctantInstance]ReluctantDengLu:ReluctantAppId :ReluctantAppKey :self.controller];
45 58
46 } 59 }
47 60
...@@ -52,9 +65,9 @@ NSString *ResidentAppKey; ...@@ -52,9 +65,9 @@ NSString *ResidentAppKey;
52 { 65 {
53 NSLog(@"loginchek"); 66 NSLog(@"loginchek");
54 PoolLoginInfo *loginInfo = [PoolLoginInfo alloc]; 67 PoolLoginInfo *loginInfo = [PoolLoginInfo alloc];
55 - loginInfo.openId = [[ResidentInformation getInstance]openId]; 68 + loginInfo.openId = [[ReluctantInformation getInstance]openId];
56 - loginInfo.sign = [[ResidentInformation getInstance] token]; 69 + loginInfo.sign = [[ReluctantInformation getInstance] token];
57 - loginInfo.timestamp = [[ResidentInformation getInstance] timestamp]; 70 + loginInfo.timestamp = [[ReluctantInformation getInstance] timestamp];
58 71
59 dispatch_async(dispatch_get_global_queue(0, 0), ^{ 72 dispatch_async(dispatch_get_global_queue(0, 0), ^{
60 [[PoolChecker getInstance] startCheck:loginInfo]; 73 [[PoolChecker getInstance] startCheck:loginInfo];
...@@ -78,47 +91,47 @@ NSString *ResidentAppKey; ...@@ -78,47 +91,47 @@ NSString *ResidentAppKey;
78 苹果支付结果回调 91 苹果支付结果回调
79 */ 92 */
80 93
81 -- (void)HCKAssetsToolCallBack:(NSNotification *)notification 94 +- (void)youaiToolCallBack:(NSNotification *)notification
82 { 95 {
83 NSDictionary* payResultDic = notification.object; 96 NSDictionary* payResultDic = notification.object;
84 - 97 + NSString* receiptStr = [payResultDic objectForKey:@"ReluctantToolResult"];
85 - NSString* receiptStr = [payResultDic objectForKey:@"ResidentToolResult"];
86 NSString* queryId = [payResultDic objectForKey:@"query_id"]; 98 NSString* queryId = [payResultDic objectForKey:@"query_id"];
87 99
88 - NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil]; 100 + //收到回调,保存queryid和data
89 - NSString* result = [[NetCenter getInstance] httpPostSyn:[PoolUtils createGzyazfUrl] :receiptDic]; 101 + NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
102 + NSMutableArray* queryIdArray = [userDefaults objectForKey:@"queryIds"];
103 + NSMutableArray* tempQueryIdArray = [[NSMutableArray alloc] initWithCapacity:10];
104 + if (queryIdArray) {
105 + }else{
106 + queryIdArray = [[NSMutableArray alloc]initWithCapacity:10];
107 + }
108 + for (NSString* arrayQueryId in queryIdArray) {
109 + [tempQueryIdArray addObject:arrayQueryId];
110 + }
111 + [tempQueryIdArray addObject:queryId];
112 + [userDefaults setObject:tempQueryIdArray forKey:@"queryIds"];
113 + [userDefaults setObject:receiptStr forKey:queryId];
90 114
115 + NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil];
116 + NSString* result = [[NetCenter getInstance] httpPostSyn:ReluctantLeakOrderUrl :receiptDic];
91 117
92 if([@"success" isEqualToString:result]){//确认订单成功 118 if([@"success" isEqualToString:result]){//确认订单成功
93 - }else{//失败 119 + //删除已保存的
94 - NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults]; 120 + [userDefaults removeObjectForKey:queryId];
95 - NSMutableArray* queryIdArray = [userDefaults objectForKey:@"queryIds"]; 121 + [tempQueryIdArray removeObject:queryId];
96 -
97 - NSMutableArray* tempQueryIdArray = [[NSMutableArray alloc] initWithCapacity:10];
98 -
99 - if (queryIdArray) {
100 - }else{
101 - queryIdArray = [[NSMutableArray alloc]initWithCapacity:10];
102 - }
103 -
104 - for (NSString* arrayQueryId in queryIdArray) {
105 - [tempQueryIdArray addObject:arrayQueryId];
106 - }
107 -
108 - [tempQueryIdArray addObject:queryId];
109 [userDefaults setObject:tempQueryIdArray forKey:@"queryIds"]; 122 [userDefaults setObject:tempQueryIdArray forKey:@"queryIds"];
110 - [userDefaults setObject:receiptStr forKey:queryId]; 123 + [userDefaults removeObjectForKey:@"lastqueryid"];
111 - [userDefaults synchronize];
112 } 124 }
125 + [userDefaults synchronize];
113 } 126 }
114 127
115 /** 128 /**
116 支付 创建订单 129 支付 创建订单
117 */ 130 */
118 -- (void)SDKgzyazfWithGzyazfmentInfo:(PoolCreateOrderInfo *)payInfo 131 +- (void)SDKpayWithPaymentInfo:(PoolCreateOrderInfo *)payInfo
119 { 132 {
120 mExchange = [payInfo exchange].intValue; 133 mExchange = [payInfo exchange].intValue;
121 - [super SDKgzyazfWithGzyazfmentInfo:payInfo]; 134 + [super SDKpayWithPaymentInfo:payInfo];
122 } 135 }
123 136
124 /** 137 /**
...@@ -181,7 +194,13 @@ NSString *ResidentAppKey; ...@@ -181,7 +194,13 @@ NSString *ResidentAppKey;
181 for (NSString* queryId in queryIdArray) { 194 for (NSString* queryId in queryIdArray) {
182 NSString* receiptStr = [userDefaults valueForKey:queryId]; 195 NSString* receiptStr = [userDefaults valueForKey:queryId];
183 NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil]; 196 NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil];
184 - NSString* result = [[NetCenter getInstance] httpPostSyn:[PoolUtils createGzyazfUrl] :receiptDic]; 197 + NSString* lastReluctantLeakOrderUrl = [userDefaults objectForKey:@"lastReluctantLeakOrderUrl"];
198 + NSString* result;
199 + if (lastReluctantLeakOrderUrl!=nil) {
200 + result = [[NetCenter getInstance] httpPostSyn:lastReluctantLeakOrderUrl :receiptDic];
201 + }else{
202 + result = [[NetCenter getInstance] httpPostSyn:[PoolUtils createPayUrl] :receiptDic];
203 + }
185 if([@"success" isEqualToString:result]){//成功 204 if([@"success" isEqualToString:result]){//成功
186 [userDefaults removeObjectForKey:queryId]; 205 [userDefaults removeObjectForKey:queryId];
187 }else{//补单失败 206 }else{//补单失败
...@@ -202,7 +221,7 @@ NSString *ResidentAppKey; ...@@ -202,7 +221,7 @@ NSString *ResidentAppKey;
202 - (void)receiveCreateOrder:(NSNotification *)notification 221 - (void)receiveCreateOrder:(NSNotification *)notification
203 { 222 {
204 NSLog(@"创建订单成功"); 223 NSLog(@"创建订单成功");
205 - PoolGzyazfInfo *payInfo = [notification object]; 224 + PoolPayInfo *payInfo = [notification object];
206 225
207 NSNumber *amount = @([[payInfo postAmount] integerValue] * mExchange); 226 NSNumber *amount = @([[payInfo postAmount] integerValue] * mExchange);
208 NSString *serverId = [payInfo serverId]; 227 NSString *serverId = [payInfo serverId];
...@@ -216,10 +235,14 @@ NSString *ResidentAppKey; ...@@ -216,10 +235,14 @@ NSString *ResidentAppKey;
216 NSString *other = [payInfo other]; 235 NSString *other = [payInfo other];
217 236
218 if (other && [other length] > 0) { 237 if (other && [other length] > 0) {
219 - [[ResidentAllManager ResidentInstance] ResidentQuery:serverId :roleName :amount :[payInfo queryId] :self.controller :[payInfo serverName]]; 238 + [[ReluctantAllManager ReluctantInstance] ReluctantQuery:serverId :roleName :amount :[payInfo queryId] :self.controller :[payInfo serverName]];
220 }else{ 239 }else{
221 NSString* products = [payInfo products]; 240 NSString* products = [payInfo products];
222 - [[ResidentAllManager ResidentInstance] ResidentQueryOperation:self.controller ResidentHuoWuID:products ResidentJiaGe:[payInfo postAmount] ResidentHuoWuMing:[payInfo productName] ResidentDingDanHao:queryId]; 241 + //保存订单号到本地
242 + NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
243 + [userDefaults setObject:queryId forKey:@"lastqueryid"];
244 + [userDefaults synchronize];
245 + [[ReluctantAllManager ReluctantInstance] ReluctantQueryOperation:self.controller ReluctantHuoWuID:products ReluctantJiaGe:[payInfo postAmount] ReluctantHuoWuMing:[payInfo productName] ReluctantDingDanHao:queryId];
223 } 246 }
224 } 247 }
225 248
...@@ -229,4 +252,3 @@ NSString *ResidentAppKey; ...@@ -229,4 +252,3 @@ NSString *ResidentAppKey;
229 } 252 }
230 253
231 @end 254 @end
232 -
......
1 新接入请参考对接文档和demo<br> 1 新接入请参考对接文档和demo<br>
2 2
3 -2019-01-29:<br> 3 +2019-05-06:<br>
4 1、``` 删除poolsdk_file文件夹中原来framework ``` <br> 4 1、``` 删除poolsdk_file文件夹中原来framework ``` <br>
5 -2、``` 引入poolsdk_file文件夹中Resident.framework ``` <br> 5 +2、``` 引入poolsdk_file文件夹中Reluctant.framework ``` <br>
6 3、``` 替换SDKInterface.m文件 ``` <br> 6 3、``` 替换SDKInterface.m文件 ``` <br>
7 -4、``` 替换PoolSdk.framework ``` <br>
8 -5、``` 原 URL Schemes 中的 i9133public 改为 sdk.uuufish.com (可参考demo中info设置) ``` <br>
9 -6、``` 原pool_setting文件 替换成新 public_setting文件 ``` <br>
...\ No newline at end of file ...\ No newline at end of file
7 +4、``` 替换PoolSdk.framework ``` <br>
...\ No newline at end of file ...\ No newline at end of file
......
No preview for this file type
1 +//
2 +// PGLogger.h
3 +// PanguCommonLib
4 +//
5 +// Created by ouyanghua on 14-2-22.
6 +// Copyright (c) 2014年 pangu. All rights reserved.
7 +//
8 +
1 #import <Foundation/Foundation.h> 9 #import <Foundation/Foundation.h>
2 - 10 +
3 void DGLog(NSString *fmt, ...); 11 void DGLog(NSString *fmt, ...);
4 12
5 typedef NS_ENUM(NSInteger, DGLoggerLevel) 13 typedef NS_ENUM(NSInteger, DGLoggerLevel)
...@@ -11,7 +19,7 @@ typedef NS_ENUM(NSInteger, DGLoggerLevel) ...@@ -11,7 +19,7 @@ typedef NS_ENUM(NSInteger, DGLoggerLevel)
11 ELogError 19 ELogError
12 }; 20 };
13 21
14 -@interface ResidentDGLogger : NSObject 22 +@interface DGLogger : NSObject
15 23
16 + (void)showLog:(NSString *)fmt,...; 24 + (void)showLog:(NSString *)fmt,...;
17 25
......
1 +//
2 +// NetCenter.h
3 +// public_i9133
4 +//
5 +// Created by winFan on 12/2/15.
6 +// Copyright (c) 2015 winFan. All rights reserved.
7 +//
8 +
1 #import <Foundation/Foundation.h> 9 #import <Foundation/Foundation.h>
2 10
3 @interface NetCenter : NSObject 11 @interface NetCenter : NSObject
......
1 +//
2 +// OtherSetting.h
3 +// PoolSdk
4 +//
5 +// Created by winFan on 11/23/15.
6 +// Copyright (c) 2015 winFan. All rights reserved.
7 +//
8 +
1 #ifndef __PoolSdk__OtherSetting__ 9 #ifndef __PoolSdk__OtherSetting__
2 #define __PoolSdk__OtherSetting__ 10 #define __PoolSdk__OtherSetting__
3 11
......
1 +//
2 +// PoolBaseModel.h
3 +// public_i9133
4 +//
5 +// Created by winFan on 12/2/15.
6 +// Copyright (c) 2015 winFan. All rights reserved.
7 +//
8 +
9 +
10 +#import <Foundation/Foundation.h>
11 +#import "OtherSetting.h"
12 +@interface PoolBaseModel : NSObject
13 +
14 +- (NSString *)objectToJsonString;
15 +- (NSMutableString *)paramAddToString;
16 +- (id)initWithDiction:(NSDictionary *)diction;
17 +
18 +@end
...\ No newline at end of file ...\ No newline at end of file
1 +//
2 +// PoolLoginChecker.h
3 +// public_i9133
4 +//
5 +// Created by winFan on 12/1/15.
6 +// Copyright (c) 2015 winFan. All rights reserved.
7 +//
1 #import <Foundation/Foundation.h> 8 #import <Foundation/Foundation.h>
2 #import "PoolSdk/PoolLoginInfo.h" 9 #import "PoolSdk/PoolLoginInfo.h"
3 #import "PoolSdk/PoolNotification.h" 10 #import "PoolSdk/PoolNotification.h"
...@@ -5,21 +12,21 @@ ...@@ -5,21 +12,21 @@
5 #import "PoolSdk/PoolPayInfo.h" 12 #import "PoolSdk/PoolPayInfo.h"
6 #import "PoolReportInfo.h" 13 #import "PoolReportInfo.h"
7 #import "PoolSdkDelegate.h" 14 #import "PoolSdkDelegate.h"
8 - 15 +
9 @interface PoolChecker : NSObject<PoolSdkDelegate> 16 @interface PoolChecker : NSObject<PoolSdkDelegate>
10 @property(nonatomic, strong)NSString *userId; 17 @property(nonatomic, strong)NSString *userId;
11 @property(nonatomic, strong)id<PoolSdkDelegate> mPoolSdkDelegate; 18 @property(nonatomic, strong)id<PoolSdkDelegate> mPoolSdkDelegate;
12 19
13 -@property bool onlyOneTimeGzyazf; 20 +@property bool onlyOneTimePay;
14 + (PoolChecker *)getInstance; 21 + (PoolChecker *)getInstance;
15 - (void)initChecker; 22 - (void)initChecker;
16 - (void)startCheck:(PoolLoginInfo *)loginInfo; 23 - (void)startCheck:(PoolLoginInfo *)loginInfo;
17 -- (void) createOrder:(PoolCreateOrderInfo *)gzyazfInfo; 24 +- (void) createOrder:(PoolCreateOrderInfo *)payInfo;
18 -- (void) ResidentreportOpen; 25 +- (void) reportOpen;
19 -- (void) ResidentreportSDKOpen; 26 +- (void) reportSDKOpen;
20 -- (void)ResidenthandleFirstOpenApp:(NSString*) path; 27 +- (void)handleFirstOpenApp:(NSString*) path;
21 - (void) reportEnter:(PoolReportInfo *)reInfo; 28 - (void) reportEnter:(PoolReportInfo *)reInfo;
22 -- (void) ResidentReport:(NSString *)_action :(PoolReportInfo *)reInfo; 29 +- (void) report:(NSString *)_action :(PoolReportInfo *)reInfo;
23 - (void)sendNotice:(PoolSDKNotificationType)notiType 30 - (void)sendNotice:(PoolSDKNotificationType)notiType
24 notiName:(NSString *)notiName 31 notiName:(NSString *)notiName
25 statusCode:(int)nCode 32 statusCode:(int)nCode
...@@ -28,7 +35,10 @@ ...@@ -28,7 +35,10 @@
28 35
29 - (void)startCheckDelegate:(PoolLoginInfo *)loginInfo; 36 - (void)startCheckDelegate:(PoolLoginInfo *)loginInfo;
30 37
31 -- (void)ResidentStartCheckDelegate:(PoolLoginInfo *)loginInfo type:(int)type; 38 +/**
39 + *type PoolSDKNotificationLogin 为登录验证 PoolSDKNotificationSwitchAccount 为切换账号成功验证
40 + */
41 +- (void)startCheckDelegate:(PoolLoginInfo *)loginInfo type:(int)type;
32 42
33 /* 43 /*
34 *初始化时调用 44 *初始化时调用
......
1 +//
2 +// PoolConfig.h
3 +// PoolSdk
4 +//
5 +// Created by winFan on 12/11/15.
6 +// Copyright (c) 2015 winFan. All rights reserved.
7 +//
8 +
1 #import <Foundation/Foundation.h> 9 #import <Foundation/Foundation.h>
2 - 10 +
3 @interface PoolConfig : NSObject 11 @interface PoolConfig : NSObject
4 12
5 @property(nonatomic, strong)NSString *gameSimpleName; 13 @property(nonatomic, strong)NSString *gameSimpleName;
6 @property(nonatomic, strong)NSString *sdkSimpleName; 14 @property(nonatomic, strong)NSString *sdkSimpleName;
7 @property(nonatomic, strong)NSString *sdkVersionCode; 15 @property(nonatomic, strong)NSString *sdkVersionCode;
8 @property(nonatomic, strong)NSString *loginCheckUrl; 16 @property(nonatomic, strong)NSString *loginCheckUrl;
9 -@property(nonatomic, strong)NSString *gzyazfOrderUrl; 17 +@property(nonatomic, strong)NSString *payOrderUrl;
10 -@property(nonatomic, strong)NSString *gzyazfCheckUrl; 18 +@property(nonatomic, strong)NSString *payCheckUrl;
11 @property(nonatomic, strong)NSString *c1; 19 @property(nonatomic, strong)NSString *c1;
12 @property(nonatomic, strong)NSString *c2; 20 @property(nonatomic, strong)NSString *c2;
13 @property(nonatomic, strong)NSString *custom; 21 @property(nonatomic, strong)NSString *custom;
...@@ -20,4 +28,4 @@ ...@@ -20,4 +28,4 @@
20 28
21 - (void) updateC1C2Value:(NSString *)c1 c2:(NSString *)c2; 29 - (void) updateC1C2Value:(NSString *)c1 c2:(NSString *)c2;
22 30
23 -@end 31 +@end
...\ No newline at end of file ...\ No newline at end of file
......
1 -#import "PoolSdk/ResidentPoolBaseModel.h" 1 +//
2 -@interface PoolCreateOrderInfo : ResidentPoolBaseModel 2 +// PayInfo.h
3 +// public_i9133
4 +//
5 +// Created by winFan on 12/3/15.
6 +// Copyright (c) 2015 winFan. All rights reserved.
7 +//
8 +
9 +
10 +#import "PoolSdk/PoolBaseModel.h"
11 +@interface PoolCreateOrderInfo : PoolBaseModel
3 12
4 @property(nonatomic,strong)NSString *serverId;//服务器ID 13 @property(nonatomic,strong)NSString *serverId;//服务器ID
5 @property(nonatomic, strong)NSString *serverName;//服务器名称 14 @property(nonatomic, strong)NSString *serverName;//服务器名称
...@@ -16,7 +25,7 @@ ...@@ -16,7 +25,7 @@
16 @property(nonatomic, strong)NSString *userId;//用户ID 25 @property(nonatomic, strong)NSString *userId;//用户ID
17 @property(nonatomic, strong)NSString *timestamp;//时间戳 26 @property(nonatomic, strong)NSString *timestamp;//时间戳
18 27
19 -- (NSString *) ResidentGetTsign ; 28 +- (NSString *) getTsign ;
20 -- (NSString *) ResidentGetTimestamp ; 29 +- (NSString *) getTimestamp ;
21 30
22 -@end 31 +@end
...\ No newline at end of file ...\ No newline at end of file
......
1 -#import "PoolSdk/ResidentPoolBaseModel.h" 1 +//
2 -@interface PoolLoginInfo : ResidentPoolBaseModel 2 +// PoolLoginInfo.h
3 +// public_i9133
4 +//
5 +// Created by winFan on 12/1/15.
6 +// Copyright (c) 2015 winFan. All rights reserved.
7 +//
8 +
9 +#import "PoolSdk/PoolBaseModel.h"
10 +@interface PoolLoginInfo : PoolBaseModel
3 11
4 @property(nonatomic,strong)NSString *timestamp; 12 @property(nonatomic,strong)NSString *timestamp;
5 -@property(nonatomic, strong)NSString *sign; 13 +@property(nonatomic, strong)NSString *sign;//serverSign
6 -@property(nonatomic, strong)NSString *other; 14 +@property(nonatomic, strong)NSString *other;//透传
7 @property(nonatomic, strong)NSString *openId; 15 @property(nonatomic, strong)NSString *openId;
8 @property(nonatomic, strong)NSString *userType; 16 @property(nonatomic, strong)NSString *userType;
9 17
10 18
11 -@end 19 +@end
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -18,7 +18,7 @@ extern NSString * const _create_order_notification; /**< */ ...@@ -18,7 +18,7 @@ extern NSString * const _create_order_notification; /**< */
18 typedef NS_ENUM(int, PoolSDKNotificationType) { 18 typedef NS_ENUM(int, PoolSDKNotificationType) {
19 PoolSDKNotificationLogin = 1,//登录 19 PoolSDKNotificationLogin = 1,//登录
20 PoolSDKNotificationLogout,//注销 20 PoolSDKNotificationLogout,//注销
21 - PoolSDKNotificationGzyazf,//支付完成 21 + PoolSDKNotificationPay,//支付完成
22 PoolSDKNotificationPause,//暂停退出 22 PoolSDKNotificationPause,//暂停退出
23 PoolSDKNotificationRole,//创建角色 23 PoolSDKNotificationRole,//创建角色
24 PoolSDKNotificationInitSDK,//初始化SDK 24 PoolSDKNotificationInitSDK,//初始化SDK
......
1 -#import "PoolSdk/ResidentPoolBaseModel.h" 1 +//
2 -@interface PoolGzyazfInfo : ResidentPoolBaseModel 2 +// PoolPayInfo.h
3 +// public_i9133
4 +//
5 +// Created by winFan on 12/3/15.
6 +// Copyright (c) 2015 winFan. All rights reserved.
7 +//
8 +
9 +
10 +#import "PoolSdk/PoolBaseModel.h"
11 +@interface PoolPayInfo : PoolBaseModel
3 12
4 @property(nonatomic, strong)NSString *serverId; 13 @property(nonatomic, strong)NSString *serverId;
5 @property(nonatomic, strong)NSString *queryId; 14 @property(nonatomic, strong)NSString *queryId;
...@@ -19,4 +28,4 @@ ...@@ -19,4 +28,4 @@
19 @property(nonatomic, strong)NSString *productDesc;//产品描述 28 @property(nonatomic, strong)NSString *productDesc;//产品描述
20 @property(nonatomic, strong)NSString *exchange;//兑换比例 29 @property(nonatomic, strong)NSString *exchange;//兑换比例
21 30
22 -@end 31 +@end
...\ No newline at end of file ...\ No newline at end of file
......
1 // 1 //
2 -// ResidentPoolReportInfo.h 2 +// PoolReportInfo.h
3 // PoolSdk 3 // PoolSdk
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 "PoolSdk/ResidentPoolBaseModel.h" 9 +#import "PoolSdk/PoolBaseModel.h"
10 -@interface PoolReportInfo : ResidentPoolBaseModel 10 +@interface PoolReportInfo : PoolBaseModel
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
...@@ -30,16 +30,14 @@ ...@@ -30,16 +30,14 @@
30 30
31 @property(nonatomic, strong)NSString *openId; 31 @property(nonatomic, strong)NSString *openId;
32 32
33 -#define REPORT_URL @"https://statistic.public.sdk.gzyouai.com/sdk/statistic" 33 +#define REPORT_URL @"https://statistic.public.sdk.gzyouai.com/sdk/statistic" //http://183.57.76.181:9030/sdk/statistic
34 34
35 -#define REPORT_IDFA_URL @"https://statistic.public.sdk.gzyouai.com/sdk/last_channel?idfa=%@&sdkSimpleName=%@&gameSimpleName=%@" 35 +#define REPORT_IDFA_URL @"https://statistic.public.sdk.gzyouai.com/sdk/last_channel?idfa=%@&sdkSimpleName=%@&gameSimpleName=%@" //@"http://183.57.76.181:9030/sdk/last_channel?idfa="//
36 36
37 #define REPORT_OPEN @"open" 37 #define REPORT_OPEN @"open"
38 #define REPORT_ENTER @"enter" 38 #define REPORT_ENTER @"enter"
39 #define REPORT_CREATEROLE @"createrole" 39 #define REPORT_CREATEROLE @"createrole"
40 #define REPORT_ROLEUPGRADE @"roleupgrade" 40 #define REPORT_ROLEUPGRADE @"roleupgrade"
41 #define REPORT_SDK_OPEN @"opensdk" 41 #define REPORT_SDK_OPEN @"opensdk"
42 -#define REPORT_EXIT @"exit"
43 -#define REPORT_SELECT_SERVER @"selectserver"
44 42
45 @end 43 @end
......
1 +//
2 +// PoolSdk.h
3 +// PoolSdk
4 +//
5 +// Created by winFan on 11/23/15.
6 +// Copyright (c) 2015 winFan. All rights reserved.
7 +//
8 +
1 #import <Foundation/Foundation.h> 9 #import <Foundation/Foundation.h>
2 #import "PoolSdk2.h" 10 #import "PoolSdk2.h"
3 -
4 #import <UIKit/UIKit.h> 11 #import <UIKit/UIKit.h>
5 12
6 @interface PoolSdk : NSObject 13 @interface PoolSdk : NSObject
7 - 14 +/**
15 + * 当前SDK的版本
16 + */
8 @property(nonatomic, strong, readonly)NSString *sdkVersion; 17 @property(nonatomic, strong, readonly)NSString *sdkVersion;
9 18
10 - 19 +/**
20 + * 用于设置url types schemes 默认为工程名
21 + */
11 @property(nonatomic, strong)NSString *urlSchemes; 22 @property(nonatomic, strong)NSString *urlSchemes;
12 23
13 -@property BOOL isAppleGzyazfing;
14 24
15 -+ (PoolSdk *)shareSDK;
16 25
26 +/**
27 + 获取SDK实例对象
28 + */
29 ++ (PoolSdk *)shareSDK;
17 30
31 +/**
32 + 初始化SDK
33 + */
18 - (void)initSDK:(UIViewController *) control; 34 - (void)initSDK:(UIViewController *) control;
19 35
20 36
...@@ -22,60 +38,131 @@ ...@@ -22,60 +38,131 @@
22 38
23 - (void)setViewController:(UIViewController *)viewController; 39 - (void)setViewController:(UIViewController *)viewController;
24 40
25 - 41 +/**
42 + 登录SDK
43 + */
26 - (void)loginSDK; 44 - (void)loginSDK;
27 45
28 - (void)loginSDK:(UIViewController *)viewController; 46 - (void)loginSDK:(UIViewController *)viewController;
29 47
30 - 48 +/**
31 -- (void)gzyazfWithGzyazfmentInfo:(PoolCreateOrderInfo *)gzyazfInfo; 49 + 进行支付
50 + */
51 +- (void)payWithPaymentInfo:(PoolCreateOrderInfo *)payInfo;
32 52
33 53
54 +/**
55 + *是否含有用户中心接口
56 + **/
34 - (BOOL)hasUserCenter; 57 - (BOOL)hasUserCenter;
35 58
36 - 59 +/**
60 + 用户中心
61 + */
37 - (void)gotoUserCenter; 62 - (void)gotoUserCenter;
38 63
39 - 64 +/**
65 + report
66 + */
40 - (void)reportSDK:(PoolReportInfo *)reportInfo; 67 - (void)reportSDK:(PoolReportInfo *)reportInfo;
41 68
42 - 69 +/**
70 + *是否含有注销接口
71 + */
43 - (BOOL)hasLogout; 72 - (BOOL)hasLogout;
44 73
45 - 74 +/**
75 + 注销
76 + */
46 - (void)logoutSDK; 77 - (void)logoutSDK;
47 78
48 - 79 +/**
80 + *是否含有切换账号接口
81 + **/
49 - (BOOL)hasSwitchAccount; 82 - (BOOL)hasSwitchAccount;
50 83
51 - 84 +/**
85 + *切换账号
86 + **/
52 - (void)switchAccount; 87 - (void)switchAccount;
53 88
54 89
90 +/**
91 + *是否含有退出接口
92 + **/
55 - (BOOL)hasExit; 93 - (BOOL)hasExit;
56 94
57 - 95 +/**
96 + 退出
97 + */
58 - (void)exitSDK; 98 - (void)exitSDK;
59 99
100 +/**
101 + *SDK销毁操作(游戏退出时调用)
102 + */
60 - (void)destroySDK; 103 - (void)destroySDK;
61 104
105 +/**
106 + 显示/隐藏浮标
107 + */
108 +//- (void)showFloatIcon:(BOOL)bFlag;
109 +
110 +
111 +/**
112 + // called in - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url
113 + */
114 +
115 +/**
116 + 应用 appid
117 + */
118 +
119 +/**
120 + 应用支持的方向 默认为 EDreamSDKOrientationLandscape
121 + */
62 @property(nonatomic, assign)ESDKOrientation sdkOrientation; 122 @property(nonatomic, assign)ESDKOrientation sdkOrientation;
63 123
124 +/**
125 + 浮标是否已经显示,默认为NO
126 + */
64 @property(nonatomic, assign)BOOL bShowedFloat; 127 @property(nonatomic, assign)BOOL bShowedFloat;
65 128
66 129
130 +/**
131 + serverId
132 + */
67 @property(nonatomic, assign)int serverId; 133 @property(nonatomic, assign)int serverId;
68 134
69 - 135 +/**
136 + 获取gamechannelid
137 + */
70 -(NSString *) getGameChannelId; 138 -(NSString *) getGameChannelId;
71 139
140 +/**
141 + 获取Custom
142 + */
72 - (NSString *) getCustomValue; 143 - (NSString *) getCustomValue;
73 144
145 +/**
146 + 获取ChannelParameter1
147 + */
74 - (NSString *) getChannelParameter1; 148 - (NSString *) getChannelParameter1;
75 149
150 +/**
151 + 获取ChannelParameter2
152 + */
76 - (NSString *) getChannelParameter2; 153 - (NSString *) getChannelParameter2;
77 154
78 --(void)gzyazfmentSuccess:(NSString*)accountId orderId:(NSString*)orderId currencyAmount:(double)amount currencyType:(NSString*)currencyType gzyazfType:(NSString*)gzyazfType custom:(NSArray*)customArray; 155 +
156 +/**
157 + *充值统计参数
158 + *accountId 账号ID,必填项, 和登陆、注册使用的accountId保持一致即可。
159 + *orderId 订单Id,必填项,请保证该值的全局唯一,系统会使用订单Id进行付费订单排重。
160 + *currencyAmount 货币金额,单位为元,支持小数
161 + *currencyType 货币类型
162 + *payType 支付类型(渠道)
163 + *custom 自定义扩展参数
164 + */
165 +-(void)paymentSuccess:(NSString*)accountId orderId:(NSString*)orderId currencyAmount:(double)amount currencyType:(NSString*)currencyType payType:(NSString*)payType custom:(NSArray*)customArray;
79 166
80 167
81 - (void)handleOpenurl:(NSURL *)url; 168 - (void)handleOpenurl:(NSURL *)url;
...@@ -86,9 +173,9 @@ ...@@ -86,9 +173,9 @@
86 173
87 - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken; 174 - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken;
88 175
89 - 176 +//推送
90 - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo ; 177 - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo ;
91 - 178 +//推送
92 - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler; 179 - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler;
93 180
94 181
......
1 +//
2 +// PoolSdk.h
3 +// PoolSdk
4 +//
5 +// Created by 许 on 16/1/15.
6 +// Copyright © 2016年 许. All rights reserved.
7 +//
8 +// In this header, you should import all the public headers of your framework using statements like #import <PoolSdk/PublicHeader.h>
9 +
1 #import <UIKit/UIKit.h> 10 #import <UIKit/UIKit.h>
2 #import "PoolChecker.h" 11 #import "PoolChecker.h"
12 +#import "Interface.h"
3 #import "PoolReportInfo.h" 13 #import "PoolReportInfo.h"
4 #import "PoolLoginInfo.h" 14 #import "PoolLoginInfo.h"
5 -#import "Interface.h"
6 #import "PoolNotification.h" 15 #import "PoolNotification.h"
7 #import "PoolPayInfo.h" 16 #import "PoolPayInfo.h"
8 #import "UnionInterface.h" 17 #import "UnionInterface.h"
...@@ -12,3 +21,4 @@ ...@@ -12,3 +21,4 @@
12 #import "NetCenter.h" 21 #import "NetCenter.h"
13 #import "PoolSdk.h" 22 #import "PoolSdk.h"
14 #import "PoolSdkDelegate.h" 23 #import "PoolSdkDelegate.h"
24 +
......
1 +//
2 +// PoolSdkDelegate.h
3 +// PoolSdk_i9133
4 +//
5 +// Created by 许 on 17/6/30.
6 +// Copyright © 2017年 许. All rights reserved.
7 +//
8 +
1 #import <Foundation/Foundation.h> 9 #import <Foundation/Foundation.h>
2 - 10 +
3 @protocol PoolSdkDelegate <NSObject> 11 @protocol PoolSdkDelegate <NSObject>
4 @optional 12 @optional
5 -(void)PoolSdkLoginSuccess:(PoolLoginInfo*)loginInfo; 13 -(void)PoolSdkLoginSuccess:(PoolLoginInfo*)loginInfo;
......
1 +//
2 +// PoolUtils.h
3 +// public_i9133
4 +//
5 +// Created by winFan on 12/3/15.
6 +// Copyright (c) 2015 winFan. All rights reserved.
7 +//
8 +
9 +
1 #import <Foundation/Foundation.h> 10 #import <Foundation/Foundation.h>
2 #import <UIKit/UIKit.h> 11 #import <UIKit/UIKit.h>
3 - 12 +
4 @interface PoolUtils : NSObject 13 @interface PoolUtils : NSObject
5 14
6 +(NSString *)md5:(NSString *)str; 15 +(NSString *)md5:(NSString *)str;
7 -+ (NSDictionary *)ResidentDictionaryWithJsonString:(NSString *)jsonString; 16 ++ (NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString;
8 -+(NSString *)createGzyazfOrderUrl; 17 ++(NSString *)createPayOrderUrl;
9 //*充值回调地址 18 //*充值回调地址
10 -+(NSString *)createGzyazfUrl; 19 ++(NSString *)createPayUrl;
11 20
12 +(UIActivityIndicatorView *)showLoadingDialog:(UIView*)parentView; 21 +(UIActivityIndicatorView *)showLoadingDialog:(UIView*)parentView;
13 +(void)dismissLoadingDialog:(UIActivityIndicatorView*)indicatorView; 22 +(void)dismissLoadingDialog:(UIActivityIndicatorView*)indicatorView;
14 23
15 -@end 24 +@end
...\ No newline at end of file ...\ No newline at end of file
......
1 -#import <Foundation/Foundation.h>
2 -#import "OtherSetting.h"
3 -
4 -@interface ResidentPoolBaseModel : NSObject
5 -
6 -- (NSString *)ResidentObjectToJsonString;
7 -- (NSMutableString *)paramAddToString;
8 -- (id)initWithDiction:(NSDictionary *)diction;
9 -
10 -@end
1 +//
2 +// NewTtack.h
3 +// NewTtack
4 +//
5 +// Created by yun on 16/1/11.
6 +// Copyright © 2016年 yun. All rights reserved.
7 +//
1 #define TRACK_VERSION @"1.0.1" 8 #define TRACK_VERSION @"1.0.1"
9 +
2 #import <Foundation/Foundation.h> 10 #import <Foundation/Foundation.h>
3 #import <UIKit/UIKit.h> 11 #import <UIKit/UIKit.h>
4 12
13 +
14 +/*
15 + 热云移动广告效果监测 平台 api 请选择对应的api进行使用
16 + */
5 NS_ASSUME_NONNULL_BEGIN 17 NS_ASSUME_NONNULL_BEGIN
6 @interface TrackingIO : NSObject 18 @interface TrackingIO : NSObject
19 +//开启打印日志 正式上线包请关掉
7 +(void) setPrintLog :(BOOL)print; 20 +(void) setPrintLog :(BOOL)print;
21 +// 开启数据统计
8 + (void)initWithappKey:(NSString *)appKey withChannelId:(NSString *)channelId; 22 + (void)initWithappKey:(NSString *)appKey withChannelId:(NSString *)channelId;
23 +//注册成功后调用
9 + (void)setRegisterWithAccountID:(NSString *)account; 24 + (void)setRegisterWithAccountID:(NSString *)account;
25 +//登陆成功后调用
10 + (void)setLoginWithAccountID:(NSString *)account; 26 + (void)setLoginWithAccountID:(NSString *)account;
11 -+(void)setGzyazfmentStart:(NSString *)transactionId gzyazfmentType:(NSString*)gzyazfmentType currentType:(NSString*)currencyType currencyAmount:(float)currencyAmount; 27 +//开始付费时 调用(人民币单位是元)
12 -+(void)setGzyazfment:(NSString *)transactionId gzyazfmentType:(NSString*)gzyazfmentType currentType:(NSString*)currencyType currencyAmount:(float)currencyAmount; 28 ++(void)setPaymentStart:(NSString *)transactionId paymentType:(NSString*)paymentType currentType:(NSString*)currencyType currencyAmount:(float)currencyAmount;
29 +// 支付完成,付费分析,记录玩家充值的金额(人民币单位是元)
30 ++(void)setPayment:(NSString *)transactionId paymentType:(NSString*)paymentType currentType:(NSString*)currencyType currencyAmount:(float)currencyAmount;
31 +//自定义事件
13 +(void)setEvent:(NSString *)eventName andExtra:(nullable NSDictionary *)extra; 32 +(void)setEvent:(NSString *)eventName andExtra:(nullable NSDictionary *)extra;
33 +//标准接口
14 +(void)setProfile:(NSDictionary *)dataDic; 34 +(void)setProfile:(NSDictionary *)dataDic;
35 +//获取设备信息
15 +(NSString*)getDeviceId; 36 +(NSString*)getDeviceId;
16 @end 37 @end
17 NS_ASSUME_NONNULL_END 38 NS_ASSUME_NONNULL_END
......
1 +//
2 +// UnionInterface.h
3 +// PoolSdk
4 +//
5 +// Created by winFan on 11/23/15.
6 +// Copyright (c) 2015 winFan. All rights reserved.
7 +//
1 #import <Foundation/Foundation.h> 8 #import <Foundation/Foundation.h>
2 #import <UIKit/UIKit.h> 9 #import <UIKit/UIKit.h>
3 -#import "PoolSdk2.h" 10 +#import "PoolCreateOrderInfo.h"
4 - 11 +#import "PoolReportInfo.h"
12 +
5 @protocol UnionInterface 13 @protocol UnionInterface
6 /** 14 /**
7 初始化SDK 15 初始化SDK
8 */ 16 */
9 17
10 -//[[PoolChecker getInstance] sendNotice:PoolSDKNotificationGzyazf notiName:@"" statusCode:POOLSDK_NO_ERROR description:@"" extendData:order_id]; 18 +//[[PoolChecker getInstance] sendNotice:PoolSDKNotificationPay notiName:@"" statusCode:POOLSDK_NO_ERROR description:@"" extendData:order_id];
11 19
12 - (void)SDKinit:(UIViewController *) control; 20 - (void)SDKinit:(UIViewController *) control;
13 21
...@@ -83,7 +91,7 @@ ...@@ -83,7 +91,7 @@
83 进行支付 91 进行支付
84 */ 92 */
85 93
86 -- (void)SDKgzyazfWithGzyazfmentInfo:(PoolCreateOrderInfo *)gzyazfInfo; 94 +- (void)SDKpayWithPaymentInfo:(PoolCreateOrderInfo *)payInfo;
87 - (void)receiveCreateOrder: (NSNotification *)notification; 95 - (void)receiveCreateOrder: (NSNotification *)notification;
88 96
89 /** 97 /**
...@@ -92,9 +100,9 @@ ...@@ -92,9 +100,9 @@
92 *orderId 订单Id,必填项,请保证该值的全局唯一,系统会使用订单Id进行付费订单排重。 100 *orderId 订单Id,必填项,请保证该值的全局唯一,系统会使用订单Id进行付费订单排重。
93 *currencyAmount 货币金额,单位为元,支持小数 101 *currencyAmount 货币金额,单位为元,支持小数
94 *currencyType 货币类型 102 *currencyType 货币类型
95 - *gzyazfType 支付类型(渠道) 103 + *payType 支付类型(渠道)
96 */ 104 */
97 --(void)gzyazfmentSuccess:(NSString*)accountId orderId:(NSString*)orderId currencyAmount:(double)amount currencyType:(NSString*)currencyType gzyazfType:(NSString*)gzyazfType custom:(NSArray *)customArray; 105 +-(void)paymentSuccess:(NSString*)accountId orderId:(NSString*)orderId currencyAmount:(double)amount currencyType:(NSString*)currencyType payType:(NSString*)payType custom:(NSArray *)customArray;
98 106
99 - (void)handleOpenurl:(NSURL *)url; 107 - (void)handleOpenurl:(NSURL *)url;
100 - (NSUInteger) application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window; 108 - (NSUInteger) application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window;
...@@ -121,4 +129,4 @@ ...@@ -121,4 +129,4 @@
121 -(BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options; 129 -(BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options;
122 130
123 - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation; 131 - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation;
124 -@end 132 +@end
...\ No newline at end of file ...\ No newline at end of file
......
1 +#import <UIKit/UIKit.h>
2 +#import "StoreKit/StoreKit.h"
3 +
4 +@interface ReluctantAllManager : NSObject
5 +{
6 + NSString* ReluctantAPPID_;
7 + NSString* ReluctantAPPKEY_;
8 +
9 + NSString* ReluctantInviterCode_;
10 +}
11 +
12 +@property bool ReluctantGeiWoHuaQianBa;
13 +
14 ++ (ReluctantAllManager *)ReluctantInstance;
15 +
16 +- (void)ReluctantChuShiHua;
17 +
18 +- (void)ReluctantDengLu:(NSString *)ReluctantAPPID : (NSString *)ReluctantAPPKEY : (UIViewController *)controller;
19 +
20 +- (void)ReluctantYangShi:(NSString*)ReluctantLeiXing;
21 +
22 +- (void)ReluctantQuery: (NSString *)ReluctantFuWuQiID : (NSString *)ReluctantNickName : (NSNumber *)ReluctantAmount : (NSString *)ReluctantCallBack : (UIViewController *)controller : (NSString *)ReluctantServerName;
23 +
24 +- (void)ReluctantQueryOperation:(UIViewController*)controll ReluctantHuoWuID:(NSString*)products ReluctantJiaGe:(NSString*)amount ReluctantHuoWuMing:(NSString*)productName ReluctantDingDanHao:(NSString*) DingDanHao;
25 +
26 +
27 +
28 +@end
1 +#import <Foundation/Foundation.h>
2 +
3 +extern NSString * const ReluctantExitNotification;
4 +extern NSString * const ReluctantLoginNotification;
5 +extern NSString * const ReluctantErrorNotification;
6 +
7 +
8 +@interface ReluctantHuiTiaoNotification : NSObject
9 +
10 +@end
1 +#import <UIKit/UIKit.h>
2 +
3 +@interface ReluctantIAPHelperControl : NSObject<UITableViewDelegate, UITableViewDataSource>
4 +
5 +@property(nonatomic,strong) NSString* ReluctantDingDanHao;
6 +@property(nonatomic,strong) NSDictionary* ReluctantHuoWuLieBiao;
7 +@property(nonatomic,strong) NSMutableArray* ReluctantHuoWuIDLieBiao;
8 +@property(nonatomic, strong) UITableView *ReluctantHuoWuLieBiaoView;
9 +
10 +- (void)ReluctantHuaQianView:(UIViewController*)controller ReluctantHuoWuD:(NSString*)products ReluctantQian:(NSString*)amount ReluctantHuoWuMing:(NSString*)productName ReluctantDingDanHao:(NSString*)DingDanHao;
11 +
12 +@end
1 #import <Foundation/Foundation.h> 1 #import <Foundation/Foundation.h>
2 2
3 -@interface ResidentInformation : NSObject 3 +@interface ReluctantInformation : NSObject
4 { 4 {
5 // 5 //
6 NSString *openId; 6 NSString *openId;
...@@ -12,5 +12,5 @@ NSString *timestamp; ...@@ -12,5 +12,5 @@ NSString *timestamp;
12 @property(retain,nonatomic) NSString *openId; 12 @property(retain,nonatomic) NSString *openId;
13 @property(retain,nonatomic) NSString *token; 13 @property(retain,nonatomic) NSString *token;
14 @property(retain,nonatomic) NSString *timestamp; 14 @property(retain,nonatomic) NSString *timestamp;
15 -+ (ResidentInformation *)getInstance; 15 ++ (ReluctantInformation *)getInstance;
16 @end 16 @end
......
1 #import <Foundation/Foundation.h> 1 #import <Foundation/Foundation.h>
2 2
3 -@interface ResidentInformationJM : NSObject 3 +@interface ReluctantInformationJM : NSObject
4 4
5 -+(NSString *)ResidentJM:(NSString *)jm; 5 ++(NSString *)ReluctantJM:(NSString *)jm;
6 6
7 @end 7 @end
......
1 #import <UIKit/UIKit.h> 1 #import <UIKit/UIKit.h>
2 2
3 -@interface ResidentLocation : NSObject 3 +@interface ReluctantLocation : NSObject
4 4
5 -+ (NSString *)ResidentSKCloudServiceSetupOptionsKey; 5 ++ (NSString *)ReluctantSKCloudServiceSetupOptionsKey;
6 @end 6 @end
7 7
......
1 #import <UIKit/UIKit.h> 1 #import <UIKit/UIKit.h>
2 -#import "ResidentInformation.h" 2 +#import "ReluctantInformation.h"
3 #import <JavaScriptCore/JavaScriptCore.h> 3 #import <JavaScriptCore/JavaScriptCore.h>
4 4
5 -@interface ResidentMain : UIViewController<UIWebViewDelegate,UIAlertViewDelegate> 5 +@interface ReluctantMain : UIViewController<UIWebViewDelegate,UIAlertViewDelegate>
6 { 6 {
7 - UIWebView *webView_; 7 + UIWebView *webReluctantView_;
8 UIActivityIndicatorView *activityIndicator; 8 UIActivityIndicatorView *activityIndicator;
9 } 9 }
10 10
11 -@property(assign) BOOL ResidentYouYuanJiao; 11 +@property(assign) BOOL ReluctantYouYuanJiao;
12 12
13 -- (void)ResidentSettingCKAssetsView:(int)webViewWidth :(int) webViewHeight :(int) screenwidth :(int) screenHeight; 13 +- (void)ReluctantSettingReluctantView:(int)webViewWidth :(int) webViewHeight :(int) screenwidth :(int) screenHeight;
14 -- (void)ResidentChuShiHuaWebView; 14 +- (void)ReluctantInitWebView;
15 - (void)loadWebPageWithString:(NSString *)url; 15 - (void)loadWebPageWithString:(NSString *)url;
16 - (void)loadWebPageWithJs:(NSString *)content; 16 - (void)loadWebPageWithJs:(NSString *)content;
17 - (void)postNotification:(NSString *)name : (NSString *)code; 17 - (void)postNotification:(NSString *)name : (NSString *)code;
......
1 -#import <UIKit/UIKit.h>
2 -
3 -@interface ResidentIAPHelperControl : NSObject<UITableViewDelegate, UITableViewDataSource>
4 -
5 -@property(nonatomic,strong) NSString* ResidentDingDanHao;
6 -@property(nonatomic,strong) NSDictionary* ResidentHuoWuLieBiao;
7 -@property(nonatomic,strong) NSMutableArray* ResidentHuoWuIDLieBiao;
8 -@property(nonatomic, strong) UITableView *ResidentHuoWuLieBiaoView;
9 -
10 -- (void)ResidentHuaQianView:(UIViewController*)controller ResidentHuoWuD:(NSString*)products ResidentQian:(NSString*)amount ResidentHuoWuMing:(NSString*)productName ResidentDingDanHao:(NSString*)DingDanHao;
11 -
12 -@end
1 -#import <UIKit/UIKit.h>
2 -#import "StoreKit/StoreKit.h"
3 -
4 -@interface ResidentAllManager : NSObject
5 -{
6 - NSString* ResidentAPPID_;
7 - NSString* ResidentAPPKEY_;
8 -
9 - NSString* ResidentInviterCode_;
10 -}
11 -
12 -@property bool ResidentGeiWoHuaQianBa;
13 -
14 -+ (ResidentAllManager *)ResidentInstance;
15 -
16 -- (void)ResidentChuShiHua;
17 -
18 -- (void)ResidentDengLu:(NSString *)ResidentAPPID : (NSString *)ResidentAPPKEY : (UIViewController *)controller;
19 -
20 -- (void)ResidentYangShi:(NSString*)ResidentLeiXing;
21 -
22 -- (void)ResidentQuery: (NSString *)ResidentFuWuQiID : (NSString *)ResidentNickName : (NSNumber *)ResidentAmount : (NSString *)ResidentCallBack : (UIViewController *)controller : (NSString *)ResidentServerName;
23 -
24 -- (void)ResidentQueryOperation:(UIViewController*)controll ResidentHuoWuID:(NSString*)products ResidentJiaGe:(NSString*)amount ResidentHuoWuMing:(NSString*)productName ResidentDingDanHao:(NSString*) DingDanHao;
25 -
26 -
27 -
28 -@end
1 -#import <Foundation/Foundation.h>
2 -
3 -extern NSString * const ResidentExitNotification;
4 -extern NSString * const ResidentLoginNotification;
5 -extern NSString * const ResidentErrorNotification;
6 -
7 -
8 -@interface ResidentHuiTiaoNotification : NSObject
9 -
10 -@end
1 +//
2 +// UnionInterface.m
3 +// PoolSdk
4 +//
5 +// Created by winFan on 11/23/15.
6 +// Copyright (c) 2015 winFan. All rights reserved.
7 +//
1 #include "SDKInterface.h" 8 #include "SDKInterface.h"
2 #import <UIKit/UIKit.h> 9 #import <UIKit/UIKit.h>
3 10
4 -#import "Resident/ResidentAllManager.h" 11 +#import "Reluctant/ReluctantAllManager.h"
5 -#import "Resident/ResidentHuiTiaoNotification.h" 12 +#import "Reluctant/ReluctantHuiTiaoNotification.h"
6 -#import "Resident/ResidentInformation.h" 13 +#import "Reluctant/ReluctantInformation.h"
7 -
8 #import "TrackingIO.h" 14 #import "TrackingIO.h"
9 15
16 +//SDK
17 +
18 +
10 @implementation SDKInterface : Interface 19 @implementation SDKInterface : Interface
11 20
21 +
12 int mExchange; 22 int mExchange;
13 -NSString *ResidentAppId; 23 + NSString *ReluctantAppId;
14 -NSString *ResidentAppKey; 24 + NSString *ReluctantAppKey;
25 + NSString *ReluctantLeakOrderUrl;
15 26
27 +/**
28 + 初始化SDK
29 + */
16 - (void)SDKinit:(UIViewController *) control 30 - (void)SDKinit:(UIViewController *) control
17 { 31 {
18 - 32 + //必须继承
19 [super SDKinit:control]; 33 [super SDKinit:control];
20 34
21 [PoolConfig getInstance]; 35 [PoolConfig getInstance];
22 - [[ResidentAllManager ResidentInstance]ResidentChuShiHua]; 36 + [[ReluctantAllManager ReluctantInstance]ReluctantChuShiHua];
23 - [[ResidentAllManager ResidentInstance]ResidentYangShi:@"sdk"]; 37 + [[ReluctantAllManager ReluctantInstance]ReluctantYangShi:@"sdk"];
24 - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveLoginMessage:) name:ResidentLoginNotification object:nil]; 38 + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveLoginMessage:) name:ReluctantLoginNotification object:nil];
25 - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(HCKAssetsToolCallBack:) name:@"ResidentToolCallBack" object:nil]; 39 + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(youaiToolCallBack:) name:@"ReluctantToolCallBack" object:nil];
26 -
27 [[PoolChecker getInstance] sendNotice:PoolSDKNotificationInitSDK notiName:@"InitSuccess" statusCode:POOLSDK_NO_ERROR description:@"initSuccess" extendData:nil]; 40 [[PoolChecker getInstance] sendNotice:PoolSDKNotificationInitSDK notiName:@"InitSuccess" statusCode:POOLSDK_NO_ERROR description:@"initSuccess" extendData:nil];
28 41
29 NSString* channelId = [[PoolConfig getInstance] getValueByKey:@"gamechannelid"]; 42 NSString* channelId = [[PoolConfig getInstance] getValueByKey:@"gamechannelid"];
...@@ -38,10 +51,10 @@ NSString *ResidentAppKey; ...@@ -38,10 +51,10 @@ NSString *ResidentAppKey;
38 */ 51 */
39 - (void)SDKloginSDK 52 - (void)SDKloginSDK
40 { 53 {
41 - //APPID APPKEY 54 + NSLog(@"调用了LoginSDK");
42 - ResidentAppId = [[PoolConfig getInstance] getValueByKey:@"APP_ID"]; 55 + ReluctantAppId = [[PoolConfig getInstance] getValueByKey:@"APP_ID"];
43 - ResidentAppKey =[[PoolConfig getInstance] getValueByKey:@"APP_KEY"]; 56 + ReluctantAppKey =[[PoolConfig getInstance] getValueByKey:@"APP_KEY"];
44 - [[ResidentAllManager ResidentInstance]ResidentDengLu:ResidentAppId :ResidentAppKey :self.controller]; 57 + [[ReluctantAllManager ReluctantInstance]ReluctantDengLu:ReluctantAppId :ReluctantAppKey :self.controller];
45 58
46 } 59 }
47 60
...@@ -52,9 +65,9 @@ NSString *ResidentAppKey; ...@@ -52,9 +65,9 @@ NSString *ResidentAppKey;
52 { 65 {
53 NSLog(@"loginchek"); 66 NSLog(@"loginchek");
54 PoolLoginInfo *loginInfo = [PoolLoginInfo alloc]; 67 PoolLoginInfo *loginInfo = [PoolLoginInfo alloc];
55 - loginInfo.openId = [[ResidentInformation getInstance]openId]; 68 + loginInfo.openId = [[ReluctantInformation getInstance]openId];
56 - loginInfo.sign = [[ResidentInformation getInstance] token]; 69 + loginInfo.sign = [[ReluctantInformation getInstance] token];
57 - loginInfo.timestamp = [[ResidentInformation getInstance] timestamp]; 70 + loginInfo.timestamp = [[ReluctantInformation getInstance] timestamp];
58 71
59 dispatch_async(dispatch_get_global_queue(0, 0), ^{ 72 dispatch_async(dispatch_get_global_queue(0, 0), ^{
60 [[PoolChecker getInstance] startCheck:loginInfo]; 73 [[PoolChecker getInstance] startCheck:loginInfo];
...@@ -78,47 +91,47 @@ NSString *ResidentAppKey; ...@@ -78,47 +91,47 @@ NSString *ResidentAppKey;
78 苹果支付结果回调 91 苹果支付结果回调
79 */ 92 */
80 93
81 -- (void)HCKAssetsToolCallBack:(NSNotification *)notification 94 +- (void)youaiToolCallBack:(NSNotification *)notification
82 { 95 {
83 NSDictionary* payResultDic = notification.object; 96 NSDictionary* payResultDic = notification.object;
84 - 97 + NSString* receiptStr = [payResultDic objectForKey:@"ReluctantToolResult"];
85 - NSString* receiptStr = [payResultDic objectForKey:@"ResidentToolResult"];
86 NSString* queryId = [payResultDic objectForKey:@"query_id"]; 98 NSString* queryId = [payResultDic objectForKey:@"query_id"];
87 99
88 - NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil]; 100 + //收到回调,保存queryid和data
89 - NSString* result = [[NetCenter getInstance] httpPostSyn:[PoolUtils createGzyazfUrl] :receiptDic]; 101 + NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
102 + NSMutableArray* queryIdArray = [userDefaults objectForKey:@"queryIds"];
103 + NSMutableArray* tempQueryIdArray = [[NSMutableArray alloc] initWithCapacity:10];
104 + if (queryIdArray) {
105 + }else{
106 + queryIdArray = [[NSMutableArray alloc]initWithCapacity:10];
107 + }
108 + for (NSString* arrayQueryId in queryIdArray) {
109 + [tempQueryIdArray addObject:arrayQueryId];
110 + }
111 + [tempQueryIdArray addObject:queryId];
112 + [userDefaults setObject:tempQueryIdArray forKey:@"queryIds"];
113 + [userDefaults setObject:receiptStr forKey:queryId];
90 114
115 + NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil];
116 + NSString* result = [[NetCenter getInstance] httpPostSyn:ReluctantLeakOrderUrl :receiptDic];
91 117
92 if([@"success" isEqualToString:result]){//确认订单成功 118 if([@"success" isEqualToString:result]){//确认订单成功
93 - }else{//失败 119 + //删除已保存的
94 - NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults]; 120 + [userDefaults removeObjectForKey:queryId];
95 - NSMutableArray* queryIdArray = [userDefaults objectForKey:@"queryIds"]; 121 + [tempQueryIdArray removeObject:queryId];
96 -
97 - NSMutableArray* tempQueryIdArray = [[NSMutableArray alloc] initWithCapacity:10];
98 -
99 - if (queryIdArray) {
100 - }else{
101 - queryIdArray = [[NSMutableArray alloc]initWithCapacity:10];
102 - }
103 -
104 - for (NSString* arrayQueryId in queryIdArray) {
105 - [tempQueryIdArray addObject:arrayQueryId];
106 - }
107 -
108 - [tempQueryIdArray addObject:queryId];
109 [userDefaults setObject:tempQueryIdArray forKey:@"queryIds"]; 122 [userDefaults setObject:tempQueryIdArray forKey:@"queryIds"];
110 - [userDefaults setObject:receiptStr forKey:queryId]; 123 + [userDefaults removeObjectForKey:@"lastqueryid"];
111 - [userDefaults synchronize];
112 } 124 }
125 + [userDefaults synchronize];
113 } 126 }
114 127
115 /** 128 /**
116 支付 创建订单 129 支付 创建订单
117 */ 130 */
118 -- (void)SDKgzyazfWithGzyazfmentInfo:(PoolCreateOrderInfo *)payInfo 131 +- (void)SDKpayWithPaymentInfo:(PoolCreateOrderInfo *)payInfo
119 { 132 {
120 mExchange = [payInfo exchange].intValue; 133 mExchange = [payInfo exchange].intValue;
121 - [super SDKgzyazfWithGzyazfmentInfo:payInfo]; 134 + [super SDKpayWithPaymentInfo:payInfo];
122 } 135 }
123 136
124 /** 137 /**
...@@ -181,7 +194,13 @@ NSString *ResidentAppKey; ...@@ -181,7 +194,13 @@ NSString *ResidentAppKey;
181 for (NSString* queryId in queryIdArray) { 194 for (NSString* queryId in queryIdArray) {
182 NSString* receiptStr = [userDefaults valueForKey:queryId]; 195 NSString* receiptStr = [userDefaults valueForKey:queryId];
183 NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil]; 196 NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil];
184 - NSString* result = [[NetCenter getInstance] httpPostSyn:[PoolUtils createGzyazfUrl] :receiptDic]; 197 + NSString* lastReluctantLeakOrderUrl = [userDefaults objectForKey:@"lastReluctantLeakOrderUrl"];
198 + NSString* result;
199 + if (lastReluctantLeakOrderUrl!=nil) {
200 + result = [[NetCenter getInstance] httpPostSyn:lastReluctantLeakOrderUrl :receiptDic];
201 + }else{
202 + result = [[NetCenter getInstance] httpPostSyn:[PoolUtils createPayUrl] :receiptDic];
203 + }
185 if([@"success" isEqualToString:result]){//成功 204 if([@"success" isEqualToString:result]){//成功
186 [userDefaults removeObjectForKey:queryId]; 205 [userDefaults removeObjectForKey:queryId];
187 }else{//补单失败 206 }else{//补单失败
...@@ -202,7 +221,7 @@ NSString *ResidentAppKey; ...@@ -202,7 +221,7 @@ NSString *ResidentAppKey;
202 - (void)receiveCreateOrder:(NSNotification *)notification 221 - (void)receiveCreateOrder:(NSNotification *)notification
203 { 222 {
204 NSLog(@"创建订单成功"); 223 NSLog(@"创建订单成功");
205 - PoolGzyazfInfo *payInfo = [notification object]; 224 + PoolPayInfo *payInfo = [notification object];
206 225
207 NSNumber *amount = @([[payInfo postAmount] integerValue] * mExchange); 226 NSNumber *amount = @([[payInfo postAmount] integerValue] * mExchange);
208 NSString *serverId = [payInfo serverId]; 227 NSString *serverId = [payInfo serverId];
...@@ -216,10 +235,14 @@ NSString *ResidentAppKey; ...@@ -216,10 +235,14 @@ NSString *ResidentAppKey;
216 NSString *other = [payInfo other]; 235 NSString *other = [payInfo other];
217 236
218 if (other && [other length] > 0) { 237 if (other && [other length] > 0) {
219 - [[ResidentAllManager ResidentInstance] ResidentQuery:serverId :roleName :amount :[payInfo queryId] :self.controller :[payInfo serverName]]; 238 + [[ReluctantAllManager ReluctantInstance] ReluctantQuery:serverId :roleName :amount :[payInfo queryId] :self.controller :[payInfo serverName]];
220 }else{ 239 }else{
221 NSString* products = [payInfo products]; 240 NSString* products = [payInfo products];
222 - [[ResidentAllManager ResidentInstance] ResidentQueryOperation:self.controller ResidentHuoWuID:products ResidentJiaGe:[payInfo postAmount] ResidentHuoWuMing:[payInfo productName] ResidentDingDanHao:queryId]; 241 + //保存订单号到本地
242 + NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
243 + [userDefaults setObject:queryId forKey:@"lastqueryid"];
244 + [userDefaults synchronize];
245 + [[ReluctantAllManager ReluctantInstance] ReluctantQueryOperation:self.controller ReluctantHuoWuID:products ReluctantJiaGe:[payInfo postAmount] ReluctantHuoWuMing:[payInfo productName] ReluctantDingDanHao:queryId];
223 } 246 }
224 } 247 }
225 248
...@@ -229,4 +252,3 @@ NSString *ResidentAppKey; ...@@ -229,4 +252,3 @@ NSString *ResidentAppKey;
229 } 252 }
230 253
231 @end 254 @end
232 -
......
1 +{"renyunAppKey": "1", "payorderurl": "http://183.136.223.85:9020/paycheck/create", "usertype": 150, "sdkSimpleName": "apple_youyu", "gamechannelid": "", "APP_KEY": "b06b86b79c25774ec758657a7203bae6", "custom": "{}", "sdkVersionCode": "V1_1", "loginCheckUrl": "http://183.136.223.85:9010/logincheck/check/", "appScheme": "com.jghb.xinqinji", "c2": "", "c1": "", "APP_ID": "58fd78a9834e7246b8dc0eac", "paycheckurl": "http://183.136.223.85:9020/paycheck/confirm", "gameSimpleName": "fytx_test"}
1 -{"renyunAppKey": "edac9e6bf2fc5eb8423af546c129d284", "payorderurl": "https://public.sdk.gzyouai.com/paycheck/create", "usertype": 150, "sdkSimpleName": "apple_youyu", "gamechannelid": "", "APP_KEY": "d724b75942454a0825caee31f51d4774", "custom": "{}", "sdkVersionCode": "V1_1", "loginCheckUrl": "https://public.sdk.gzyouai.com/logincheck/check", "appScheme": "com.jghb.xinqinji", "c2": "", "c1": "", "APP_ID": "5a2df3c7f0d7700a6f4124ca", "paycheckurl": "https://public.sdk.gzyouai.com/paycheck/confirm", "gameSimpleName": "xqj_hb"}