Showing
29 changed files
with
46 additions
and
141 deletions
No preview for this file type
... | @@ -7,14 +7,14 @@ | ... | @@ -7,14 +7,14 @@ |
7 | objects = { | 7 | objects = { |
8 | 8 | ||
9 | /* Begin PBXBuildFile section */ | 9 | /* Begin PBXBuildFile section */ |
10 | - 8425EC1A1F0E3CBD00B0D868 /* PoolSdk.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8425EC191F0E3CBD00B0D868 /* PoolSdk.framework */; settings = {ASSET_TAGS = (); }; }; | 10 | + 8425EC1A1F0E3CBD00B0D868 /* PoolSdk.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8425EC191F0E3CBD00B0D868 /* PoolSdk.framework */; }; |
11 | - 844544B81EFA5EE7004BDC50 /* YouaiSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 844544B71EFA5EE7004BDC50 /* YouaiSDK.framework */; settings = {ASSET_TAGS = (); }; }; | 11 | + 844544B81EFA5EE7004BDC50 /* YouaiSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 844544B71EFA5EE7004BDC50 /* YouaiSDK.framework */; }; |
12 | - 845D18221C8D778400F27EB9 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 845D181B1C8D778400F27EB9 /* Images.xcassets */; settings = {ASSET_TAGS = (); }; }; | 12 | + 845D18221C8D778400F27EB9 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 845D181B1C8D778400F27EB9 /* Images.xcassets */; }; |
13 | - 846BD2241EE9342700E89A1D /* pool_setting in Resources */ = {isa = PBXBuildFile; fileRef = 846BD21F1EE9342700E89A1D /* pool_setting */; settings = {ASSET_TAGS = (); }; }; | 13 | + 846BD2241EE9342700E89A1D /* pool_setting in Resources */ = {isa = PBXBuildFile; fileRef = 846BD21F1EE9342700E89A1D /* pool_setting */; }; |
14 | - 846BD2261EE9342700E89A1D /* SDKInterface.m in Sources */ = {isa = PBXBuildFile; fileRef = 846BD2231EE9342700E89A1D /* SDKInterface.m */; settings = {ASSET_TAGS = (); }; }; | 14 | + 846BD2261EE9342700E89A1D /* SDKInterface.m in Sources */ = {isa = PBXBuildFile; fileRef = 846BD2231EE9342700E89A1D /* SDKInterface.m */; }; |
15 | - 847EE5E21EE9007E003A4B7B /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 847EE5E11EE9007E003A4B7B /* MainViewController.m */; settings = {ASSET_TAGS = (); }; }; | 15 | + 847EE5E21EE9007E003A4B7B /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 847EE5E11EE9007E003A4B7B /* MainViewController.m */; }; |
16 | - 8484E4F51EE7E0DC00B402D1 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8484E4F21EE7E0DC00B402D1 /* AppDelegate.m */; settings = {ASSET_TAGS = (); }; }; | 16 | + 8484E4F51EE7E0DC00B402D1 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8484E4F21EE7E0DC00B402D1 /* AppDelegate.m */; }; |
17 | - 8484E4F61EE7E0DC00B402D1 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8484E4F41EE7E0DC00B402D1 /* ViewController.m */; settings = {ASSET_TAGS = (); }; }; | 17 | + 8484E4F61EE7E0DC00B402D1 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8484E4F41EE7E0DC00B402D1 /* ViewController.m */; }; |
18 | 8484E4FC1EE7E1D800B402D1 /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 8484E4FB1EE7E1D800B402D1 /* libsqlite3.dylib */; }; | 18 | 8484E4FC1EE7E1D800B402D1 /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 8484E4FB1EE7E1D800B402D1 /* libsqlite3.dylib */; }; |
19 | 8484E4FE1EE7E1F700B402D1 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8484E4FD1EE7E1F700B402D1 /* CoreTelephony.framework */; }; | 19 | 8484E4FE1EE7E1F700B402D1 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8484E4FD1EE7E1F700B402D1 /* CoreTelephony.framework */; }; |
20 | 8484E5001EE7E20C00B402D1 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8484E4FF1EE7E20C00B402D1 /* CFNetwork.framework */; }; | 20 | 8484E5001EE7E20C00B402D1 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8484E4FF1EE7E20C00B402D1 /* CFNetwork.framework */; }; |
... | @@ -29,7 +29,7 @@ | ... | @@ -29,7 +29,7 @@ |
29 | 8484E5121EE7E2B800B402D1 /* libz.1.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 8484E5111EE7E2B800B402D1 /* libz.1.dylib */; }; | 29 | 8484E5121EE7E2B800B402D1 /* libz.1.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 8484E5111EE7E2B800B402D1 /* libz.1.dylib */; }; |
30 | 8484E5141EE7E2DE00B402D1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8484E5131EE7E2DE00B402D1 /* Foundation.framework */; }; | 30 | 8484E5141EE7E2DE00B402D1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8484E5131EE7E2DE00B402D1 /* Foundation.framework */; }; |
31 | 8484E5161EE7E36800B402D1 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8484E5151EE7E36800B402D1 /* SystemConfiguration.framework */; }; | 31 | 8484E5161EE7E36800B402D1 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8484E5151EE7E36800B402D1 /* SystemConfiguration.framework */; }; |
32 | - 84A090AB1F160A69003D23FB /* TrackingIO.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 84A090AA1F160A69003D23FB /* TrackingIO.a */; settings = {ASSET_TAGS = (); }; }; | 32 | + 84A090AB1F160A69003D23FB /* TrackingIO.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 84A090AA1F160A69003D23FB /* TrackingIO.a */; }; |
33 | BB5F3C8E1C1811BC00DA339D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = BB5F3C8D1C1811BC00DA339D /* main.m */; }; | 33 | BB5F3C8E1C1811BC00DA339D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = BB5F3C8D1C1811BC00DA339D /* main.m */; }; |
34 | BB5F3C971C1811BC00DA339D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BB5F3C951C1811BC00DA339D /* Main.storyboard */; }; | 34 | BB5F3C971C1811BC00DA339D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BB5F3C951C1811BC00DA339D /* Main.storyboard */; }; |
35 | BB5F3C9C1C1811BC00DA339D /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB5F3C9A1C1811BC00DA339D /* LaunchScreen.xib */; }; | 35 | BB5F3C9C1C1811BC00DA339D /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB5F3C9A1C1811BC00DA339D /* LaunchScreen.xib */; }; |
... | @@ -281,6 +281,7 @@ | ... | @@ -281,6 +281,7 @@ |
281 | TargetAttributes = { | 281 | TargetAttributes = { |
282 | BB5F3C871C1811BC00DA339D = { | 282 | BB5F3C871C1811BC00DA339D = { |
283 | CreatedOnToolsVersion = 6.4; | 283 | CreatedOnToolsVersion = 6.4; |
284 | + DevelopmentTeam = A5YL2H95JD; | ||
284 | }; | 285 | }; |
285 | BB5F3CA01C1811BC00DA339D = { | 286 | BB5F3CA01C1811BC00DA339D = { |
286 | CreatedOnToolsVersion = 6.4; | 287 | CreatedOnToolsVersion = 6.4; |
... | @@ -466,8 +467,9 @@ | ... | @@ -466,8 +467,9 @@ |
466 | isa = XCBuildConfiguration; | 467 | isa = XCBuildConfiguration; |
467 | buildSettings = { | 468 | buildSettings = { |
468 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | 469 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
469 | - CODE_SIGN_IDENTITY = "iPhone Developer: Feng Zhang (4LYC35G22K)"; | 470 | + CODE_SIGN_IDENTITY = "iPhone Developer"; |
470 | DEAD_CODE_STRIPPING = NO; | 471 | DEAD_CODE_STRIPPING = NO; |
472 | + DEVELOPMENT_TEAM = A5YL2H95JD; | ||
471 | ENABLE_BITCODE = NO; | 473 | ENABLE_BITCODE = NO; |
472 | FRAMEWORK_SEARCH_PATHS = ( | 474 | FRAMEWORK_SEARCH_PATHS = ( |
473 | "$(inherited)", | 475 | "$(inherited)", |
... | @@ -484,9 +486,10 @@ | ... | @@ -484,9 +486,10 @@ |
484 | ); | 486 | ); |
485 | ONLY_ACTIVE_ARCH = NO; | 487 | ONLY_ACTIVE_ARCH = NO; |
486 | OTHER_LDFLAGS = ""; | 488 | OTHER_LDFLAGS = ""; |
487 | - PRODUCT_BUNDLE_IDENTIFIER = yhjy.mhtx.ios; | 489 | + PRODUCT_BUNDLE_IDENTIFIER = com.gujianqingyuan.gjqy; |
488 | PRODUCT_NAME = "$(TARGET_NAME)"; | 490 | PRODUCT_NAME = "$(TARGET_NAME)"; |
489 | - PROVISIONING_PROFILE = "f746a8a9-526c-4114-b2d6-c8fa351e323a"; | 491 | + PROVISIONING_PROFILE = "6653f971-4123-405a-b29c-ed42e0281dc7"; |
492 | + PROVISIONING_PROFILE_SPECIFIER = Gjqy1120_dev; | ||
490 | TARGETED_DEVICE_FAMILY = 2; | 493 | TARGETED_DEVICE_FAMILY = 2; |
491 | VALID_ARCHS = "arm64 armv7s"; | 494 | VALID_ARCHS = "arm64 armv7s"; |
492 | }; | 495 | }; |
... | @@ -496,8 +499,9 @@ | ... | @@ -496,8 +499,9 @@ |
496 | isa = XCBuildConfiguration; | 499 | isa = XCBuildConfiguration; |
497 | buildSettings = { | 500 | buildSettings = { |
498 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | 501 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
499 | - CODE_SIGN_IDENTITY = "iPhone Developer: Feng Zhang (4LYC35G22K)"; | 502 | + CODE_SIGN_IDENTITY = "iPhone Developer"; |
500 | DEAD_CODE_STRIPPING = NO; | 503 | DEAD_CODE_STRIPPING = NO; |
504 | + DEVELOPMENT_TEAM = A5YL2H95JD; | ||
501 | ENABLE_BITCODE = NO; | 505 | ENABLE_BITCODE = NO; |
502 | FRAMEWORK_SEARCH_PATHS = ( | 506 | FRAMEWORK_SEARCH_PATHS = ( |
503 | "$(inherited)", | 507 | "$(inherited)", |
... | @@ -514,9 +518,10 @@ | ... | @@ -514,9 +518,10 @@ |
514 | ); | 518 | ); |
515 | ONLY_ACTIVE_ARCH = NO; | 519 | ONLY_ACTIVE_ARCH = NO; |
516 | OTHER_LDFLAGS = ""; | 520 | OTHER_LDFLAGS = ""; |
517 | - PRODUCT_BUNDLE_IDENTIFIER = yhjy.mhtx.ios; | 521 | + PRODUCT_BUNDLE_IDENTIFIER = com.gujianqingyuan.gjqy; |
518 | PRODUCT_NAME = "$(TARGET_NAME)"; | 522 | PRODUCT_NAME = "$(TARGET_NAME)"; |
519 | - PROVISIONING_PROFILE = "f746a8a9-526c-4114-b2d6-c8fa351e323a"; | 523 | + PROVISIONING_PROFILE = "6653f971-4123-405a-b29c-ed42e0281dc7"; |
524 | + PROVISIONING_PROFILE_SPECIFIER = Gjqy1120_dev; | ||
520 | TARGETED_DEVICE_FAMILY = 2; | 525 | TARGETED_DEVICE_FAMILY = 2; |
521 | VALID_ARCHS = "arm64 armv7s"; | 526 | VALID_ARCHS = "arm64 armv7s"; |
522 | }; | 527 | }; | ... | ... |
No preview for this file type
No preview for this file type
... | @@ -20,7 +20,6 @@ | ... | @@ -20,7 +20,6 @@ |
20 | @property(nonatomic, strong)NSString *custom; | 20 | @property(nonatomic, strong)NSString *custom; |
21 | @property(nonatomic, strong)NSString *postTime; | 21 | @property(nonatomic, strong)NSString *postTime; |
22 | @property(nonatomic, strong)NSString *other; | 22 | @property(nonatomic, strong)NSString *other; |
23 | -@property(nonatomic, strong)NSString *isOpenThirdPay;//是否开启第三方充值 | ||
24 | 23 | ||
25 | //游戏传递过来的原值 | 24 | //游戏传递过来的原值 |
26 | @property(nonatomic, strong)NSString *serverName;//服务器名称 | 25 | @property(nonatomic, strong)NSString *serverName;//服务器名称 | ... | ... |
No preview for this file type
No preview for this file type
No preview for this file type
... | @@ -34,7 +34,7 @@ int mExchange; | ... | @@ -34,7 +34,7 @@ int mExchange; |
34 | [[YouaiSDKMgr getInstance]initSDK]; | 34 | [[YouaiSDKMgr getInstance]initSDK]; |
35 | [[YouaiSDKMgr getInstance]setStyleName:@"sdk"]; | 35 | [[YouaiSDKMgr getInstance]setStyleName:@"sdk"]; |
36 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveLoginMessage:) name:youaiLoginNotification object:nil]; | 36 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveLoginMessage:) name:youaiLoginNotification object:nil]; |
37 | - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applePayCallBack:) name:@"applePayCallBack" object:nil]; | 37 | + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(youaiToolCallBack:) name:@"youaiToolCallBack" object:nil]; |
38 | 38 | ||
39 | [[PoolChecker getInstance] sendNotice:PoolSDKNotificationInitSDK notiName:@"InitSuccess" statusCode:POOLSDK_NO_ERROR description:@"initSuccess" extendData:nil]; | 39 | [[PoolChecker getInstance] sendNotice:PoolSDKNotificationInitSDK notiName:@"InitSuccess" statusCode:POOLSDK_NO_ERROR description:@"initSuccess" extendData:nil]; |
40 | 40 | ||
... | @@ -90,11 +90,11 @@ int mExchange; | ... | @@ -90,11 +90,11 @@ int mExchange; |
90 | 苹果支付结果回调 | 90 | 苹果支付结果回调 |
91 | */ | 91 | */ |
92 | 92 | ||
93 | -- (void)applePayCallBack:(NSNotification *)notification | 93 | +- (void)youaiToolCallBack:(NSNotification *)notification |
94 | { | 94 | { |
95 | NSDictionary* payResultDic = notification.object; | 95 | NSDictionary* payResultDic = notification.object; |
96 | 96 | ||
97 | - NSString* receiptStr = [payResultDic objectForKey:@"payResult"]; | 97 | + NSString* receiptStr = [payResultDic objectForKey:@"youaiToolResult"]; |
98 | NSString* queryId = [payResultDic objectForKey:@"query_id"]; | 98 | NSString* queryId = [payResultDic objectForKey:@"query_id"]; |
99 | 99 | ||
100 | NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil]; | 100 | NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil]; |
... | @@ -201,7 +201,6 @@ int mExchange; | ... | @@ -201,7 +201,6 @@ int mExchange; |
201 | } | 201 | } |
202 | } | 202 | } |
203 | 203 | ||
204 | - NSLog(@"order count:%lu",(unsigned long)[failQueryIdArray count]); | ||
205 | if([failQueryIdArray count] > 0){//含有补单失败项 | 204 | if([failQueryIdArray count] > 0){//含有补单失败项 |
206 | [userDefaults setObject:failQueryIdArray forKey:@"queryIds"]; | 205 | [userDefaults setObject:failQueryIdArray forKey:@"queryIds"]; |
207 | }else{//全部补单成功 | 206 | }else{//全部补单成功 |
... | @@ -226,15 +225,13 @@ int mExchange; | ... | @@ -226,15 +225,13 @@ int mExchange; |
226 | [self handlerLeakOrder]; | 225 | [self handlerLeakOrder]; |
227 | }); | 226 | }); |
228 | 227 | ||
229 | - //NSString *isOpenThirdPay = [payInfo isOpenThirdPay]; | ||
230 | - | ||
231 | NSString *other = [payInfo other]; | 228 | NSString *other = [payInfo other]; |
232 | 229 | ||
233 | if (other && [other length] > 0) { | 230 | if (other && [other length] > 0) { |
234 | - [[YouaiSDKMgr getInstance] openPay:serverId :roleName :amount :[payInfo queryId] :self.controller]; | 231 | + [[YouaiSDKMgr getInstance] openUtil:serverId :roleName :amount :[payInfo queryId] :self.controller]; |
235 | }else{ | 232 | }else{ |
236 | NSString* products = [payInfo products]; | 233 | NSString* products = [payInfo products]; |
237 | - [[YouaiSDKMgr getInstance] openApplePay:self.controller products:products amount:[payInfo postAmount] productName:[payInfo productName] queryId:queryId]; | 234 | + [[YouaiSDKMgr getInstance] openWithUtil:self.controller products:products amount:[payInfo postAmount] productName:[payInfo productName] queryId:queryId]; |
238 | } | 235 | } |
239 | } | 236 | } |
240 | 237 | ... | ... |
1 | -// | ||
2 | -// IapController.h | ||
3 | -// mangosanguo | ||
4 | -// | ||
5 | -// Created by Gino on 12-11-6. | ||
6 | -// Copyright (c) 2012年 private. All rights reserved. | ||
7 | -// | ||
8 | -#if applepay | ||
9 | -#import <Foundation/Foundation.h> | ||
10 | -#import "StoreKit/StoreKit.h" | ||
11 | - | ||
12 | -@interface IapController : NSObject<SKProductsRequestDelegate,SKPaymentTransactionObserver> | ||
13 | -{ | ||
14 | - bool isRequestedBuy; | ||
15 | - SKPaymentTransaction *PayTransaction; | ||
16 | - | ||
17 | - NSMutableArray *payArray; | ||
18 | - SKPaymentTransaction *curTransaction; | ||
19 | -} | ||
20 | - | ||
21 | -+ (IapController *)sharedController; | ||
22 | -- (id)init; | ||
23 | -- (void)removeIt; | ||
24 | -- (void)requestProductData; | ||
25 | -- (void)requestBuyProduct:(NSString *)identifier; | ||
26 | - | ||
27 | -- (void)requestProductInfoById:(NSString *)str; | ||
28 | -- (void)comfireTransactions:(bool)isSuessPosted; | ||
29 | -- (void)checkReceiptIsFail; | ||
30 | - | ||
31 | -- (void)addItemToPayArray:(SKPaymentTransaction *)transaction; | ||
32 | -- (bool)checkPayArrayIsEmpty; | ||
33 | -- (void)checkReceiptForArray; | ||
34 | - | ||
35 | -- (void)setAppleCallBack: (NSString*)url; | ||
36 | -@end | ||
37 | -#endif | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
... | @@ -10,9 +10,6 @@ | ... | @@ -10,9 +10,6 @@ |
10 | 10 | ||
11 | extern NSString * const youaiExitNotification; /**< 退出 */ | 11 | extern NSString * const youaiExitNotification; /**< 退出 */ |
12 | extern NSString * const youaiLoginNotification; /**< 登录完成的通知*/ | 12 | extern NSString * const youaiLoginNotification; /**< 登录完成的通知*/ |
13 | -extern NSString * const youaiPaytNotification; /**< 支付通知 */ | ||
14 | -extern NSString * const youaiShareNotification; /**< 分享通知 */ | ||
15 | -extern NSString * const youaiCenterNotification; /**< 用户中心通知 */ | ||
16 | extern NSString * const youaiErrorNotification; /**< 出错 */ | 13 | extern NSString * const youaiErrorNotification; /**< 出错 */ |
17 | 14 | ||
18 | 15 | ... | ... |
... | @@ -15,32 +15,24 @@ | ... | @@ -15,32 +15,24 @@ |
15 | NSString* appKey_; | 15 | NSString* appKey_; |
16 | 16 | ||
17 | NSString* inviterCode_; | 17 | NSString* inviterCode_; |
18 | - | ||
19 | -// NSString* openId; | ||
20 | -// NSString* loginKey; | ||
21 | } | 18 | } |
22 | 19 | ||
23 | -@property bool isApplePaying; | 20 | +@property bool appleing; |
24 | 21 | ||
25 | + (YouaiSDKMgr *)getInstance; | 22 | + (YouaiSDKMgr *)getInstance; |
26 | - (void)initSDK; | 23 | - (void)initSDK; |
27 | -- (void)initSDK:(NSString *)weixinId; | ||
28 | - (void)setServerUrl:(NSString *)serverUrl; | 24 | - (void)setServerUrl:(NSString *)serverUrl; |
29 | 25 | ||
30 | - (void)openLogin:(NSString *)appId : (NSString *)appKey : (UIViewController *)controller; | 26 | - (void)openLogin:(NSString *)appId : (NSString *)appKey : (UIViewController *)controller; |
31 | - (void)openLogin:(NSString *)appId : (NSString *)appKey : (UIViewController *)controller : (NSString *) inviterCode; | 27 | - (void)openLogin:(NSString *)appId : (NSString *)appKey : (UIViewController *)controller : (NSString *) inviterCode; |
32 | -- (void)openLogin:(NSString *)appId : (NSString *)appKey : (UIViewController *)controller : (NSString *) inviterCode : (NSString *)userName : (NSString *)passWord; | 28 | + |
33 | - (void)setStyleName:(NSString*)styleName; | 29 | - (void)setStyleName:(NSString*)styleName; |
34 | -- (void)openLogin:(NSString *)appId : (NSString *)appKey : (UIViewController *)controller : (NSString *)userName : (NSString *)passWord; | ||
35 | 30 | ||
36 | -- (void)openCenter: (UIViewController *)controller; | ||
37 | -- (void)openPay: (NSString *)serverId : (NSString *)nickName : (NSString *)callBack : (UIViewController *)controller; | ||
38 | -- (void)openPay: (NSString *)serverId : (NSString *)nickName : (NSNumber *)payAmount : (NSString *)callBack : (UIViewController *)controller; | ||
39 | -- (void)openShare: (UIViewController *)controller; | ||
40 | 31 | ||
41 | -- (void)openApplePay:(UIViewController*)controll products:(NSString*)products amount:(NSString*)amount productName:(NSString*)productName queryId:(NSString*) queryId; | 32 | +- (void)openUtil: (NSString *)serverId : (NSString *)nickName : (NSString *)callBack : (UIViewController *)controller; |
33 | +- (void)openUtil: (NSString *)serverId : (NSString *)nickName : (NSNumber *)amount : (NSString *)callBack : (UIViewController *)controller; | ||
42 | 34 | ||
43 | -- (void)applePayCallBack:(NSString *)url :(SKPaymentTransaction *)transaction :(NSString *)resultStr; | 35 | +- (void)openWithUtil:(UIViewController*)controll products:(NSString*)products amount:(NSString*)amount productName:(NSString*)productName queryId:(NSString*) queryId; |
44 | 36 | ||
45 | 37 | ||
46 | 38 | ... | ... |
... | @@ -8,6 +8,7 @@ | ... | @@ -8,6 +8,7 @@ |
8 | 8 | ||
9 | #import <UIKit/UIKit.h> | 9 | #import <UIKit/UIKit.h> |
10 | #import "YouaiLoginInfo.h" | 10 | #import "YouaiLoginInfo.h" |
11 | +#import <JavaScriptCore/JavaScriptCore.h> | ||
11 | 12 | ||
12 | @interface YouaiViewController : UIViewController<UIWebViewDelegate,UIAlertViewDelegate> | 13 | @interface YouaiViewController : UIViewController<UIWebViewDelegate,UIAlertViewDelegate> |
13 | { | 14 | { | ... | ... |
No preview for this file type
No preview for this file type
... | @@ -20,7 +20,6 @@ | ... | @@ -20,7 +20,6 @@ |
20 | @property(nonatomic, strong)NSString *custom; | 20 | @property(nonatomic, strong)NSString *custom; |
21 | @property(nonatomic, strong)NSString *postTime; | 21 | @property(nonatomic, strong)NSString *postTime; |
22 | @property(nonatomic, strong)NSString *other; | 22 | @property(nonatomic, strong)NSString *other; |
23 | -@property(nonatomic, strong)NSString *isOpenThirdPay;//是否开启第三方充值 | ||
24 | 23 | ||
25 | //游戏传递过来的原值 | 24 | //游戏传递过来的原值 |
26 | @property(nonatomic, strong)NSString *serverName;//服务器名称 | 25 | @property(nonatomic, strong)NSString *serverName;//服务器名称 | ... | ... |
No preview for this file type
No preview for this file type
No preview for this file type
... | @@ -34,7 +34,7 @@ int mExchange; | ... | @@ -34,7 +34,7 @@ int mExchange; |
34 | [[YouaiSDKMgr getInstance]initSDK]; | 34 | [[YouaiSDKMgr getInstance]initSDK]; |
35 | [[YouaiSDKMgr getInstance]setStyleName:@"sdk"]; | 35 | [[YouaiSDKMgr getInstance]setStyleName:@"sdk"]; |
36 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveLoginMessage:) name:youaiLoginNotification object:nil]; | 36 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveLoginMessage:) name:youaiLoginNotification object:nil]; |
37 | - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applePayCallBack:) name:@"applePayCallBack" object:nil]; | 37 | + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(youaiToolCallBack:) name:@"youaiToolCallBack" object:nil]; |
38 | 38 | ||
39 | [[PoolChecker getInstance] sendNotice:PoolSDKNotificationInitSDK notiName:@"InitSuccess" statusCode:POOLSDK_NO_ERROR description:@"initSuccess" extendData:nil]; | 39 | [[PoolChecker getInstance] sendNotice:PoolSDKNotificationInitSDK notiName:@"InitSuccess" statusCode:POOLSDK_NO_ERROR description:@"initSuccess" extendData:nil]; |
40 | 40 | ||
... | @@ -90,11 +90,11 @@ int mExchange; | ... | @@ -90,11 +90,11 @@ int mExchange; |
90 | 苹果支付结果回调 | 90 | 苹果支付结果回调 |
91 | */ | 91 | */ |
92 | 92 | ||
93 | -- (void)applePayCallBack:(NSNotification *)notification | 93 | +- (void)youaiToolCallBack:(NSNotification *)notification |
94 | { | 94 | { |
95 | NSDictionary* payResultDic = notification.object; | 95 | NSDictionary* payResultDic = notification.object; |
96 | 96 | ||
97 | - NSString* receiptStr = [payResultDic objectForKey:@"payResult"]; | 97 | + NSString* receiptStr = [payResultDic objectForKey:@"youaiToolResult"]; |
98 | NSString* queryId = [payResultDic objectForKey:@"query_id"]; | 98 | NSString* queryId = [payResultDic objectForKey:@"query_id"]; |
99 | 99 | ||
100 | NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil]; | 100 | NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil]; |
... | @@ -201,7 +201,6 @@ int mExchange; | ... | @@ -201,7 +201,6 @@ int mExchange; |
201 | } | 201 | } |
202 | } | 202 | } |
203 | 203 | ||
204 | - NSLog(@"order count:%lu",(unsigned long)[failQueryIdArray count]); | ||
205 | if([failQueryIdArray count] > 0){//含有补单失败项 | 204 | if([failQueryIdArray count] > 0){//含有补单失败项 |
206 | [userDefaults setObject:failQueryIdArray forKey:@"queryIds"]; | 205 | [userDefaults setObject:failQueryIdArray forKey:@"queryIds"]; |
207 | }else{//全部补单成功 | 206 | }else{//全部补单成功 |
... | @@ -226,15 +225,13 @@ int mExchange; | ... | @@ -226,15 +225,13 @@ int mExchange; |
226 | [self handlerLeakOrder]; | 225 | [self handlerLeakOrder]; |
227 | }); | 226 | }); |
228 | 227 | ||
229 | - //NSString *isOpenThirdPay = [payInfo isOpenThirdPay]; | ||
230 | - | ||
231 | NSString *other = [payInfo other]; | 228 | NSString *other = [payInfo other]; |
232 | 229 | ||
233 | if (other && [other length] > 0) { | 230 | if (other && [other length] > 0) { |
234 | - [[YouaiSDKMgr getInstance] openPay:serverId :roleName :amount :[payInfo queryId] :self.controller]; | 231 | + [[YouaiSDKMgr getInstance] openUtil:serverId :roleName :amount :[payInfo queryId] :self.controller]; |
235 | }else{ | 232 | }else{ |
236 | NSString* products = [payInfo products]; | 233 | NSString* products = [payInfo products]; |
237 | - [[YouaiSDKMgr getInstance] openApplePay:self.controller products:products amount:[payInfo postAmount] productName:[payInfo productName] queryId:queryId]; | 234 | + [[YouaiSDKMgr getInstance] openWithUtil:self.controller products:products amount:[payInfo postAmount] productName:[payInfo productName] queryId:queryId]; |
238 | } | 235 | } |
239 | } | 236 | } |
240 | 237 | ... | ... |
1 | -// | ||
2 | -// IapController.h | ||
3 | -// mangosanguo | ||
4 | -// | ||
5 | -// Created by Gino on 12-11-6. | ||
6 | -// Copyright (c) 2012年 private. All rights reserved. | ||
7 | -// | ||
8 | -#if applepay | ||
9 | -#import <Foundation/Foundation.h> | ||
10 | -#import "StoreKit/StoreKit.h" | ||
11 | - | ||
12 | -@interface IapController : NSObject<SKProductsRequestDelegate,SKPaymentTransactionObserver> | ||
13 | -{ | ||
14 | - bool isRequestedBuy; | ||
15 | - SKPaymentTransaction *PayTransaction; | ||
16 | - | ||
17 | - NSMutableArray *payArray; | ||
18 | - SKPaymentTransaction *curTransaction; | ||
19 | -} | ||
20 | - | ||
21 | -+ (IapController *)sharedController; | ||
22 | -- (id)init; | ||
23 | -- (void)removeIt; | ||
24 | -- (void)requestProductData; | ||
25 | -- (void)requestBuyProduct:(NSString *)identifier; | ||
26 | - | ||
27 | -- (void)requestProductInfoById:(NSString *)str; | ||
28 | -- (void)comfireTransactions:(bool)isSuessPosted; | ||
29 | -- (void)checkReceiptIsFail; | ||
30 | - | ||
31 | -- (void)addItemToPayArray:(SKPaymentTransaction *)transaction; | ||
32 | -- (bool)checkPayArrayIsEmpty; | ||
33 | -- (void)checkReceiptForArray; | ||
34 | - | ||
35 | -- (void)setAppleCallBack: (NSString*)url; | ||
36 | -@end | ||
37 | -#endif | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
... | @@ -10,9 +10,6 @@ | ... | @@ -10,9 +10,6 @@ |
10 | 10 | ||
11 | extern NSString * const youaiExitNotification; /**< 退出 */ | 11 | extern NSString * const youaiExitNotification; /**< 退出 */ |
12 | extern NSString * const youaiLoginNotification; /**< 登录完成的通知*/ | 12 | extern NSString * const youaiLoginNotification; /**< 登录完成的通知*/ |
13 | -extern NSString * const youaiPaytNotification; /**< 支付通知 */ | ||
14 | -extern NSString * const youaiShareNotification; /**< 分享通知 */ | ||
15 | -extern NSString * const youaiCenterNotification; /**< 用户中心通知 */ | ||
16 | extern NSString * const youaiErrorNotification; /**< 出错 */ | 13 | extern NSString * const youaiErrorNotification; /**< 出错 */ |
17 | 14 | ||
18 | 15 | ... | ... |
... | @@ -15,32 +15,24 @@ | ... | @@ -15,32 +15,24 @@ |
15 | NSString* appKey_; | 15 | NSString* appKey_; |
16 | 16 | ||
17 | NSString* inviterCode_; | 17 | NSString* inviterCode_; |
18 | - | ||
19 | -// NSString* openId; | ||
20 | -// NSString* loginKey; | ||
21 | } | 18 | } |
22 | 19 | ||
23 | -@property bool isApplePaying; | 20 | +@property bool appleing; |
24 | 21 | ||
25 | + (YouaiSDKMgr *)getInstance; | 22 | + (YouaiSDKMgr *)getInstance; |
26 | - (void)initSDK; | 23 | - (void)initSDK; |
27 | -- (void)initSDK:(NSString *)weixinId; | ||
28 | - (void)setServerUrl:(NSString *)serverUrl; | 24 | - (void)setServerUrl:(NSString *)serverUrl; |
29 | 25 | ||
30 | - (void)openLogin:(NSString *)appId : (NSString *)appKey : (UIViewController *)controller; | 26 | - (void)openLogin:(NSString *)appId : (NSString *)appKey : (UIViewController *)controller; |
31 | - (void)openLogin:(NSString *)appId : (NSString *)appKey : (UIViewController *)controller : (NSString *) inviterCode; | 27 | - (void)openLogin:(NSString *)appId : (NSString *)appKey : (UIViewController *)controller : (NSString *) inviterCode; |
32 | -- (void)openLogin:(NSString *)appId : (NSString *)appKey : (UIViewController *)controller : (NSString *) inviterCode : (NSString *)userName : (NSString *)passWord; | 28 | + |
33 | - (void)setStyleName:(NSString*)styleName; | 29 | - (void)setStyleName:(NSString*)styleName; |
34 | -- (void)openLogin:(NSString *)appId : (NSString *)appKey : (UIViewController *)controller : (NSString *)userName : (NSString *)passWord; | ||
35 | 30 | ||
36 | -- (void)openCenter: (UIViewController *)controller; | ||
37 | -- (void)openPay: (NSString *)serverId : (NSString *)nickName : (NSString *)callBack : (UIViewController *)controller; | ||
38 | -- (void)openPay: (NSString *)serverId : (NSString *)nickName : (NSNumber *)payAmount : (NSString *)callBack : (UIViewController *)controller; | ||
39 | -- (void)openShare: (UIViewController *)controller; | ||
40 | 31 | ||
41 | -- (void)openApplePay:(UIViewController*)controll products:(NSString*)products amount:(NSString*)amount productName:(NSString*)productName queryId:(NSString*) queryId; | 32 | +- (void)openUtil: (NSString *)serverId : (NSString *)nickName : (NSString *)callBack : (UIViewController *)controller; |
33 | +- (void)openUtil: (NSString *)serverId : (NSString *)nickName : (NSNumber *)amount : (NSString *)callBack : (UIViewController *)controller; | ||
42 | 34 | ||
43 | -- (void)applePayCallBack:(NSString *)url :(SKPaymentTransaction *)transaction :(NSString *)resultStr; | 35 | +- (void)openWithUtil:(UIViewController*)controll products:(NSString*)products amount:(NSString*)amount productName:(NSString*)productName queryId:(NSString*) queryId; |
44 | 36 | ||
45 | 37 | ||
46 | 38 | ... | ... |
... | @@ -8,6 +8,7 @@ | ... | @@ -8,6 +8,7 @@ |
8 | 8 | ||
9 | #import <UIKit/UIKit.h> | 9 | #import <UIKit/UIKit.h> |
10 | #import "YouaiLoginInfo.h" | 10 | #import "YouaiLoginInfo.h" |
11 | +#import <JavaScriptCore/JavaScriptCore.h> | ||
11 | 12 | ||
12 | @interface YouaiViewController : UIViewController<UIWebViewDelegate,UIAlertViewDelegate> | 13 | @interface YouaiViewController : UIViewController<UIWebViewDelegate,UIAlertViewDelegate> |
13 | { | 14 | { | ... | ... |
No preview for this file type
No preview for this file type
-
Please register or login to post a comment