Commit 6e191f658b7e3c2e82bcc107a129a9c12e1f9334
1 parent
971c75d1be
Exists in
master
and in
1 other branch
iap 支付回调增加失败回调
Showing 8 changed files with 29 additions and 22 deletions Side-by-side Diff
- IOSDocument.md
- ios/GameSDK.framework/Versions/A/GameSDK
- ios/GameSDK.framework/Versions/A/Headers/LetsGameAPI.h
- ios/GameSDK.zip
- ios/GameSDKDemo/GameSDKDemo.xcodeproj/project.pbxproj
- ios/GameSDKDemo/GameSDKDemo.xcodeproj/project.xcworkspace/xcshareddata/GameSDKDemo.xcscmblueprint
- ios/GameSDKDemo/GameSDKDemo.xcodeproj/project.xcworkspace/xcuserdata/yanglele.xcuserdatad/UserInterfaceState.xcuserstate
- ios/GameSDKDemo/letsgameDemo/LSGMainViewController.m
IOSDocument.md
... | ... | @@ -2,8 +2,8 @@ |
2 | 2 | |
3 | 3 | |
4 | 4 | 接入手册 |
5 | -V 3.4.6 | |
6 | -2017年5月12日 | |
5 | +V 3.4.7 | |
6 | +2017年6月9日 | |
7 | 7 | |
8 | 8 | ## 概述 |
9 | 9 | #### 本SDK提供gump账号,fb账号,vk账号,Google帐号四种账号登录,iap支付和第三方支付两种支付功能,其中gump账号登录和fb账号登录功能为必须接入,支付可根据需要选择性接入。 |
... | ... | @@ -122,10 +122,13 @@ Xcode 4: Open your Info.plist then add a new row URL Types. Set the URL identifi |
122 | 122 | [payInfo setValue:@"10" forKey:@"amount"];//对应支付项的支付金额,实际支付金额以itunes配置为准 |
123 | 123 | [payInfo setValue:@"ios demo" forKey:@"extraInfo"];//扩展信息,可以游戏自定义,建议传自有订单号 |
124 | 124 | [payInfo setValue:@"test.product.1" forKey:@"product"];//itunes 后台配置的对应支付项的productId |
125 | - [[LetsGameAPI instance] iap:payInfo forUser:@"" handleCallback:^(NSString* orderId){ | |
125 | + [[LetsGameAPI instance] iap:payInfo forUser:@"" succCallback:^(NSString *orderId) { | |
126 | 126 | //此处的回调表明支付已经完成,但此时支付不一定成功,需要服务端验证支付结果 |
127 | 127 | //orderId为gump生成的订单号,此订单号可以在gump server查询此笔支付是否成功 |
128 | - NSLog(@"iap completed orderId of gumptech:%@",orderId); | |
128 | + NSLog(@"IAP completed orderId of Gumptech:%@",orderId); | |
129 | + } failCallback:^(NSString *orderId) { | |
130 | + //支付失败 | |
131 | + NSLog(@"IAP file orderId of Gumptech:%@",orderId); | |
129 | 132 | }]; |
130 | 133 | ### 8、token的获取 |
131 | 134 | FB登录之后会产生token并自动登录,需要如果需要token的话,需要自己调用接口获取。 |
ios/GameSDK.framework/Versions/A/GameSDK
No preview for this file type
ios/GameSDK.framework/Versions/A/Headers/LetsGameAPI.h
... | ... | @@ -15,7 +15,7 @@ static BOOL isDisableGoogle = NO; |
15 | 15 | |
16 | 16 | static BOOL hiddenLogo = NO; |
17 | 17 | |
18 | -static NSString *version = @"3.4.6"; | |
18 | +static NSString *version = @"3.4.7"; | |
19 | 19 | |
20 | 20 | @interface LetsGameAPI : NSObject<UIApplicationDelegate> |
21 | 21 | |
... | ... | @@ -52,7 +52,9 @@ static NSString *version = @"3.4.6"; |
52 | 52 | |
53 | 53 | -(void)pay:(NSDictionary*) payInfo handleCallBack:(void (^)()) payAccomplistCallback; |
54 | 54 | |
55 | --(void)iap:(NSDictionary*) payInfo forUser:(NSString*) uid handleCallback:(void (^)(NSString* orderId)) callback; | |
55 | +//-(void)iap:(NSDictionary*) payInfo forUser:(NSString*) uid handleCallback:(void (^)(NSString* orderId)) callback; | |
56 | + | |
57 | +-(void)iap:(NSDictionary*) payInfo forUser:(NSString*) uid succCallback:(void (^)(NSString* orderId)) succCallback failCallback:(void (^)(NSString* orderId)) failCallback; | |
56 | 58 | |
57 | 59 | -(void)registeIapObserver; |
58 | 60 | |
... | ... | @@ -67,5 +69,4 @@ static NSString *version = @"3.4.6"; |
67 | 69 | -(void)gameObtainSafeSetInfoWithAppId:(NSString *)appId |
68 | 70 | ChannelId:(NSString *)channelId |
69 | 71 | handleCallBack:(void (^)(BOOL resultStatus))callBack; |
70 | - | |
71 | 72 | @end |
ios/GameSDK.zip
No preview for this file type
ios/GameSDKDemo/GameSDKDemo.xcodeproj/project.pbxproj
... | ... | @@ -30,9 +30,9 @@ |
30 | 30 | /* End PBXBuildFile section */ |
31 | 31 | |
32 | 32 | /* Begin PBXContainerItemProxy section */ |
33 | - 758F7C551E9795720055AA0A /* PBXContainerItemProxy */ = { | |
33 | + 75F818A01EEAA3EE0088B62F /* PBXContainerItemProxy */ = { | |
34 | 34 | isa = PBXContainerItemProxy; |
35 | - containerPortal = 758F7C501E9795720055AA0A /* GameSDK.xcodeproj */; | |
35 | + containerPortal = 75F8189B1EEAA3EE0088B62F /* GameSDK.xcodeproj */; | |
36 | 36 | proxyType = 2; |
37 | 37 | remoteGlobalIDString = 99626194192D9649004FF2E3; |
38 | 38 | remoteInfo = GameSDK; |
... | ... | @@ -50,10 +50,10 @@ |
50 | 50 | 3CD53D9C1B81F37900E1B01A /* VKSdkResources.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = VKSdkResources.bundle; sourceTree = "<group>"; }; |
51 | 51 | 752A5F411CDC826A00C36131 /* GameSDKResources.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = GameSDKResources.bundle; path = ../../GameSDKResources.bundle; sourceTree = "<group>"; }; |
52 | 52 | 752A5F491CDC8B3200C36131 /* GameSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameSDK.framework; path = ../GameSDK.framework; sourceTree = "<group>"; }; |
53 | - 758F7C501E9795720055AA0A /* GameSDK.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = GameSDK.xcodeproj; path = ../../../iosgamesdk_newdn/GameSDK/GameSDK.xcodeproj; sourceTree = "<group>"; }; | |
54 | 53 | 75B72C8E1DAA422000CFACFF /* CoreBlue.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreBlue.framework; path = ../CoreBlue.framework; sourceTree = "<group>"; }; |
55 | 54 | 75B72C901DAA422C00CFACFF /* MessageUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MessageUI.framework; path = System/Library/Frameworks/MessageUI.framework; sourceTree = SDKROOT; }; |
56 | 55 | 75B72C921DAA423500CFACFF /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; }; |
56 | + 75F8189B1EEAA3EE0088B62F /* GameSDK.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = GameSDK.xcodeproj; path = ../../../iosgamesdk/GameSDK/GameSDK.xcodeproj; sourceTree = "<group>"; }; | |
57 | 57 | 9934F1AE19303DC6005EF4AB /* GameSDKDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GameSDKDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; |
58 | 58 | 9934F1B119303DC6005EF4AB /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; |
59 | 59 | 9934F1B319303DC6005EF4AB /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; |
... | ... | @@ -108,15 +108,15 @@ |
108 | 108 | 27019DCE1A208B2300DA560D /* Dependencies */ = { |
109 | 109 | isa = PBXGroup; |
110 | 110 | children = ( |
111 | - 758F7C501E9795720055AA0A /* GameSDK.xcodeproj */, | |
111 | + 75F8189B1EEAA3EE0088B62F /* GameSDK.xcodeproj */, | |
112 | 112 | ); |
113 | 113 | name = Dependencies; |
114 | 114 | sourceTree = "<group>"; |
115 | 115 | }; |
116 | - 758F7C511E9795720055AA0A /* Products */ = { | |
116 | + 75F8189C1EEAA3EE0088B62F /* Products */ = { | |
117 | 117 | isa = PBXGroup; |
118 | 118 | children = ( |
119 | - 758F7C561E9795720055AA0A /* libGameSDK.a */, | |
119 | + 75F818A11EEAA3EE0088B62F /* libGameSDK.a */, | |
120 | 120 | ); |
121 | 121 | name = Products; |
122 | 122 | sourceTree = "<group>"; |
... | ... | @@ -233,8 +233,8 @@ |
233 | 233 | projectDirPath = ""; |
234 | 234 | projectReferences = ( |
235 | 235 | { |
236 | - ProductGroup = 758F7C511E9795720055AA0A /* Products */; | |
237 | - ProjectRef = 758F7C501E9795720055AA0A /* GameSDK.xcodeproj */; | |
236 | + ProductGroup = 75F8189C1EEAA3EE0088B62F /* Products */; | |
237 | + ProjectRef = 75F8189B1EEAA3EE0088B62F /* GameSDK.xcodeproj */; | |
238 | 238 | }, |
239 | 239 | ); |
240 | 240 | projectRoot = ""; |
... | ... | @@ -245,11 +245,11 @@ |
245 | 245 | /* End PBXProject section */ |
246 | 246 | |
247 | 247 | /* Begin PBXReferenceProxy section */ |
248 | - 758F7C561E9795720055AA0A /* libGameSDK.a */ = { | |
248 | + 75F818A11EEAA3EE0088B62F /* libGameSDK.a */ = { | |
249 | 249 | isa = PBXReferenceProxy; |
250 | 250 | fileType = archive.ar; |
251 | 251 | path = libGameSDK.a; |
252 | - remoteRef = 758F7C551E9795720055AA0A /* PBXContainerItemProxy */; | |
252 | + remoteRef = 75F818A01EEAA3EE0088B62F /* PBXContainerItemProxy */; | |
253 | 253 | sourceTree = BUILT_PRODUCTS_DIR; |
254 | 254 | }; |
255 | 255 | /* End PBXReferenceProxy section */ |
ios/GameSDKDemo/GameSDKDemo.xcodeproj/project.xcworkspace/xcshareddata/GameSDKDemo.xcscmblueprint
... | ... | @@ -13,8 +13,8 @@ |
13 | 13 | "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { |
14 | 14 | "07E954432ED0A61BEECC8FB6AAE1417682E93D30" : "vkbridge\/", |
15 | 15 | "8A7E653E5A6F45691CAAAE0CEF6C9451763A2597" : "gumptech-document\/", |
16 | - "D5E238D0ED0F802759CC8DDF3F39B0D0BFF728D8" : "gamesdk-ios-17\/", | |
17 | - "077D999F6C967446D3AED3B840BC4A4A39445F65" : "iosgamesdk_newdn\/" | |
16 | + "D5E238D0ED0F802759CC8DDF3F39B0D0BFF728D8" : "gamesdkios_release\/", | |
17 | + "077D999F6C967446D3AED3B840BC4A4A39445F65" : "iosgamesdk\/" | |
18 | 18 | }, |
19 | 19 | "DVTSourceControlWorkspaceBlueprintNameKey" : "GameSDKDemo", |
20 | 20 | "DVTSourceControlWorkspaceBlueprintVersion" : 204, |
ios/GameSDKDemo/GameSDKDemo.xcodeproj/project.xcworkspace/xcuserdata/yanglele.xcuserdatad/UserInterfaceState.xcuserstate
No preview for this file type
ios/GameSDKDemo/letsgameDemo/LSGMainViewController.m
... | ... | @@ -82,8 +82,8 @@ |
82 | 82 | |
83 | 83 | - (void)onClickTest { |
84 | 84 | |
85 | - [LetsGameAPI instance].appId = @"10022";//10047 | |
86 | - [LetsGameAPI instance].appKey = @"93a27b0bd99bac3e68a440b48aa421ab";//eccd9f7dc92858b741132fda313130cf | |
85 | + [LetsGameAPI instance].appId = @"10056";//10047 | |
86 | + [LetsGameAPI instance].appKey = @"b59c21a078fde074a6750e91ed19fb21";//eccd9f7dc92858b741132fda313130cf | |
87 | 87 | [LetsGameAPI hiddenLogo:YES]; |
88 | 88 | // [LetsGameAPI disableFB:NO]; |
89 | 89 | NSLog(@"sdk version:%@",[[LetsGameAPI instance] version]); |
... | ... | @@ -136,8 +136,11 @@ |
136 | 136 | [payInfo setValue:@"10" forKey:@"amount"]; |
137 | 137 | [payInfo setValue:@"ios demo" forKey:@"extraInfo"]; |
138 | 138 | [payInfo setValue:@"test.product.1" forKey:@"product"]; |
139 | - [[LetsGameAPI instance] iap:payInfo forUser:@"" handleCallback:^(NSString* orderId){ | |
139 | + [[LetsGameAPI instance] iap:payInfo forUser:@"" succCallback:^(NSString *orderId) { | |
140 | + //注意测试仅仅是通知客户端成功,但是还需要向服务器请求验证是否成功,以服务端验证为准 | |
140 | 141 | NSLog(@"IAP completed orderId of Gumptech:%@",orderId); |
142 | + } failCallback:^(NSString *orderId) { | |
143 | + NSLog(@"IAP file orderId of Gumptech:%@",orderId); | |
141 | 144 | }]; |
142 | 145 | } |
143 | 146 |