xuguohong

清空之前版本

Showing 104 changed files with 0 additions and 2663 deletions
No preview for this file type
No preview for this file type
No preview for this file type
1 -//
2 -// APAuthInfo.h
3 -// AliSDKDemo
4 -//
5 -// Created by 方彬 on 14-7-18.
6 -// Copyright (c) 2014年 Alipay.com. All rights reserved.
7 -//
8 -
9 -#import <Foundation/Foundation.h>
10 -
11 -@interface APayAuthInfo : NSObject
12 -
13 -@property(nonatomic, copy)NSString *appID;
14 -@property(nonatomic, copy)NSString *pid;
15 -@property(nonatomic, copy)NSString *redirectUri;
16 -
17 -/**
18 - * 初始化AuthInfo
19 - *
20 - * @param appIDStr 应用ID
21 - * @param productIDStr 产品码 该商户在aboss签约的产品,用户获取pid获取的参数
22 - * @param pidStr 商户ID 可不填
23 - * @param uriStr 授权的应用回调地址 比如:alidemo://auth
24 - *
25 - * @return authinfo实例
26 - */
27 -- (id)initWithAppID:(NSString *)appIDStr
28 - pid:(NSString *)pidStr
29 - redirectUri:(NSString *)uriStr;
30 -
31 -- (NSString *)description;
32 -- (NSString *)wapDescription;
33 -@end
1 -//
2 -// AlipaySDK.h
3 -// AlipaySDK
4 -//
5 -// Created by 方彬 on 14-4-28.
6 -// Copyright (c) 2014年 Alipay. All rights reserved.
7 -//
8 -
9 -
10 -////////////////////////////////////////////////////////
11 -////////////////version:2.1 motify:2014.12.24//////////
12 -///////////////////Merry Christmas=。=//////////////////
13 -////////////////////////////////////////////////////////
14 -
15 -
16 -#import "APayAuthInfo.h"
17 -typedef enum {
18 - ALIPAY_TIDFACTOR_IMEI,
19 - ALIPAY_TIDFACTOR_IMSI,
20 - ALIPAY_TIDFACTOR_TID,
21 - ALIPAY_TIDFACTOR_CLIENTKEY,
22 - ALIPAY_TIDFACTOR_VIMEI,
23 - ALIPAY_TIDFACTOR_VIMSI,
24 - ALIPAY_TIDFACTOR_CLIENTID,
25 - ALIPAY_TIDFACTOR_APDID,
26 - ALIPAY_TIDFACTOR_MAX
27 -} AlipayTidFactor;
28 -
29 -typedef void(^CompletionBlock)(NSDictionary *resultDic);
30 -
31 -@interface AlipaySDK : NSObject
32 -
33 -/**
34 - * 创建支付单例服务
35 - *
36 - * @return 返回单例对象
37 - */
38 -+ (AlipaySDK *)defaultService;
39 -
40 -/**
41 - * 支付接口
42 - *
43 - * @param orderStr 订单信息
44 - * @param schemeStr 调用支付的app注册在info.plist中的scheme
45 - * @param compltionBlock 支付结果回调Block
46 - */
47 -- (void)payOrder:(NSString *)orderStr
48 - fromScheme:(NSString *)schemeStr
49 - callback:(CompletionBlock)completionBlock;
50 -
51 -/**
52 - * 处理钱包或者独立快捷app支付跳回商户app携带的支付结果Url
53 - *
54 - * @param resultUrl 支付结果url,传入后由SDK解析,统一在上面的pay方法的callback中回调
55 - * @param completionBlock 跳钱包支付结果回调,保证跳转钱包支付过程中,即使调用方app被系统kill时,能通过这个回调取到支付结果。
56 - */
57 -- (void)processOrderWithPaymentResult:(NSURL *)resultUrl
58 - standbyCallback:(CompletionBlock)completionBlock;
59 -
60 -/**
61 - * 是否已经使用过
62 - *
63 - * @return YES为已经使用过,NO反之
64 - */
65 -- (BOOL)isLogined;
66 -
67 -/**
68 - * 当前版本号
69 - *
70 - * @return 当前版本字符串
71 - */
72 -- (NSString *)currentVersion;
73 -
74 -/**
75 - * 当前版本号
76 - *
77 - * @return tid相关信息
78 - */
79 -- (NSString*)queryTidFactor:(AlipayTidFactor)factor;
80 -
81 -/**
82 - * 測試所用,realse包无效
83 - *
84 - * @param url 测试环境
85 - */
86 -- (void)setUrl:(NSString *)url;
87 -
88 -
89 -//////////////////////////////////////////////////////////////////////////////////////////////
90 -//////////////////////////h5 拦截支付入口///////////////////////////////////////////////////////
91 -//////////////////////////////////////////////////////////////////////////////////////////////
92 -
93 -/**
94 - * url order 获取接口
95 - *
96 - * @param urlStr 拦截的 url string
97 - *
98 - * @return 获取到的url order info
99 - */
100 -- (NSString*)fetchOrderInfoFromH5PayUrl:(NSString*)urlStr;
101 -
102 -
103 -/**
104 - * url支付接口
105 - *
106 - * @param orderStr 订单信息
107 - * @param schemeStr 调用支付的app注册在info.plist中的scheme
108 - * @param compltionBlock 支付结果回调Block
109 - */
110 -- (void)payUrlOrder:(NSString *)orderStr
111 - fromScheme:(NSString *)schemeStr
112 - callback:(CompletionBlock)completionBlock;
113 -
114 -
115 -//////////////////////////////////////////////////////////////////////////////////////////////
116 -//////////////////////////授权1.0//////////////////////////////////////////////////////////////
117 -//////////////////////////////////////////////////////////////////////////////////////////////
118 -
119 -/**
120 - * 快登授权
121 - * @param authInfo 需授权信息
122 - * @param completionBlock 授权结果回调
123 - */
124 -- (void)authWithInfo:(APayAuthInfo *)authInfo
125 - callback:(CompletionBlock)completionBlock;
126 -
127 -
128 -/**
129 - * 处理授权信息Url
130 - *
131 - * @param resultUrl 钱包返回的授权结果url
132 - * @param completionBlock 跳授权结果回调,保证跳转钱包授权过程中,即使调用方app被系统kill时,能通过这个回调取到支付结果。
133 - */
134 -- (void)processAuthResult:(NSURL *)resultUrl
135 - standbyCallback:(CompletionBlock)completionBlock;
136 -
137 -//////////////////////////////////////////////////////////////////////////////////////////////
138 -//////////////////////////授权2.0//////////////////////////////////////////////////////////////
139 -//////////////////////////////////////////////////////////////////////////////////////////////
140 -
141 -/**
142 - * 快登授权2.0
143 - *
144 - * @param infoStr 授权请求信息字符串
145 - * @param schemeStr 调用授权的app注册在info.plist中的scheme
146 - * @param completionBlock 授权结果回调
147 - */
148 -- (void)auth_V2WithInfo:(NSString *)infoStr
149 - fromScheme:(NSString *)schemeStr
150 - callback:(CompletionBlock)completionBlock;
151 -
152 -/**
153 - * 处理授权信息Url
154 - *
155 - * @param resultUrl 钱包返回的授权结果url
156 - * @param completionBlock 跳授权结果回调,保证跳转钱包授权过程中,即使调用方app被系统kill时,能通过这个回调取到支付结果。
157 - */
158 -- (void)processAuth_V2Result:(NSURL *)resultUrl
159 - standbyCallback:(CompletionBlock)completionBlock;
160 -
161 -@end
1 -//
2 -// AppDelegate.h
3 -// publiDemo
4 -//
5 -// Created by winFan on 11/30/15.
6 -// Copyright (c) 2015 winFan. All rights reserved.
7 -//
8 -
9 -#import <UIKit/UIKit.h>
10 -
11 -@interface AppDelegate : UIResponder <UIApplicationDelegate>
12 -
13 -@property (strong, nonatomic) UIWindow *window;
14 -
15 -
16 -@end
17 -
1 -//
2 -// AppDelegate.m
3 -// publiDemo
4 -//
5 -// Created by winFan on 11/30/15.
6 -// Copyright (c) 2015 winFan. All rights reserved.
7 -//
8 -
9 -#import "AppDelegate.h"
10 -#import "ViewController.h"
11 -#import "PoolSdk/PoolSdk.h"
12 -@interface AppDelegate ()
13 -
14 -@end
15 -
16 -@implementation AppDelegate
17 -
18 -
19 -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
20 - // Override point for customization after application launch.
21 - self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
22 - ViewController *rootController = [[ViewController alloc] init];
23 - self.window.rootViewController = rootController;
24 - [[PoolSdk shareSDK] initSDK:rootController];
25 - [self.window makeKeyAndVisible];
26 - return YES;
27 -}
28 -
29 -- (void)applicationWillResignActive:(UIApplication *)application {
30 - // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
31 - // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
32 -}
33 -
34 -- (void)applicationDidEnterBackground:(UIApplication *)application {
35 - // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
36 - // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
37 -}
38 -
39 -- (void)applicationWillEnterForeground:(UIApplication *)application {
40 - // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
41 -}
42 -
43 -- (void)applicationDidBecomeActive:(UIApplication *)application {
44 - // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
45 -}
46 -
47 -- (void)applicationWillTerminate:(UIApplication *)application {
48 - // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
49 -}
50 -
51 -- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url{
52 - NSLog(@"hanldeOpenURL%@",url.path );
53 - [[PoolSdk shareSDK] handleOpenurl:url];
54 - return true;
55 -}
56 -
57 -
58 -@end
1 -<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 -<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8191" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
3 - <dependencies>
4 - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
5 - <capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
6 - </dependencies>
7 - <objects>
8 - <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
9 - <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
10 - <view contentMode="scaleToFill" id="iN0-l3-epB">
11 - <rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
12 - <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
13 - <subviews>
14 - <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2015 winFan. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
15 - <rect key="frame" x="20" y="439" width="441" height="21"/>
16 - <fontDescription key="fontDescription" type="system" pointSize="17"/>
17 - <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
18 - <nil key="highlightedColor"/>
19 - </label>
20 - <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="PoolSdk_i9133_Demo" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
21 - <rect key="frame" x="20" y="140" width="441" height="43"/>
22 - <fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
23 - <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
24 - <nil key="highlightedColor"/>
25 - </label>
26 - </subviews>
27 - <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
28 - <constraints>
29 - <constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
30 - <constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
31 - <constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
32 - <constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
33 - <constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
34 - <constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
35 - </constraints>
36 - <nil key="simulatedStatusBarMetrics"/>
37 - <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
38 - <point key="canvasLocation" x="548" y="455"/>
39 - </view>
40 - </objects>
41 -</document>
1 -<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8191" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="vXZ-lx-hvc">
3 - <dependencies>
4 - <deployment identifier="iOS"/>
5 - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
6 - </dependencies>
7 - <scenes>
8 - <!--View Controller-->
9 - <scene sceneID="ufC-wZ-h7g">
10 - <objects>
11 - <viewController id="vXZ-lx-hvc" customClass="ViewController" sceneMemberID="viewController">
12 - <layoutGuides>
13 - <viewControllerLayoutGuide type="top" id="jyV-Pf-zRb"/>
14 - <viewControllerLayoutGuide type="bottom" id="2fi-mo-0CV"/>
15 - </layoutGuides>
16 - <view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
17 - <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
18 - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
19 - <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
20 - </view>
21 - </viewController>
22 - <placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
23 - </objects>
24 - </scene>
25 - </scenes>
26 -</document>
1 -<?xml version="1.0" encoding="UTF-8"?>
2 -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3 -<plist version="1.0">
4 -<dict>
5 - <key>CFBundleDevelopmentRegion</key>
6 - <string>en</string>
7 - <key>CFBundleExecutable</key>
8 - <string>$(EXECUTABLE_NAME)</string>
9 - <key>CFBundleIdentifier</key>
10 - <string>com.mango.ios.fytx</string>
11 - <key>CFBundleInfoDictionaryVersion</key>
12 - <string>6.0</string>
13 - <key>CFBundleName</key>
14 - <string>$(PRODUCT_NAME)</string>
15 - <key>CFBundlePackageType</key>
16 - <string>APPL</string>
17 - <key>CFBundleShortVersionString</key>
18 - <string>1.0</string>
19 - <key>CFBundleSignature</key>
20 - <string>????</string>
21 - <key>CFBundleURLTypes</key>
22 - <array>
23 - <dict>
24 - <key>CFBundleTypeRole</key>
25 - <string>Editor</string>
26 - <key>CFBundleURLSchemes</key>
27 - <array>
28 - <string>i9133public</string>
29 - </array>
30 - </dict>
31 - </array>
32 - <key>CFBundleVersion</key>
33 - <string>1</string>
34 - <key>LSRequiresIPhoneOS</key>
35 - <true/>
36 - <key>NSAppTransportSecurity</key>
37 - <dict>
38 - <key>NSAllowsArbitraryLoads</key>
39 - <true/>
40 - </dict>
41 - <key>UILaunchStoryboardName</key>
42 - <string>LaunchScreen</string>
43 - <key>UIMainStoryboardFile</key>
44 - <string>Main</string>
45 - <key>UIRequiredDeviceCapabilities</key>
46 - <array>
47 - <string>armv7</string>
48 - </array>
49 - <key>UISupportedInterfaceOrientations</key>
50 - <array>
51 - <string>UIInterfaceOrientationPortrait</string>
52 - <string>UIInterfaceOrientationLandscapeLeft</string>
53 - <string>UIInterfaceOrientationLandscapeRight</string>
54 - </array>
55 -</dict>
56 -</plist>
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 -
9 -#import <Foundation/Foundation.h>
10 -
11 -void DGLog(NSString *fmt, ...);
12 -
13 -typedef NS_ENUM(NSInteger, DGLoggerLevel)
14 -{
15 - ELogVerbose = 1,
16 - ELogDebug,
17 - ELogInfo,
18 - ELogWarn,
19 - ELogError
20 -};
21 -
22 -@interface DGLogger : NSObject
23 -
24 -+ (void)showLog:(NSString *)fmt,...;
25 -
26 -+ (void)showLog:(DGLoggerLevel)level log:(NSString *)fmt,...;
27 -
28 -+ (void)isShowLog:(BOOL)flag;
29 -
30 -@end
1 -//
2 -// Interface.h
3 -// PoolSdk
4 -//
5 -// Created by winFan on 12/10/15.
6 -// Copyright (c) 2015 winFan. All rights reserved.
7 -//
8 -
9 -
10 -#include "UnionInterface.h"
11 -#import <SafariServices/SafariServices.h>
12 -@interface Interface : NSObject <UnionInterface,SFSafariViewControllerDelegate>
13 -@property(nonatomic, strong)UIViewController *controller;
14 -
15 -
16 -@end
...\ No newline at end of file ...\ No newline at end of file
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 -
9 -#import <Foundation/Foundation.h>
10 -
11 -@interface NetCenter : NSObject
12 -
13 -@property(nonatomic,retain) NSMutableData *receiveData;
14 -
15 -@property(nonatomic,assign)int dataPackSerialNo;
16 -
17 -
18 -+ (NetCenter *)getInstance;
19 -
20 -- (NSString *)httpGetSyn:(NSString *) getUrl;
21 -
22 -- (NSString *)httpPostSyn:(NSString *) postUrl : (NSDictionary *) postData;
23 -
24 -- (void)httpGetNoSyn;
25 -
26 -- (void)httpPostNoSyn:(NSString *) postUrl :(NSDictionary *)postDict;
27 -
28 -- (NSString *)dicToString:(NSDictionary *) dict;
29 -@end
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 -
9 -#ifndef __PoolSdk__OtherSetting__
10 -#define __PoolSdk__OtherSetting__
11 -
12 -
13 -/**
14 - 应用支持的方向
15 - */
16 -typedef NS_ENUM(NSUInteger, ESDKOrientation) {
17 - ESDKOrientationPortrait = 1,//竖
18 - ESDKOrientationLandscape,//横
19 - ESDKOrientationNone//自动旋转
20 -};
21 -
22 -/**
23 - 应用支持的方向
24 - */
25 -typedef NS_ENUM(NSUInteger, REPORT_TYPE) {
26 - REPORT_TYPE_OPEN = 1,//竖
27 - REPORT_TYPE_ENTER,//横
28 - REPORT_TYPE_DEFINE//自动旋转
29 -};
30 -
31 -#endif /* defined(__PoolSdk__OtherSetting__) */
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 -//
8 -#import <Foundation/Foundation.h>
9 -#import "PoolSdk/PoolLoginInfo.h"
10 -#import "PoolSdk/PoolNotification.h"
11 -#import "PoolSdk/PoolCreateOrderInfo.h"
12 -#import "PoolSdk/PoolPayInfo.h"
13 -#import "PoolReportInfo.h"
14 -@interface PoolChecker : NSObject
15 -@property(nonatomic, strong)NSString *userId;
16 -+ (PoolChecker *)getInstance;
17 -- (void)initChecker;
18 -- (void)startCheck:(PoolLoginInfo *)loginInfo;
19 -- (void) createOrder:(PoolCreateOrderInfo *)payInfo;
20 -- (void) reportOpen;
21 -- (void)handleFirstOpenApp:(NSString*) path;
22 -- (void) reportEnter:(PoolReportInfo *)reInfo;
23 -- (void) report:(NSString *)_action :(PoolReportInfo *)reInfo;
24 -- (void)sendNotice:(PoolSDKNotificationType)notiType
25 - notiName:(NSString *)notiName
26 - statusCode:(int)nCode
27 - description:(NSString *)szDescripton
28 - extendData:(NSObject *)extendData;
29 -@end
...\ No newline at end of file ...\ No newline at end of file
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 -
9 -#import <Foundation/Foundation.h>
10 -
11 -@interface PoolConfig : NSObject
12 -
13 -@property(nonatomic, strong)NSString *gameSimpleName;
14 -@property(nonatomic, strong)NSString *sdkSimpleName;
15 -@property(nonatomic, strong)NSString *sdkVersionCode;
16 -@property(nonatomic, strong)NSString *loginCheckUrl;
17 -@property(nonatomic, strong)NSString *payOrderUrl;
18 -@property(nonatomic, strong)NSString *payCheckUrl;
19 -@property(nonatomic, strong)NSString *c1;
20 -@property(nonatomic, strong)NSString *c2;
21 -@property(nonatomic, strong)NSString *custom;
22 -
23 -+ (PoolConfig *)getInstance;
24 -
25 -- (void) loadFile:(NSString *) fileName;
26 -
27 -- (NSString *)getValueByKey:(NSString *) key;
28 -
29 -- (void) updateC1C2Value:(NSString *)c1 c2:(NSString *)c2;
30 -
31 -@end
...\ No newline at end of file ...\ No newline at end of file
1 -//
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
12 -
13 -@property(nonatomic,strong)NSString *serverId;
14 -@property(nonatomic, strong)NSString *serverName;//角色名称
15 -@property(nonatomic, strong)NSString *playerId;//所在服务器名称
16 -@property(nonatomic, strong)NSString *playerName;//所在服务器id
17 -@property(nonatomic, strong)NSString *playerLevel;//所在服务器id
18 -@property(nonatomic, strong)NSString *postAmount;//所在服务器id
19 -@property(nonatomic, strong)NSString *productId;//所在服务器id
20 -@property(nonatomic, strong)NSString *productName;//所在服务器id
21 -@property(nonatomic, strong)NSString *productDesc;//所在服务器id
22 -@property(nonatomic, strong)NSString *custom;//所在服务器id
23 -@property(nonatomic, strong)NSString *exchange;//所在服务器id
24 -@property(nonatomic, strong)NSString *otherInfo;//所在服务器id
25 -@property(nonatomic, strong)NSString *userId;//所在服务器id
26 -@property(nonatomic, strong)NSString *timestamp;//所在服务器id
27 -
28 -- (NSString *) getTsign ;
29 -- (NSString *) getTimestamp ;
30 -
31 -@end
...\ No newline at end of file ...\ No newline at end of file
1 -//
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
11 -
12 -@property(nonatomic,strong)NSString *timestamp;
13 -@property(nonatomic, strong)NSString *sign;//角色名称
14 -@property(nonatomic, strong)NSString *other;//所在服务器名称
15 -@property(nonatomic, strong)NSString *openId;//所在服务器id
16 -@property(nonatomic, strong)NSString *userType;//所在服务器id
17 -
18 -
19 -@end
...\ No newline at end of file ...\ No newline at end of file
1 -//
2 -// PoolNotification.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 <Foundation/Foundation.h>
10 -
11 -extern NSString * const poolSDK_Notification; /**< */
12 -extern NSString * const _create_order_notification; /**< */
13 -
14 -
15 -/**
16 - 应用支持的方向
17 - */
18 -typedef NS_ENUM(int, PoolSDKNotificationType) {
19 - PoolSDKNotificationLogin = 1,//登录
20 - PoolSDKNotificationLogout,//注销
21 - PoolSDKNotificationPay,//支付完成
22 - PoolSDKNotificationPause,//暂停退出
23 - PoolSDKNotificationRole,//创建角色
24 - PoolSDKNotificationInitSDK//初始化SDK
25 -};
26 -
27 -
28 -
29 -@interface PoolNotification : NSObject
30 -
31 -@end
32 -
33 -
34 -//////////////////////////////////////////////////////////////////////
35 -@interface PoolSDKResult : NSObject
36 -@property(nonatomic, assign)int statusCode;//请参照此文件下面状态标识
37 -@property(nonatomic, strong)NSString *resultDescription;
38 -@property(nonatomic, strong)NSObject *extendData;
39 -//V1.2.0新增
40 -@property(nonatomic, assign)PoolSDKNotificationType notiType;//消息类型
41 -@property(nonatomic, strong)NSString *notiName;//消息名称
42 -@end
43 -//////////////////////////////////////////////////////////////////////
44 -
45 -//////////////////////////////////////////////////////////////////////
46 -/* 状态标识 */
47 -#define POOLSDK_NO_ERROR 0 /*操作成功*/
48 -
49 -#define POOLSDK_ERROR_LOGIN_FAILED -100 /*登录失败*/
50 -#define POOLSDK_ERROR_LOGIN_CANCEL -101 /*登录取消*/
51 -#define POOLSDK_ERROR_LOGIN_GAMGEACCOUNT -102 /*游戏帐号登录,非平台账号*/
52 -
53 -#define POOLSDK_ERROR_PAY_FAILED -200 /*支付失败*/
54 -#define POOLSDK_ERROR_PAY_CANCEL -201 /*支付取消*/
55 -#define POOLSDK_ERROR_PAY_VERSIGN -202 /*支付验签失败*/
56 -#define POOLSDK_ERROR_CREATE_ORDER_FAILED -203 /*支付验签失败*/
57 -
58 -#define POOLSDK_ERROR_ROLE_CREATE_FAILED -300 /*角色创建失败*/
59 -
60 -#define POOLSDK_ERROR_INIT_FAILED -400 /*初始化失败*/
61 -
62 -//////////////////////////////////////////////////////////////////////
1 -//
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
12 -
13 -@property(nonatomic, strong)NSString *serverId;
14 -@property(nonatomic, strong)NSString *queryId;
15 -@property(nonatomic, strong)NSString *playerId;
16 -@property(nonatomic, strong)NSString *playerName;//所在服务器id
17 -@property(nonatomic, strong)NSString *postAmount;
18 -@property(nonatomic, strong)NSString *productId;
19 -@property(nonatomic, strong)NSString *products;
20 -@property(nonatomic, strong)NSString *custom;
21 -@property(nonatomic, strong)NSString *postTime;
22 -@property(nonatomic, strong)NSString *other;
23 -
24 -@end
...\ No newline at end of file ...\ No newline at end of file
1 -//
2 -// PoolReportInfo.h
3 -// PoolSdk
4 -//
5 -// Created by winFan on 12/21/15.
6 -// Copyright (c) 2015 winFan. All rights reserved.
7 -//
8 -
9 -#import "PoolSdk/PoolBaseModel.h"
10 -@interface PoolReportInfo : PoolBaseModel
11 -
12 -@property(nonatomic, strong)NSString *serverId;
13 -@property(nonatomic, strong)NSString *serverName;
14 -@property(nonatomic, strong)NSString *playerId;
15 -@property(nonatomic, strong)NSString *playerName;//所在服务器id
16 -@property(nonatomic, strong)NSString *playerLevel;
17 -@property(nonatomic, strong)NSString *custom;
18 -@property(nonatomic, strong)NSString *reportType;
19 -
20 -
21 -@property(nonatomic, strong)NSString *openId;
22 -
23 -
24 -#define REPORT_URL @"http://public.sdk.gzyouai.com:9030/sdk/statistic"//@"http://10.200.201.230:9001/sdk/statistic"
25 -#define REPORT_OPEN @"open"
26 -#define REPORT_ENTER @"enter"
27 -#define REPORT_CREATEROLE @"createrole"
28 -#define REPORT_ROLEUPGRADE @"roleupgrade"
29 -
30 -@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 -
9 -#import <Foundation/Foundation.h>
10 -#import <PoolSdk/PoolSdk2.h>
11 -#import <UIKit/UIKit.h>
12 -
13 -@interface PoolSdk : NSObject
14 -/**
15 - * 当前SDK的版本
16 - */
17 -@property(nonatomic, strong, readonly)NSString *sdkVersion;
18 -
19 -/**
20 - * 用于设置url types schemes 默认为工程名
21 - */
22 -@property(nonatomic, strong)NSString *urlSchemes;
23 -
24 -/**
25 - 获取SDK实例对象
26 - */
27 -+ (PoolSdk *)shareSDK;
28 -
29 -/**
30 - 初始化SDK
31 - */
32 -- (void)initSDK:(UIViewController *) control;
33 -
34 -
35 --(void)viewDidAppear;
36 -
37 -/**
38 - 登录SDK
39 - */
40 -- (void)loginSDK;
41 -
42 -/**
43 - 进行支付
44 - */
45 -- (void)payWithPaymentInfo:(PoolCreateOrderInfo *)payInfo;
46 -
47 -/**
48 - 用户中心
49 - */
50 -- (void)gotoUserCenter;
51 -
52 -/**
53 - report
54 - */
55 -- (void)reportSDK:(PoolReportInfo *)reportInfo;
56 -
57 -/**
58 - 注销
59 - */
60 -- (void)logoutSDK;
61 -
62 -/**
63 - 退出
64 - */
65 -- (void)exitSDK;
66 -
67 -
68 -
69 -/**
70 - 显示/隐藏浮标
71 - */
72 -//- (void)showFloatIcon:(BOOL)bFlag;
73 -
74 -
75 -/**
76 - // called in - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url
77 - */
78 -- (void)handleOpenurl:(NSURL *)url;
79 -
80 -- (NSUInteger) application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window;
81 -/**
82 - 应用 appid
83 - */
84 -
85 -/**
86 - 应用支持的方向 默认为 EDreamSDKOrientationLandscape
87 - */
88 -@property(nonatomic, assign)ESDKOrientation sdkOrientation;
89 -
90 -/**
91 - 浮标是否已经显示,默认为NO
92 - */
93 -@property(nonatomic, assign)BOOL bShowedFloat;
94 -
95 -
96 -/**
97 - serverId
98 - */
99 -@property(nonatomic, assign)int serverId;
100 -
101 -/**
102 - 获取gamechannelid
103 - */
104 --(NSString *) getGameChannelId;
105 -
106 -/**
107 - 获取Custom
108 - */
109 -- (NSString *) getCustomValue;
110 -
111 -/**
112 - 获取ChannelParameter1
113 - */
114 -- (NSString *) getChannelParameter1;
115 -
116 -/**
117 - 获取ChannelParameter2
118 - */
119 -- (NSString *) getChannelParameter2;
120 -
121 -
122 -@end
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 -
10 -#import <UIKit/UIKit.h>
11 -#import "PoolChecker.h"
12 -#import "Interface.h"
13 -#import "PoolReportInfo.h"
14 -#import "PoolLoginInfo.h"
15 -#import "PoolNotification.h"
16 -#import "PoolPayInfo.h"
17 -#import "UnionInterface.h"
18 -#import "PoolCreateOrderInfo.h"
19 -#import "PoolConfig.h"
20 -
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 -
10 -#import <Foundation/Foundation.h>
11 -@interface PoolUtils : NSObject
12 -
13 -+(NSString *)md5:(NSString *)str;
14 -+ (NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString;
15 -+(NSString *)createPayOrderUrl;
16 -//*充值回调地址
17 -+(NSString *)createPayUrl;
18 -@end
...\ No newline at end of file ...\ No newline at end of file
1 -//
2 -// UnionInterface.h
3 -// PoolSdk
4 -//
5 -// Created by winFan on 11/23/15.
6 -// Copyright (c) 2015 winFan. All rights reserved.
7 -//
8 -#import <Foundation/Foundation.h>
9 -#import <UIKit/UIKit.h>
10 -#import "PoolCreateOrderInfo.h"
11 -#import "PoolReportInfo.h"
12 -@protocol UnionInterface
13 -/**
14 - 初始化SDK
15 - */
16 -
17 -//[[PoolChecker getInstance] sendNotice:PoolSDKNotificationPay notiName:@"" statusCode:POOLSDK_NO_ERROR description:@"" extendData:order_id];
18 -
19 -- (void)SDKinit:(UIViewController *) control;
20 -
21 -/**
22 - 登录SDK
23 - */
24 -- (void)SDKloginSDK;
25 -
26 -/**
27 - 注销
28 - */
29 -- (void)SDKlogoutSDK;
30 -
31 -/**
32 - 退出
33 - */
34 -- (void)SDKexitSDK;
35 -
36 -/**
37 - 用户中心
38 - */
39 -- (void)SDKgotoUserCenter;
40 -
41 -- (void)viewDidAppear;
42 -
43 -/**
44 - 提交数据
45 - */
46 -- (void)SDKreport:(PoolReportInfo *) reportInfo;
47 -
48 -/**
49 - 进行支付
50 - */
51 -
52 -- (void)SDKpayWithPaymentInfo:(PoolCreateOrderInfo *)payInfo;
53 -- (void)receiveCreateOrder: (NSNotification *)notification;
54 -
55 -- (void)handleOpenurl:(NSURL *)url;
56 -- (NSUInteger) application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window;
57 -
58 -@end
...\ No newline at end of file ...\ No newline at end of file
1 -//
2 -// ViewController.h
3 -// publiDemo
4 -//
5 -// Created by winFan on 11/30/15.
6 -// Copyright (c) 2015 winFan. All rights reserved.
7 -//
8 -
9 -#import <UIKit/UIKit.h>
10 -
11 -@interface ViewController : UIViewController
12 -
13 -- (void)receiveSDKMessage : (NSNotification *)notification;
14 -
15 -@end
16 -
1 -//
2 -// ViewController.m
3 -// publiDemo
4 -//
5 -// Created by winFan on 11/30/15.
6 -// Copyright (c) 2015 winFan. All rights reserved.
7 -//
8 -
9 -#import "ViewController.h"
10 -#import "PoolSdk/PoolSdk.h"
11 -@interface ViewController ()
12 -
13 -@end
14 -
15 -@implementation ViewController
16 -
17 -- (void)viewDidLoad {
18 - [super viewDidLoad];
19 - // Do any additional setup after loading the view, typically from a nib.
20 - [super viewDidLoad];
21 - // Do any additional setup after loading the view, typically from a nib.
22 - UIButton *button1 = [UIButton buttonWithType:UIButtonTypeCustom];
23 - [button1 setTitle:@"登陆" forState:UIControlStateNormal];
24 - button1.frame = CGRectMake(50.0f, 100.0f, 50.0f, 40.0f);
25 - button1.tag = 1;
26 - [button1 addTarget:self action:@selector(toggleButton:) forControlEvents: UIControlEventTouchUpInside];
27 - [self.view addSubview:button1];
28 -
29 - UIButton *button2 = [UIButton buttonWithType:UIButtonTypeCustom];
30 - [button2 setTitle:@"数据" forState:UIControlStateNormal];
31 - button2.frame = CGRectMake(150.0f, 100.0f, 50.0f, 40.0f);
32 - button2.tag = 2;
33 - [button2 addTarget:self action:@selector(toggleButton:) forControlEvents: UIControlEventTouchUpInside];
34 - [self.view addSubview:button2];
35 -
36 - UIButton *button4 = [UIButton buttonWithType:UIButtonTypeCustom];
37 - [button4 setTitle:@"充值" forState:UIControlStateNormal];
38 - button4.frame = CGRectMake(150.0f, 50.0f, 50.0f, 40.0f);
39 - button4.tag = 4;
40 - [button4 addTarget:self action:@selector(toggleButton:) forControlEvents: UIControlEventTouchUpInside];
41 - [self.view addSubview:button4];
42 -
43 -
44 - UIButton *button6 = [UIButton buttonWithType:UIButtonTypeCustom];
45 - [button6 setTitle:@"获取配置参数" forState:UIControlStateNormal];
46 - button6.frame = CGRectMake(10.0f, 50.0f, 150.0f, 40.0f);
47 - button6.tag = 6;
48 - [button6 addTarget:self action:@selector(toggleButton:) forControlEvents: UIControlEventTouchUpInside];
49 - [self.view addSubview:button6];
50 -
51 -
52 - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveSDKMessage:) name:poolSDK_Notification object:nil];
53 -}
54 -
55 --(void)viewDidAppear:(BOOL)animated{
56 - [super viewDidAppear:animated];
57 - [[PoolSdk shareSDK] viewDidAppear];
58 -}
59 -
60 -- (void) toggleButton: (UIButton *) button
61 -{
62 -
63 - // if (isOn = !isOn)
64 - //
65 - // {
66 -
67 -
68 - int tag = (int)button.tag;
69 - if (tag == 1) {
70 - [[PoolSdk shareSDK] loginSDK];
71 - }
72 - else if (tag == 2)
73 - {
74 - NSLog(@"数据接口");
75 - PoolReportInfo *reportInfo = [[PoolReportInfo alloc]init];
76 - [reportInfo setReportType:@"ENTER"];
77 - [reportInfo setServerId:@"9133"];
78 - [reportInfo setPlayerId:@"pserverName"];
79 - [[PoolSdk shareSDK] reportSDK:reportInfo];
80 - }
81 - else if (tag == 4)
82 - {
83 - PoolCreateOrderInfo *payInfo = [[PoolCreateOrderInfo alloc]init];
84 - [payInfo setServerId:@"111"];
85 - [payInfo setPostAmount:@"10"];
86 - [payInfo setPlayerId:@"1231241234"];
87 - [payInfo setTimestamp:@"1232134"];
88 - [[PoolSdk shareSDK] payWithPaymentInfo:payInfo];
89 -// [[YouaiSDKMgr getInstance] openPay:@"11" :@"你好" : nil : self];
90 - }
91 - else if(tag == 6){
92 - PoolSdk *poolSdk = [PoolSdk shareSDK];
93 - NSLog(@"channelId:%@parame1:%@parame2:%@custom:%@",[poolSdk getGameChannelId],[poolSdk getChannelParameter1],[poolSdk getChannelParameter2],[poolSdk getCustomValue]);
94 - }
95 -}
96 -
97 -
98 -- (void)didReceiveMemoryWarning {
99 - [super didReceiveMemoryWarning];
100 - // Dispose of any resources that can be recreated.
101 -}
102 -
103 -- (void)receiveSDKMessage:(NSNotification *)notification
104 -{
105 - [[PoolConfig getInstance] getValueByKey:@"gamechannelid"];
106 - PoolSDKResult *result = [notification object];
107 - if (result == nil ) {
108 - return;
109 - }
110 - switch (result.notiType) {
111 -
112 - case PoolSDKNotificationInitSDK:
113 - {
114 - NSLog(@"收到PoolSDKNotificationInitSDK");
115 - }
116 -
117 - break;
118 - case PoolSDKNotificationLogin:
119 - {
120 - if (result.statusCode == POOLSDK_NO_ERROR) {
121 - PoolLoginInfo *loginInfo = result.extendData;
122 - NSLog(@"收到登陆信息public openid:%@", [loginInfo openId]);
123 - NSLog(@"收到登陆信息public token:%@", [loginInfo sign]);
124 - NSLog(@"收到登陆信息public timestamp:%@", [loginInfo timestamp]);
125 - }else{
126 - NSLog(@"%@",[result description]);
127 - }
128 - }
129 - break;
130 - case PoolSDKNotificationPay:
131 - {
132 - NSLog(@"收到登陆信息PoolSDKNotificationPay");
133 -
134 - }
135 - break;
136 - default:
137 - break;
138 - }
139 -
140 -
141 -}
142 -
143 -@end
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
1 -//
2 -// GetWifiMac.h
3 -// mangosanguo
4 -//
5 -// Created by 莫 on 12-9-28.
6 -// Copyright (c) 2012年 private. All rights reserved.
7 -//
8 -
9 -#import <UIKit/UIKit.h>
10 -
11 -@interface YouaiGetWifiMac : NSObject
12 -
13 -+ (NSString *)macaddress;
14 -@end
1 -//
2 -// YouaiLoginInfo.h
3 -// YouaiSDK
4 -//
5 -// Created by 莫 东荣 on 13-4-10.
6 -// Copyright (c) 2013年 莫 东荣. All rights reserved.
7 -//
8 -
9 -#import <Foundation/Foundation.h>
10 -
11 -@interface YouaiLoginInfo : NSObject //用户uid
12 -{
13 -//
14 -NSString *openId;
15 -//token
16 -NSString *token;
17 -//时间戳
18 -NSString *timestamp;
19 -
20 -}
21 -
22 -@property(retain,nonatomic) NSString *openId;
23 -@property(retain,nonatomic) NSString *token;
24 -@property(retain,nonatomic) NSString *timestamp;
25 -+ (YouaiLoginInfo *)getInstance;
26 -@end
...\ No newline at end of file ...\ No newline at end of file
1 -//
2 -// YouaiNotifications.h
3 -// YouaiSDK
4 -//
5 -// Created by 莫 东荣 on 13-4-10.
6 -// Copyright (c) 2013年 莫 东荣. All rights reserved.
7 -//
8 -
9 -#import <Foundation/Foundation.h>
10 -
11 -extern NSString * const youaiExitNotification; /**< 退出 */
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; /**< 出错 */
17 -
18 -
19 -@interface YouaiNotifications : NSObject
20 -
21 -@end
1 -//
2 -// YouaiSDKMgr.h
3 -// YouaiSDK
4 -//
5 -// Created by 莫 东荣 on 13-4-9.
6 -// Copyright (c) 2013年 莫 东荣. All rights reserved.
7 -//
8 -
9 -#import <UIKit/UIKit.h>
10 -#import "StoreKit/StoreKit.h"
11 -
12 -@interface YouaiSDKMgr : NSObject
13 -{
14 - NSString* appId_;
15 - NSString* appKey_;
16 -
17 - NSString* inviterCode_;
18 -// NSString* openId;
19 -// NSString* loginKey;
20 -
21 -}
22 -
23 -+ (YouaiSDKMgr *)getInstance;
24 -- (void)initSDK;
25 -- (void)initSDK:(NSString *)weixinId;
26 -
27 -- (void)openLogin:(NSString *)appId : (NSString *)appKey : (UIViewController *)controller;
28 -- (void)openLogin:(NSString *)appId : (NSString *)appKey : (UIViewController *)controller : (NSString *) inviterCode;
29 -- (void)openLogin:(NSString *)appId : (NSString *)appKey : (UIViewController *)controller : (NSString *) inviterCode : (NSString *)userName : (NSString *)passWord;
30 -- (void)setStyleName:(NSString*)styleName;
31 -- (void)openLogin:(NSString *)appId : (NSString *)appKey : (UIViewController *)controller : (NSString *)userName : (NSString *)passWord;
32 -
33 -- (void)openCenter: (UIViewController *)controller;
34 -- (void)openPay: (NSString *)serverId : (NSString *)nickName : (NSString *)callBack : (UIViewController *)controller;
35 -- (void)openPay: (NSString *)serverId : (NSString *)nickName : (NSNumber *)payAmount : (NSString *)callBack : (UIViewController *)controller;
36 -- (void)openShare: (UIViewController *)controller;
37 -- (void)log: (NSString*)log_key : (NSInteger)log_data: (NSString*)log_remark;
38 -
39 -- (void)checkAilpay: (NSURL *)url : (UIViewController *)controller;
40 -
41 -- (void)applePayCallBack:(NSString *)url :(SKPaymentTransaction *)transaction :(NSString *)resultStr;
42 -
43 -
44 -
45 -@end
1 -//
2 -// YouaiViewController.h
3 -// newYouaiSDK
4 -//
5 -// Created by Mog90 on 14-9-28.
6 -// Copyright (c) 2014年 东荣 莫. All rights reserved.
7 -//
8 -
9 -#import <UIKit/UIKit.h>
10 -#import "YouaiLoginInfo.h"
11 -
12 -@interface YouaiViewController : UIViewController<UIWebViewDelegate>
13 -{
14 - UIWebView *webView_;
15 - UIActivityIndicatorView *activityIndicator;
16 -}
17 -
18 -
19 -//@property(assign) int webViewWidth;
20 -//@property(assign) int webViewHeight;
21 -//@property(assign) int screenwidth;
22 -//@property(assign) int screenHeight;
23 -
24 -@property(assign) BOOL hasCorner;
25 -
26 --(void)setView:(int)webViewWidth :(int) webViewHeight :(int) screenwidth :(int) screenHeight;
27 -- (void)initWebView;
28 -- (void)loadWebPageWithString:(NSString *)url;
29 -- (void)loadWebPageWithJs:(NSString *)content;
30 -- (void)postNotification:(NSString *)name : (NSString *)code;
31 -- (void)receiveIap:(NSNotification *)notification;
32 -
33 -@end
1 -//
2 -// main.m
3 -// Demo
4 -//
5 -// Created by winFan on 12/9/15.
6 -// Copyright (c) 2015 winFan. All rights reserved.
7 -//
8 -
9 -#import <UIKit/UIKit.h>
10 -#import "AppDelegate.h"
11 -
12 -int main(int argc, char * argv[]) {
13 - @autoreleasepool {
14 - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 - }
16 -}
1 -{
2 -"APP_ID": "58abba4954c21d1275766755",
3 -"APP_KEY":"28ed3cfdcd40d081a5e8dd761f7e344b",
4 -
5 -
6 -"appScheme": "com.xingchen.ksws.xyios.alipay",
7 -
8 -"gameSimpleName": "fytx_test",
9 -"sdkSimpleName": "i9133_ios",
10 -"sdkVersionCode":"V1_0",
11 -
12 -
13 -"gamechannelid": "channelId",
14 -"custom": "custom",
15 -"c2": "12356",
16 -"c1": "65321",
17 -"loginCheckUrl": "http://183.57.76.181:9010/logincheck/check",
18 -"payorderurl": "http://183.57.76.181:9020/paycheck/create",
19 -"paycheckurl": "http://183.57.76.181:9020/paycheck/confirm"
20 -}
...\ No newline at end of file ...\ No newline at end of file
No preview for this file type
1 -//
2 -// DemoTests.m
3 -// DemoTests
4 -//
5 -// Created by winFan on 12/9/15.
6 -// Copyright (c) 2015 winFan. All rights reserved.
7 -//
8 -
9 -#import <UIKit/UIKit.h>
10 -#import <XCTest/XCTest.h>
11 -
12 -@interface DemoTests : XCTestCase
13 -
14 -@end
15 -
16 -@implementation DemoTests
17 -
18 -- (void)setUp {
19 - [super setUp];
20 - // Put setup code here. This method is called before the invocation of each test method in the class.
21 -}
22 -
23 -- (void)tearDown {
24 - // Put teardown code here. This method is called after the invocation of each test method in the class.
25 - [super tearDown];
26 -}
27 -
28 -- (void)testExample {
29 - // This is an example of a functional test case.
30 - XCTAssert(YES, @"Pass");
31 -}
32 -
33 -- (void)testPerformanceExample {
34 - // This is an example of a performance test case.
35 - [self measureBlock:^{
36 - // Put the code you want to measure the time of here.
37 - }];
38 -}
39 -
40 -@end
1 -<?xml version="1.0" encoding="UTF-8"?>
2 -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3 -<plist version="1.0">
4 -<dict>
5 - <key>CFBundleDevelopmentRegion</key>
6 - <string>en</string>
7 - <key>CFBundleExecutable</key>
8 - <string>$(EXECUTABLE_NAME)</string>
9 - <key>CFBundleIdentifier</key>
10 - <string>com.mango.ios.fytx.$(PRODUCT_NAME:rfc1034identifier)</string>
11 - <key>CFBundleInfoDictionaryVersion</key>
12 - <string>6.0</string>
13 - <key>CFBundleName</key>
14 - <string>$(PRODUCT_NAME)</string>
15 - <key>CFBundlePackageType</key>
16 - <string>BNDL</string>
17 - <key>CFBundleShortVersionString</key>
18 - <string>1.0</string>
19 - <key>CFBundleSignature</key>
20 - <string>????</string>
21 - <key>CFBundleVersion</key>
22 - <string>1</string>
23 -</dict>
24 -</plist>
1 -<?xml version="1.0" encoding="UTF-8"?>
2 -<Workspace
3 - version = "1.0">
4 - <FileRef
5 - location = "self:/Users/xuguohong/Documents/pool_sdk/public_sdk/youai_foolsdk_ios/channel_demo/PoolSdk_i9133_Demo/PoolSdk_i9133_Demo.xcodeproj">
6 - </FileRef>
7 -</Workspace>
1 -{
2 - "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "5b13317c-0110-4367-8746-06bc6aadd3cd++2397",
3 - "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : {
4 - "5b13317c-0110-4367-8746-06bc6aadd3cd++2397" : {
5 -
6 - }
7 - },
8 - "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : {
9 - "5b13317c-0110-4367-8746-06bc6aadd3cd++2397" : 0
10 - },
11 - "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "8119CC7B-EDC1-4646-9378-8ECAC2EEB94B",
12 - "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : {
13 - "5b13317c-0110-4367-8746-06bc6aadd3cd++2397" : "youai_foolsdk_ios\/"
14 - },
15 - "DVTSourceControlWorkspaceBlueprintNameKey" : "Demo",
16 - "DVTSourceControlWorkspaceBlueprintVersion" : 204,
17 - "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "PoolSdk_Demo\/Demo.xcodeproj",
18 - "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [
19 - {
20 - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "svn:\/\/10.21.210.99",
21 - "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Subversion",
22 - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "5b13317c-0110-4367-8746-06bc6aadd3cd++2397"
23 - }
24 - ]
25 -}
...\ No newline at end of file ...\ No newline at end of file
1 -<?xml version="1.0" encoding="UTF-8"?>
2 -<Bucket
3 - type = "1"
4 - version = "2.0">
5 - <Breakpoints>
6 - <BreakpointProxy
7 - BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
8 - <BreakpointContent
9 - shouldBeEnabled = "Yes"
10 - ignoreCount = "0"
11 - continueAfterRunningActions = "No"
12 - filePath = "../PoolSdk/PoolSdk/SDKInterface.m"
13 - timestampString = "471440051.171901"
14 - startingColumnNumber = "9223372036854775807"
15 - endingColumnNumber = "9223372036854775807"
16 - startingLineNumber = "77"
17 - endingLineNumber = "77"
18 - landmarkName = "-receiveLoginMessage:"
19 - landmarkType = "5">
20 - </BreakpointContent>
21 - </BreakpointProxy>
22 - <BreakpointProxy
23 - BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
24 - <BreakpointContent
25 - shouldBeEnabled = "Yes"
26 - ignoreCount = "0"
27 - continueAfterRunningActions = "No"
28 - filePath = "../PoolSdk/PoolSdk/SDKInterface.m"
29 - timestampString = "471440051.171901"
30 - startingColumnNumber = "9223372036854775807"
31 - endingColumnNumber = "9223372036854775807"
32 - startingLineNumber = "43"
33 - endingLineNumber = "43"
34 - landmarkName = "-SDKloginSDK"
35 - landmarkType = "5">
36 - </BreakpointContent>
37 - </BreakpointProxy>
38 - </Breakpoints>
39 -</Bucket>
1 -<?xml version="1.0" encoding="UTF-8"?>
2 -<Scheme
3 - LastUpgradeVersion = "0640"
4 - version = "1.3">
5 - <BuildAction
6 - parallelizeBuildables = "YES"
7 - buildImplicitDependencies = "YES">
8 - <BuildActionEntries>
9 - <BuildActionEntry
10 - buildForTesting = "YES"
11 - buildForRunning = "YES"
12 - buildForProfiling = "YES"
13 - buildForArchiving = "YES"
14 - buildForAnalyzing = "YES">
15 - <BuildableReference
16 - BuildableIdentifier = "primary"
17 - BlueprintIdentifier = "BB5F3C871C1811BC00DA339D"
18 - BuildableName = "Demo.app"
19 - BlueprintName = "Demo"
20 - ReferencedContainer = "container:Demo.xcodeproj">
21 - </BuildableReference>
22 - </BuildActionEntry>
23 - <BuildActionEntry
24 - buildForTesting = "YES"
25 - buildForRunning = "YES"
26 - buildForProfiling = "NO"
27 - buildForArchiving = "NO"
28 - buildForAnalyzing = "YES">
29 - <BuildableReference
30 - BuildableIdentifier = "primary"
31 - BlueprintIdentifier = "BB5F3CA01C1811BC00DA339D"
32 - BuildableName = "DemoTests.xctest"
33 - BlueprintName = "DemoTests"
34 - ReferencedContainer = "container:Demo.xcodeproj">
35 - </BuildableReference>
36 - </BuildActionEntry>
37 - </BuildActionEntries>
38 - </BuildAction>
39 - <TestAction
40 - selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
41 - selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
42 - shouldUseLaunchSchemeArgsEnv = "YES"
43 - buildConfiguration = "Debug">
44 - <Testables>
45 - <TestableReference
46 - skipped = "NO">
47 - <BuildableReference
48 - BuildableIdentifier = "primary"
49 - BlueprintIdentifier = "BB5F3CA01C1811BC00DA339D"
50 - BuildableName = "DemoTests.xctest"
51 - BlueprintName = "DemoTests"
52 - ReferencedContainer = "container:Demo.xcodeproj">
53 - </BuildableReference>
54 - </TestableReference>
55 - </Testables>
56 - <MacroExpansion>
57 - <BuildableReference
58 - BuildableIdentifier = "primary"
59 - BlueprintIdentifier = "BB5F3C871C1811BC00DA339D"
60 - BuildableName = "Demo.app"
61 - BlueprintName = "Demo"
62 - ReferencedContainer = "container:Demo.xcodeproj">
63 - </BuildableReference>
64 - </MacroExpansion>
65 - </TestAction>
66 - <LaunchAction
67 - selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
68 - selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
69 - launchStyle = "0"
70 - useCustomWorkingDirectory = "NO"
71 - buildConfiguration = "Debug"
72 - ignoresPersistentStateOnLaunch = "NO"
73 - debugDocumentVersioning = "YES"
74 - allowLocationSimulation = "YES">
75 - <BuildableProductRunnable
76 - runnableDebuggingMode = "0">
77 - <BuildableReference
78 - BuildableIdentifier = "primary"
79 - BlueprintIdentifier = "BB5F3C871C1811BC00DA339D"
80 - BuildableName = "Demo.app"
81 - BlueprintName = "Demo"
82 - ReferencedContainer = "container:Demo.xcodeproj">
83 - </BuildableReference>
84 - </BuildableProductRunnable>
85 - <AdditionalOptions>
86 - </AdditionalOptions>
87 - </LaunchAction>
88 - <ProfileAction
89 - shouldUseLaunchSchemeArgsEnv = "YES"
90 - savedToolIdentifier = ""
91 - useCustomWorkingDirectory = "NO"
92 - buildConfiguration = "Release"
93 - debugDocumentVersioning = "YES">
94 - <BuildableProductRunnable
95 - runnableDebuggingMode = "0">
96 - <BuildableReference
97 - BuildableIdentifier = "primary"
98 - BlueprintIdentifier = "BB5F3C871C1811BC00DA339D"
99 - BuildableName = "Demo.app"
100 - BlueprintName = "Demo"
101 - ReferencedContainer = "container:Demo.xcodeproj">
102 - </BuildableReference>
103 - </BuildableProductRunnable>
104 - </ProfileAction>
105 - <AnalyzeAction
106 - buildConfiguration = "Debug">
107 - </AnalyzeAction>
108 - <ArchiveAction
109 - buildConfiguration = "Release"
110 - revealArchiveInOrganizer = "YES">
111 - </ArchiveAction>
112 -</Scheme>
1 -<?xml version="1.0" encoding="UTF-8"?>
2 -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3 -<plist version="1.0">
4 -<dict>
5 - <key>SchemeUserState</key>
6 - <dict>
7 - <key>Demo.xcscheme</key>
8 - <dict>
9 - <key>orderHint</key>
10 - <integer>0</integer>
11 - </dict>
12 - </dict>
13 - <key>SuppressBuildableAutocreation</key>
14 - <dict>
15 - <key>BB5F3C871C1811BC00DA339D</key>
16 - <dict>
17 - <key>primary</key>
18 - <true/>
19 - </dict>
20 - <key>BB5F3CA01C1811BC00DA339D</key>
21 - <dict>
22 - <key>primary</key>
23 - <true/>
24 - </dict>
25 - </dict>
26 -</dict>
27 -</plist>
1 -<?xml version="1.0" encoding="UTF-8"?>
2 -<Bucket
3 - type = "1"
4 - version = "2.0">
5 - <Breakpoints>
6 - <BreakpointProxy
7 - BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
8 - <BreakpointContent
9 - shouldBeEnabled = "No"
10 - ignoreCount = "0"
11 - continueAfterRunningActions = "No"
12 - filePath = "Demo/SDKInterface.h"
13 - timestampString = "474775745.083759"
14 - startingColumnNumber = "9223372036854775807"
15 - endingColumnNumber = "9223372036854775807"
16 - startingLineNumber = "9"
17 - endingLineNumber = "9"
18 - landmarkName = "@interface SDKInterface"
19 - landmarkType = "2">
20 - </BreakpointContent>
21 - </BreakpointProxy>
22 - </Breakpoints>
23 -</Bucket>
1 -<?xml version="1.0" encoding="UTF-8"?>
2 -<Scheme
3 - LastUpgradeVersion = "0700"
4 - version = "1.3">
5 - <BuildAction
6 - parallelizeBuildables = "YES"
7 - buildImplicitDependencies = "YES">
8 - <BuildActionEntries>
9 - <BuildActionEntry
10 - buildForTesting = "YES"
11 - buildForRunning = "YES"
12 - buildForProfiling = "YES"
13 - buildForArchiving = "YES"
14 - buildForAnalyzing = "YES">
15 - <BuildableReference
16 - BuildableIdentifier = "primary"
17 - BlueprintIdentifier = "BB5F3C871C1811BC00DA339D"
18 - BuildableName = "PoolSdk_i9133_Demo.app"
19 - BlueprintName = "PoolSdk_i9133_Demo"
20 - ReferencedContainer = "container:PoolSdk_i9133_Demo.xcodeproj">
21 - </BuildableReference>
22 - </BuildActionEntry>
23 - </BuildActionEntries>
24 - </BuildAction>
25 - <TestAction
26 - buildConfiguration = "Debug"
27 - selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28 - selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29 - shouldUseLaunchSchemeArgsEnv = "YES">
30 - <Testables>
31 - <TestableReference
32 - skipped = "NO">
33 - <BuildableReference
34 - BuildableIdentifier = "primary"
35 - BlueprintIdentifier = "BB5F3CA01C1811BC00DA339D"
36 - BuildableName = "PoolSdk_i9133_Demo.xctest"
37 - BlueprintName = "PoolSdk_i9133_DemoTests"
38 - ReferencedContainer = "container:PoolSdk_i9133_Demo.xcodeproj">
39 - </BuildableReference>
40 - </TestableReference>
41 - </Testables>
42 - <MacroExpansion>
43 - <BuildableReference
44 - BuildableIdentifier = "primary"
45 - BlueprintIdentifier = "BB5F3C871C1811BC00DA339D"
46 - BuildableName = "PoolSdk_i9133_Demo.app"
47 - BlueprintName = "PoolSdk_i9133_Demo"
48 - ReferencedContainer = "container:PoolSdk_i9133_Demo.xcodeproj">
49 - </BuildableReference>
50 - </MacroExpansion>
51 - <AdditionalOptions>
52 - </AdditionalOptions>
53 - </TestAction>
54 - <LaunchAction
55 - buildConfiguration = "Debug"
56 - selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
57 - selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
58 - launchStyle = "0"
59 - useCustomWorkingDirectory = "NO"
60 - ignoresPersistentStateOnLaunch = "NO"
61 - debugDocumentVersioning = "YES"
62 - debugServiceExtension = "internal"
63 - allowLocationSimulation = "YES">
64 - <BuildableProductRunnable
65 - runnableDebuggingMode = "0">
66 - <BuildableReference
67 - BuildableIdentifier = "primary"
68 - BlueprintIdentifier = "BB5F3C871C1811BC00DA339D"
69 - BuildableName = "PoolSdk_i9133_Demo.app"
70 - BlueprintName = "PoolSdk_i9133_Demo"
71 - ReferencedContainer = "container:PoolSdk_i9133_Demo.xcodeproj">
72 - </BuildableReference>
73 - </BuildableProductRunnable>
74 - <AdditionalOptions>
75 - </AdditionalOptions>
76 - </LaunchAction>
77 - <ProfileAction
78 - buildConfiguration = "Release"
79 - shouldUseLaunchSchemeArgsEnv = "YES"
80 - savedToolIdentifier = ""
81 - useCustomWorkingDirectory = "NO"
82 - debugDocumentVersioning = "YES">
83 - <BuildableProductRunnable
84 - runnableDebuggingMode = "0">
85 - <BuildableReference
86 - BuildableIdentifier = "primary"
87 - BlueprintIdentifier = "BB5F3C871C1811BC00DA339D"
88 - BuildableName = "PoolSdk_i9133_Demo.app"
89 - BlueprintName = "PoolSdk_i9133_Demo"
90 - ReferencedContainer = "container:PoolSdk_i9133_Demo.xcodeproj">
91 - </BuildableReference>
92 - </BuildableProductRunnable>
93 - </ProfileAction>
94 - <AnalyzeAction
95 - buildConfiguration = "Debug">
96 - </AnalyzeAction>
97 - <ArchiveAction
98 - buildConfiguration = "Release"
99 - revealArchiveInOrganizer = "YES">
100 - </ArchiveAction>
101 -</Scheme>
1 -<?xml version="1.0" encoding="UTF-8"?>
2 -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3 -<plist version="1.0">
4 -<dict>
5 - <key>SchemeUserState</key>
6 - <dict>
7 - <key>Demo.xcscheme</key>
8 - <dict>
9 - <key>orderHint</key>
10 - <integer>0</integer>
11 - </dict>
12 - </dict>
13 - <key>SuppressBuildableAutocreation</key>
14 - <dict>
15 - <key>BB5F3C871C1811BC00DA339D</key>
16 - <dict>
17 - <key>primary</key>
18 - <true/>
19 - </dict>
20 - <key>BB5F3CA01C1811BC00DA339D</key>
21 - <dict>
22 - <key>primary</key>
23 - <true/>
24 - </dict>
25 - </dict>
26 -</dict>
27 -</plist>
1 -### 2017-02-27
2 -添加ios公共SDK接入资料
...\ No newline at end of file ...\ No newline at end of file
No preview for this file type
No preview for this file type
No preview for this file type
1 -//
2 -// APAuthInfo.h
3 -// AliSDKDemo
4 -//
5 -// Created by 方彬 on 14-7-18.
6 -// Copyright (c) 2014年 Alipay.com. All rights reserved.
7 -//
8 -
9 -#import <Foundation/Foundation.h>
10 -
11 -@interface APayAuthInfo : NSObject
12 -
13 -@property(nonatomic, copy)NSString *appID;
14 -@property(nonatomic, copy)NSString *pid;
15 -@property(nonatomic, copy)NSString *redirectUri;
16 -
17 -/**
18 - * 初始化AuthInfo
19 - *
20 - * @param appIDStr 应用ID
21 - * @param productIDStr 产品码 该商户在aboss签约的产品,用户获取pid获取的参数
22 - * @param pidStr 商户ID 可不填
23 - * @param uriStr 授权的应用回调地址 比如:alidemo://auth
24 - *
25 - * @return authinfo实例
26 - */
27 -- (id)initWithAppID:(NSString *)appIDStr
28 - pid:(NSString *)pidStr
29 - redirectUri:(NSString *)uriStr;
30 -
31 -- (NSString *)description;
32 -- (NSString *)wapDescription;
33 -@end
1 -//
2 -// AlipaySDK.h
3 -// AlipaySDK
4 -//
5 -// Created by 方彬 on 14-4-28.
6 -// Copyright (c) 2014年 Alipay. All rights reserved.
7 -//
8 -
9 -
10 -////////////////////////////////////////////////////////
11 -////////////////version:2.1 motify:2014.12.24//////////
12 -///////////////////Merry Christmas=。=//////////////////
13 -////////////////////////////////////////////////////////
14 -
15 -
16 -#import "APayAuthInfo.h"
17 -typedef enum {
18 - ALIPAY_TIDFACTOR_IMEI,
19 - ALIPAY_TIDFACTOR_IMSI,
20 - ALIPAY_TIDFACTOR_TID,
21 - ALIPAY_TIDFACTOR_CLIENTKEY,
22 - ALIPAY_TIDFACTOR_VIMEI,
23 - ALIPAY_TIDFACTOR_VIMSI,
24 - ALIPAY_TIDFACTOR_CLIENTID,
25 - ALIPAY_TIDFACTOR_APDID,
26 - ALIPAY_TIDFACTOR_MAX
27 -} AlipayTidFactor;
28 -
29 -typedef void(^CompletionBlock)(NSDictionary *resultDic);
30 -
31 -@interface AlipaySDK : NSObject
32 -
33 -/**
34 - * 创建支付单例服务
35 - *
36 - * @return 返回单例对象
37 - */
38 -+ (AlipaySDK *)defaultService;
39 -
40 -/**
41 - * 支付接口
42 - *
43 - * @param orderStr 订单信息
44 - * @param schemeStr 调用支付的app注册在info.plist中的scheme
45 - * @param compltionBlock 支付结果回调Block
46 - */
47 -- (void)payOrder:(NSString *)orderStr
48 - fromScheme:(NSString *)schemeStr
49 - callback:(CompletionBlock)completionBlock;
50 -
51 -/**
52 - * 处理钱包或者独立快捷app支付跳回商户app携带的支付结果Url
53 - *
54 - * @param resultUrl 支付结果url,传入后由SDK解析,统一在上面的pay方法的callback中回调
55 - * @param completionBlock 跳钱包支付结果回调,保证跳转钱包支付过程中,即使调用方app被系统kill时,能通过这个回调取到支付结果。
56 - */
57 -- (void)processOrderWithPaymentResult:(NSURL *)resultUrl
58 - standbyCallback:(CompletionBlock)completionBlock;
59 -
60 -/**
61 - * 是否已经使用过
62 - *
63 - * @return YES为已经使用过,NO反之
64 - */
65 -- (BOOL)isLogined;
66 -
67 -/**
68 - * 当前版本号
69 - *
70 - * @return 当前版本字符串
71 - */
72 -- (NSString *)currentVersion;
73 -
74 -/**
75 - * 当前版本号
76 - *
77 - * @return tid相关信息
78 - */
79 -- (NSString*)queryTidFactor:(AlipayTidFactor)factor;
80 -
81 -/**
82 - * 測試所用,realse包无效
83 - *
84 - * @param url 测试环境
85 - */
86 -- (void)setUrl:(NSString *)url;
87 -
88 -
89 -//////////////////////////////////////////////////////////////////////////////////////////////
90 -//////////////////////////h5 拦截支付入口///////////////////////////////////////////////////////
91 -//////////////////////////////////////////////////////////////////////////////////////////////
92 -
93 -/**
94 - * url order 获取接口
95 - *
96 - * @param urlStr 拦截的 url string
97 - *
98 - * @return 获取到的url order info
99 - */
100 -- (NSString*)fetchOrderInfoFromH5PayUrl:(NSString*)urlStr;
101 -
102 -
103 -/**
104 - * url支付接口
105 - *
106 - * @param orderStr 订单信息
107 - * @param schemeStr 调用支付的app注册在info.plist中的scheme
108 - * @param compltionBlock 支付结果回调Block
109 - */
110 -- (void)payUrlOrder:(NSString *)orderStr
111 - fromScheme:(NSString *)schemeStr
112 - callback:(CompletionBlock)completionBlock;
113 -
114 -
115 -//////////////////////////////////////////////////////////////////////////////////////////////
116 -//////////////////////////授权1.0//////////////////////////////////////////////////////////////
117 -//////////////////////////////////////////////////////////////////////////////////////////////
118 -
119 -/**
120 - * 快登授权
121 - * @param authInfo 需授权信息
122 - * @param completionBlock 授权结果回调
123 - */
124 -- (void)authWithInfo:(APayAuthInfo *)authInfo
125 - callback:(CompletionBlock)completionBlock;
126 -
127 -
128 -/**
129 - * 处理授权信息Url
130 - *
131 - * @param resultUrl 钱包返回的授权结果url
132 - * @param completionBlock 跳授权结果回调,保证跳转钱包授权过程中,即使调用方app被系统kill时,能通过这个回调取到支付结果。
133 - */
134 -- (void)processAuthResult:(NSURL *)resultUrl
135 - standbyCallback:(CompletionBlock)completionBlock;
136 -
137 -//////////////////////////////////////////////////////////////////////////////////////////////
138 -//////////////////////////授权2.0//////////////////////////////////////////////////////////////
139 -//////////////////////////////////////////////////////////////////////////////////////////////
140 -
141 -/**
142 - * 快登授权2.0
143 - *
144 - * @param infoStr 授权请求信息字符串
145 - * @param schemeStr 调用授权的app注册在info.plist中的scheme
146 - * @param completionBlock 授权结果回调
147 - */
148 -- (void)auth_V2WithInfo:(NSString *)infoStr
149 - fromScheme:(NSString *)schemeStr
150 - callback:(CompletionBlock)completionBlock;
151 -
152 -/**
153 - * 处理授权信息Url
154 - *
155 - * @param resultUrl 钱包返回的授权结果url
156 - * @param completionBlock 跳授权结果回调,保证跳转钱包授权过程中,即使调用方app被系统kill时,能通过这个回调取到支付结果。
157 - */
158 -- (void)processAuth_V2Result:(NSURL *)resultUrl
159 - standbyCallback:(CompletionBlock)completionBlock;
160 -
161 -@end
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 -
9 -#import <Foundation/Foundation.h>
10 -
11 -void DGLog(NSString *fmt, ...);
12 -
13 -typedef NS_ENUM(NSInteger, DGLoggerLevel)
14 -{
15 - ELogVerbose = 1,
16 - ELogDebug,
17 - ELogInfo,
18 - ELogWarn,
19 - ELogError
20 -};
21 -
22 -@interface DGLogger : NSObject
23 -
24 -+ (void)showLog:(NSString *)fmt,...;
25 -
26 -+ (void)showLog:(DGLoggerLevel)level log:(NSString *)fmt,...;
27 -
28 -+ (void)isShowLog:(BOOL)flag;
29 -
30 -@end
1 -//
2 -// Interface.h
3 -// PoolSdk
4 -//
5 -// Created by winFan on 12/10/15.
6 -// Copyright (c) 2015 winFan. All rights reserved.
7 -//
8 -
9 -
10 -#include "UnionInterface.h"
11 -#import <SafariServices/SafariServices.h>
12 -@interface Interface : NSObject <UnionInterface,SFSafariViewControllerDelegate>
13 -@property(nonatomic, strong)UIViewController *controller;
14 -
15 -
16 -@end
...\ No newline at end of file ...\ No newline at end of file
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 -
9 -#import <Foundation/Foundation.h>
10 -
11 -@interface NetCenter : NSObject
12 -
13 -@property(nonatomic,retain) NSMutableData *receiveData;
14 -
15 -@property(nonatomic,assign)int dataPackSerialNo;
16 -
17 -
18 -+ (NetCenter *)getInstance;
19 -
20 -- (NSString *)httpGetSyn:(NSString *) getUrl;
21 -
22 -- (NSString *)httpPostSyn:(NSString *) postUrl : (NSDictionary *) postData;
23 -
24 -- (void)httpGetNoSyn;
25 -
26 -- (void)httpPostNoSyn:(NSString *) postUrl :(NSDictionary *)postDict;
27 -
28 -- (NSString *)dicToString:(NSDictionary *) dict;
29 -@end
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 -
9 -#ifndef __PoolSdk__OtherSetting__
10 -#define __PoolSdk__OtherSetting__
11 -
12 -
13 -/**
14 - 应用支持的方向
15 - */
16 -typedef NS_ENUM(NSUInteger, ESDKOrientation) {
17 - ESDKOrientationPortrait = 1,//竖
18 - ESDKOrientationLandscape,//横
19 - ESDKOrientationNone//自动旋转
20 -};
21 -
22 -/**
23 - 应用支持的方向
24 - */
25 -typedef NS_ENUM(NSUInteger, REPORT_TYPE) {
26 - REPORT_TYPE_OPEN = 1,//竖
27 - REPORT_TYPE_ENTER,//横
28 - REPORT_TYPE_DEFINE//自动旋转
29 -};
30 -
31 -#endif /* defined(__PoolSdk__OtherSetting__) */
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 -//
8 -#import <Foundation/Foundation.h>
9 -#import "PoolSdk/PoolLoginInfo.h"
10 -#import "PoolSdk/PoolNotification.h"
11 -#import "PoolSdk/PoolCreateOrderInfo.h"
12 -#import "PoolSdk/PoolPayInfo.h"
13 -#import "PoolReportInfo.h"
14 -@interface PoolChecker : NSObject
15 -@property(nonatomic, strong)NSString *userId;
16 -+ (PoolChecker *)getInstance;
17 -- (void)initChecker;
18 -- (void)startCheck:(PoolLoginInfo *)loginInfo;
19 -- (void) createOrder:(PoolCreateOrderInfo *)payInfo;
20 -- (void) reportOpen;
21 -- (void)handleFirstOpenApp:(NSString*) path;
22 -- (void) reportEnter:(PoolReportInfo *)reInfo;
23 -- (void) report:(NSString *)_action :(PoolReportInfo *)reInfo;
24 -- (void)sendNotice:(PoolSDKNotificationType)notiType
25 - notiName:(NSString *)notiName
26 - statusCode:(int)nCode
27 - description:(NSString *)szDescripton
28 - extendData:(NSObject *)extendData;
29 -@end
...\ No newline at end of file ...\ No newline at end of file
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 -
9 -#import <Foundation/Foundation.h>
10 -
11 -@interface PoolConfig : NSObject
12 -
13 -@property(nonatomic, strong)NSString *gameSimpleName;
14 -@property(nonatomic, strong)NSString *sdkSimpleName;
15 -@property(nonatomic, strong)NSString *sdkVersionCode;
16 -@property(nonatomic, strong)NSString *loginCheckUrl;
17 -@property(nonatomic, strong)NSString *payOrderUrl;
18 -@property(nonatomic, strong)NSString *payCheckUrl;
19 -@property(nonatomic, strong)NSString *c1;
20 -@property(nonatomic, strong)NSString *c2;
21 -@property(nonatomic, strong)NSString *custom;
22 -
23 -+ (PoolConfig *)getInstance;
24 -
25 -- (void) loadFile:(NSString *) fileName;
26 -
27 -- (NSString *)getValueByKey:(NSString *) key;
28 -
29 -- (void) updateC1C2Value:(NSString *)c1 c2:(NSString *)c2;
30 -
31 -@end
...\ No newline at end of file ...\ No newline at end of file
1 -//
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
12 -
13 -@property(nonatomic,strong)NSString *serverId;
14 -@property(nonatomic, strong)NSString *serverName;//角色名称
15 -@property(nonatomic, strong)NSString *playerId;//所在服务器名称
16 -@property(nonatomic, strong)NSString *playerName;//所在服务器id
17 -@property(nonatomic, strong)NSString *playerLevel;//所在服务器id
18 -@property(nonatomic, strong)NSString *postAmount;//所在服务器id
19 -@property(nonatomic, strong)NSString *productId;//所在服务器id
20 -@property(nonatomic, strong)NSString *productName;//所在服务器id
21 -@property(nonatomic, strong)NSString *productDesc;//所在服务器id
22 -@property(nonatomic, strong)NSString *custom;//所在服务器id
23 -@property(nonatomic, strong)NSString *exchange;//所在服务器id
24 -@property(nonatomic, strong)NSString *otherInfo;//所在服务器id
25 -@property(nonatomic, strong)NSString *userId;//所在服务器id
26 -@property(nonatomic, strong)NSString *timestamp;//所在服务器id
27 -
28 -- (NSString *) getTsign ;
29 -- (NSString *) getTimestamp ;
30 -
31 -@end
...\ No newline at end of file ...\ No newline at end of file
1 -//
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
11 -
12 -@property(nonatomic,strong)NSString *timestamp;
13 -@property(nonatomic, strong)NSString *sign;//角色名称
14 -@property(nonatomic, strong)NSString *other;//所在服务器名称
15 -@property(nonatomic, strong)NSString *openId;//所在服务器id
16 -@property(nonatomic, strong)NSString *userType;//所在服务器id
17 -
18 -
19 -@end
...\ No newline at end of file ...\ No newline at end of file
1 -//
2 -// PoolNotification.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 <Foundation/Foundation.h>
10 -
11 -extern NSString * const poolSDK_Notification; /**< */
12 -extern NSString * const _create_order_notification; /**< */
13 -
14 -
15 -/**
16 - 应用支持的方向
17 - */
18 -typedef NS_ENUM(int, PoolSDKNotificationType) {
19 - PoolSDKNotificationLogin = 1,//登录
20 - PoolSDKNotificationLogout,//注销
21 - PoolSDKNotificationPay,//支付完成
22 - PoolSDKNotificationPause,//暂停退出
23 - PoolSDKNotificationRole,//创建角色
24 - PoolSDKNotificationInitSDK//初始化SDK
25 -};
26 -
27 -
28 -
29 -@interface PoolNotification : NSObject
30 -
31 -@end
32 -
33 -
34 -//////////////////////////////////////////////////////////////////////
35 -@interface PoolSDKResult : NSObject
36 -@property(nonatomic, assign)int statusCode;//请参照此文件下面状态标识
37 -@property(nonatomic, strong)NSString *resultDescription;
38 -@property(nonatomic, strong)NSObject *extendData;
39 -//V1.2.0新增
40 -@property(nonatomic, assign)PoolSDKNotificationType notiType;//消息类型
41 -@property(nonatomic, strong)NSString *notiName;//消息名称
42 -@end
43 -//////////////////////////////////////////////////////////////////////
44 -
45 -//////////////////////////////////////////////////////////////////////
46 -/* 状态标识 */
47 -#define POOLSDK_NO_ERROR 0 /*操作成功*/
48 -
49 -#define POOLSDK_ERROR_LOGIN_FAILED -100 /*登录失败*/
50 -#define POOLSDK_ERROR_LOGIN_CANCEL -101 /*登录取消*/
51 -#define POOLSDK_ERROR_LOGIN_GAMGEACCOUNT -102 /*游戏帐号登录,非平台账号*/
52 -
53 -#define POOLSDK_ERROR_PAY_FAILED -200 /*支付失败*/
54 -#define POOLSDK_ERROR_PAY_CANCEL -201 /*支付取消*/
55 -#define POOLSDK_ERROR_PAY_VERSIGN -202 /*支付验签失败*/
56 -#define POOLSDK_ERROR_CREATE_ORDER_FAILED -203 /*支付验签失败*/
57 -
58 -#define POOLSDK_ERROR_ROLE_CREATE_FAILED -300 /*角色创建失败*/
59 -
60 -#define POOLSDK_ERROR_INIT_FAILED -400 /*初始化失败*/
61 -
62 -//////////////////////////////////////////////////////////////////////
1 -//
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
12 -
13 -@property(nonatomic, strong)NSString *serverId;
14 -@property(nonatomic, strong)NSString *queryId;
15 -@property(nonatomic, strong)NSString *playerId;
16 -@property(nonatomic, strong)NSString *playerName;//所在服务器id
17 -@property(nonatomic, strong)NSString *postAmount;
18 -@property(nonatomic, strong)NSString *productId;
19 -@property(nonatomic, strong)NSString *products;
20 -@property(nonatomic, strong)NSString *custom;
21 -@property(nonatomic, strong)NSString *postTime;
22 -@property(nonatomic, strong)NSString *other;
23 -
24 -@end
...\ No newline at end of file ...\ No newline at end of file
1 -//
2 -// PoolReportInfo.h
3 -// PoolSdk
4 -//
5 -// Created by winFan on 12/21/15.
6 -// Copyright (c) 2015 winFan. All rights reserved.
7 -//
8 -
9 -#import "PoolSdk/PoolBaseModel.h"
10 -@interface PoolReportInfo : PoolBaseModel
11 -
12 -@property(nonatomic, strong)NSString *serverId;
13 -@property(nonatomic, strong)NSString *serverName;
14 -@property(nonatomic, strong)NSString *playerId;
15 -@property(nonatomic, strong)NSString *playerName;//所在服务器id
16 -@property(nonatomic, strong)NSString *playerLevel;
17 -@property(nonatomic, strong)NSString *custom;
18 -@property(nonatomic, strong)NSString *reportType;
19 -
20 -
21 -@property(nonatomic, strong)NSString *openId;
22 -
23 -
24 -#define REPORT_URL @"http://public.sdk.gzyouai.com:9030/sdk/statistic"//@"http://10.200.201.230:9001/sdk/statistic"
25 -#define REPORT_OPEN @"open"
26 -#define REPORT_ENTER @"enter"
27 -#define REPORT_CREATEROLE @"createrole"
28 -#define REPORT_ROLEUPGRADE @"roleupgrade"
29 -
30 -@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 -
9 -#import <Foundation/Foundation.h>
10 -#import <PoolSdk/PoolSdk2.h>
11 -#import <UIKit/UIKit.h>
12 -
13 -@interface PoolSdk : NSObject
14 -/**
15 - * 当前SDK的版本
16 - */
17 -@property(nonatomic, strong, readonly)NSString *sdkVersion;
18 -
19 -/**
20 - * 用于设置url types schemes 默认为工程名
21 - */
22 -@property(nonatomic, strong)NSString *urlSchemes;
23 -
24 -/**
25 - 获取SDK实例对象
26 - */
27 -+ (PoolSdk *)shareSDK;
28 -
29 -/**
30 - 初始化SDK
31 - */
32 -- (void)initSDK:(UIViewController *) control;
33 -
34 -
35 --(void)viewDidAppear;
36 -
37 -/**
38 - 登录SDK
39 - */
40 -- (void)loginSDK;
41 -
42 -/**
43 - 进行支付
44 - */
45 -- (void)payWithPaymentInfo:(PoolCreateOrderInfo *)payInfo;
46 -
47 -/**
48 - 用户中心
49 - */
50 -- (void)gotoUserCenter;
51 -
52 -/**
53 - report
54 - */
55 -- (void)reportSDK:(PoolReportInfo *)reportInfo;
56 -
57 -/**
58 - 注销
59 - */
60 -- (void)logoutSDK;
61 -
62 -/**
63 - 退出
64 - */
65 -- (void)exitSDK;
66 -
67 -
68 -
69 -/**
70 - 显示/隐藏浮标
71 - */
72 -//- (void)showFloatIcon:(BOOL)bFlag;
73 -
74 -
75 -/**
76 - // called in - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url
77 - */
78 -- (void)handleOpenurl:(NSURL *)url;
79 -
80 -- (NSUInteger) application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window;
81 -/**
82 - 应用 appid
83 - */
84 -
85 -/**
86 - 应用支持的方向 默认为 EDreamSDKOrientationLandscape
87 - */
88 -@property(nonatomic, assign)ESDKOrientation sdkOrientation;
89 -
90 -/**
91 - 浮标是否已经显示,默认为NO
92 - */
93 -@property(nonatomic, assign)BOOL bShowedFloat;
94 -
95 -
96 -/**
97 - serverId
98 - */
99 -@property(nonatomic, assign)int serverId;
100 -
101 -/**
102 - 获取gamechannelid
103 - */
104 --(NSString *) getGameChannelId;
105 -
106 -/**
107 - 获取Custom
108 - */
109 -- (NSString *) getCustomValue;
110 -
111 -/**
112 - 获取ChannelParameter1
113 - */
114 -- (NSString *) getChannelParameter1;
115 -
116 -/**
117 - 获取ChannelParameter2
118 - */
119 -- (NSString *) getChannelParameter2;
120 -
121 -
122 -@end
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 -
10 -#import <UIKit/UIKit.h>
11 -#import "PoolChecker.h"
12 -#import "Interface.h"
13 -#import "PoolReportInfo.h"
14 -#import "PoolLoginInfo.h"
15 -#import "PoolNotification.h"
16 -#import "PoolPayInfo.h"
17 -#import "UnionInterface.h"
18 -#import "PoolCreateOrderInfo.h"
19 -#import "PoolConfig.h"
20 -
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 -
10 -#import <Foundation/Foundation.h>
11 -@interface PoolUtils : NSObject
12 -
13 -+(NSString *)md5:(NSString *)str;
14 -+ (NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString;
15 -+(NSString *)createPayOrderUrl;
16 -//*充值回调地址
17 -+(NSString *)createPayUrl;
18 -@end
...\ No newline at end of file ...\ No newline at end of file
1 -//
2 -// UnionInterface.h
3 -// PoolSdk
4 -//
5 -// Created by winFan on 11/23/15.
6 -// Copyright (c) 2015 winFan. All rights reserved.
7 -//
8 -#import <Foundation/Foundation.h>
9 -#import <UIKit/UIKit.h>
10 -#import "PoolCreateOrderInfo.h"
11 -#import "PoolReportInfo.h"
12 -@protocol UnionInterface
13 -/**
14 - 初始化SDK
15 - */
16 -
17 -//[[PoolChecker getInstance] sendNotice:PoolSDKNotificationPay notiName:@"" statusCode:POOLSDK_NO_ERROR description:@"" extendData:order_id];
18 -
19 -- (void)SDKinit:(UIViewController *) control;
20 -
21 -/**
22 - 登录SDK
23 - */
24 -- (void)SDKloginSDK;
25 -
26 -/**
27 - 注销
28 - */
29 -- (void)SDKlogoutSDK;
30 -
31 -/**
32 - 退出
33 - */
34 -- (void)SDKexitSDK;
35 -
36 -/**
37 - 用户中心
38 - */
39 -- (void)SDKgotoUserCenter;
40 -
41 -- (void)viewDidAppear;
42 -
43 -/**
44 - 提交数据
45 - */
46 -- (void)SDKreport:(PoolReportInfo *) reportInfo;
47 -
48 -/**
49 - 进行支付
50 - */
51 -
52 -- (void)SDKpayWithPaymentInfo:(PoolCreateOrderInfo *)payInfo;
53 -- (void)receiveCreateOrder: (NSNotification *)notification;
54 -
55 -- (void)handleOpenurl:(NSURL *)url;
56 -- (NSUInteger) application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window;
57 -
58 -@end
...\ No newline at end of file ...\ No newline at end of file
No preview for this file type
No preview for this file type
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
1 -//
2 -// GetWifiMac.h
3 -// mangosanguo
4 -//
5 -// Created by 莫 on 12-9-28.
6 -// Copyright (c) 2012年 private. All rights reserved.
7 -//
8 -
9 -#import <UIKit/UIKit.h>
10 -
11 -@interface YouaiGetWifiMac : NSObject
12 -
13 -+ (NSString *)macaddress;
14 -@end
1 -//
2 -// YouaiLoginInfo.h
3 -// YouaiSDK
4 -//
5 -// Created by 莫 东荣 on 13-4-10.
6 -// Copyright (c) 2013年 莫 东荣. All rights reserved.
7 -//
8 -
9 -#import <Foundation/Foundation.h>
10 -
11 -@interface YouaiLoginInfo : NSObject //用户uid
12 -{
13 -//
14 -NSString *openId;
15 -//token
16 -NSString *token;
17 -//时间戳
18 -NSString *timestamp;
19 -
20 -}
21 -
22 -@property(retain,nonatomic) NSString *openId;
23 -@property(retain,nonatomic) NSString *token;
24 -@property(retain,nonatomic) NSString *timestamp;
25 -+ (YouaiLoginInfo *)getInstance;
26 -@end
...\ No newline at end of file ...\ No newline at end of file
1 -//
2 -// YouaiNotifications.h
3 -// YouaiSDK
4 -//
5 -// Created by 莫 东荣 on 13-4-10.
6 -// Copyright (c) 2013年 莫 东荣. All rights reserved.
7 -//
8 -
9 -#import <Foundation/Foundation.h>
10 -
11 -extern NSString * const youaiExitNotification; /**< 退出 */
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; /**< 出错 */
17 -
18 -
19 -@interface YouaiNotifications : NSObject
20 -
21 -@end
1 -//
2 -// YouaiSDKMgr.h
3 -// YouaiSDK
4 -//
5 -// Created by 莫 东荣 on 13-4-9.
6 -// Copyright (c) 2013年 莫 东荣. All rights reserved.
7 -//
8 -
9 -#import <UIKit/UIKit.h>
10 -#import "StoreKit/StoreKit.h"
11 -
12 -@interface YouaiSDKMgr : NSObject
13 -{
14 - NSString* appId_;
15 - NSString* appKey_;
16 -
17 - NSString* inviterCode_;
18 -// NSString* openId;
19 -// NSString* loginKey;
20 -
21 -}
22 -
23 -+ (YouaiSDKMgr *)getInstance;
24 -- (void)initSDK;
25 -- (void)initSDK:(NSString *)weixinId;
26 -
27 -- (void)openLogin:(NSString *)appId : (NSString *)appKey : (UIViewController *)controller;
28 -- (void)openLogin:(NSString *)appId : (NSString *)appKey : (UIViewController *)controller : (NSString *) inviterCode;
29 -- (void)openLogin:(NSString *)appId : (NSString *)appKey : (UIViewController *)controller : (NSString *) inviterCode : (NSString *)userName : (NSString *)passWord;
30 -- (void)setStyleName:(NSString*)styleName;
31 -- (void)openLogin:(NSString *)appId : (NSString *)appKey : (UIViewController *)controller : (NSString *)userName : (NSString *)passWord;
32 -
33 -- (void)openCenter: (UIViewController *)controller;
34 -- (void)openPay: (NSString *)serverId : (NSString *)nickName : (NSString *)callBack : (UIViewController *)controller;
35 -- (void)openPay: (NSString *)serverId : (NSString *)nickName : (NSNumber *)payAmount : (NSString *)callBack : (UIViewController *)controller;
36 -- (void)openShare: (UIViewController *)controller;
37 -- (void)log: (NSString*)log_key : (NSInteger)log_data: (NSString*)log_remark;
38 -
39 -- (void)checkAilpay: (NSURL *)url : (UIViewController *)controller;
40 -
41 -- (void)applePayCallBack:(NSString *)url :(SKPaymentTransaction *)transaction :(NSString *)resultStr;
42 -
43 -
44 -
45 -@end
No preview for this file type
This diff is collapsed. Click to expand it.