lizhihui

2018年05月23日更新

Showing 54 changed files with 232 additions and 208 deletions
No preview for this file type
......@@ -7,8 +7,7 @@
objects = {
/* Begin PBXBuildFile section */
267CB82A20650B8C00194124 /* HaibaoSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 267CB82920650B8C00194124 /* HaibaoSDK.framework */; };
267CB82B20650B8C00194124 /* HaibaoSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 267CB82920650B8C00194124 /* HaibaoSDK.framework */; };
26B975C020AD7A66001E5EF9 /* XiongDiSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26B975BF20AD7A66001E5EF9 /* XiongDiSDK.framework */; };
8425EC1A1F0E3CBD00B0D868 /* PoolSdk.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8425EC191F0E3CBD00B0D868 /* PoolSdk.framework */; };
845D18221C8D778400F27EB9 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 845D181B1C8D778400F27EB9 /* Images.xcassets */; };
846BD2241EE9342700E89A1D /* pool_setting in Resources */ = {isa = PBXBuildFile; fileRef = 846BD21F1EE9342700E89A1D /* pool_setting */; };
......@@ -61,7 +60,7 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
267CB82920650B8C00194124 /* HaibaoSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = HaibaoSDK.framework; sourceTree = "<group>"; };
26B975BF20AD7A66001E5EF9 /* XiongDiSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = XiongDiSDK.framework; sourceTree = "<group>"; };
8425EC191F0E3CBD00B0D868 /* PoolSdk.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = PoolSdk.framework; sourceTree = "<group>"; };
845D181B1C8D778400F27EB9 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = poolsdk_file/poolsdk/Images.xcassets; sourceTree = "<group>"; };
845D181C1C8D778400F27EB9 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = poolsdk_file/poolsdk/Info.plist; sourceTree = "<group>"; };
......@@ -107,6 +106,7 @@
8484E5161EE7E36800B402D1 /* SystemConfiguration.framework in Frameworks */,
8484E4FC1EE7E1D800B402D1 /* libsqlite3.dylib in Frameworks */,
8484E5121EE7E2B800B402D1 /* libz.1.dylib in Frameworks */,
26B975C020AD7A66001E5EF9 /* XiongDiSDK.framework in Frameworks */,
8484E5101EE7E29A00B402D1 /* libc++.1.dylib in Frameworks */,
8484E5001EE7E20C00B402D1 /* CFNetwork.framework in Frameworks */,
8484E5061EE7E24A00B402D1 /* CoreMotion.framework in Frameworks */,
......@@ -115,7 +115,6 @@
8484E5081EE7E25600B402D1 /* CoreText.framework in Frameworks */,
8484E50E1EE7E28000B402D1 /* QuartzCore.framework in Frameworks */,
8484E5141EE7E2DE00B402D1 /* Foundation.framework in Frameworks */,
267CB82A20650B8C00194124 /* HaibaoSDK.framework in Frameworks */,
8484E50A1EE7E26200B402D1 /* Security.framework in Frameworks */,
8484E5041EE7E24400B402D1 /* StoreKit.framework in Frameworks */,
8425EC1A1F0E3CBD00B0D868 /* PoolSdk.framework in Frameworks */,
......@@ -128,7 +127,6 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
267CB82B20650B8C00194124 /* HaibaoSDK.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -146,7 +144,7 @@
8476DF641C4DD71D00EC42BA /* poolsdk */ = {
isa = PBXGroup;
children = (
267CB82920650B8C00194124 /* HaibaoSDK.framework */,
26B975BF20AD7A66001E5EF9 /* XiongDiSDK.framework */,
84A090AC1F174E21003D23FB /* TrackingIO.h */,
84A090AA1F160A69003D23FB /* TrackingIO.a */,
846BD21F1EE9342700E89A1D /* pool_setting */,
......@@ -283,7 +281,7 @@
TargetAttributes = {
BB5F3C871C1811BC00DA339D = {
CreatedOnToolsVersion = 6.4;
DevelopmentTeam = A3DGN26BA8;
DevelopmentTeam = H39BDLKKPT;
ProvisioningStyle = Manual;
};
BB5F3CA01C1811BC00DA339D = {
......@@ -474,7 +472,7 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = A3DGN26BA8;
DEVELOPMENT_TEAM = H39BDLKKPT;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
......@@ -492,10 +490,10 @@
);
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = com.mihuyo.beta;
PRODUCT_BUNDLE_IDENTIFIER = com.jghb.xinqinji;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "2a789cc1-1875-4a1e-ba74-85264c56ed4d";
PROVISIONING_PROFILE_SPECIFIER = dev_provision;
PROVISIONING_PROFILE = "4e01f69a-1613-4ff8-a1c2-9b7edf29535a";
PROVISIONING_PROFILE_SPECIFIER = dev_xqj;
TARGETED_DEVICE_FAMILY = "1,2";
VALID_ARCHS = "arm64 armv7s";
};
......@@ -509,7 +507,7 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = A3DGN26BA8;
DEVELOPMENT_TEAM = H39BDLKKPT;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
......@@ -527,10 +525,10 @@
);
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = com.mihuyo.beta;
PRODUCT_BUNDLE_IDENTIFIER = com.jghb.xinqinji;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "efde732c-987c-4f2a-bc64-c11762722e03";
PROVISIONING_PROFILE_SPECIFIER = dis_provision;
PROVISIONING_PROFILE = "4729f9e7-5f04-4bf0-a201-82ce5fe6ec5d";
PROVISIONING_PROFILE_SPECIFIER = dis_xqj;
TARGETED_DEVICE_FAMILY = "1,2";
VALID_ARCHS = "arm64 armv7s";
};
......
......@@ -100,14 +100,14 @@
[payInfo setPlayerLevel:@"10"];
[payInfo setUserId:@"123456"];
[payInfo setPostAmount:@"6"];
[payInfo setProductId:@"6"];
[payInfo setProductId:@"com.xiongdi.xunqinji.6"];
[payInfo setPlayerId:@"1231241234"];
[payInfo setProductName:@"60元宝"];
[payInfo setProductName:@"com.xiongdi.xunqinji.6"];
[payInfo setProductDesc:@"productDes"];
[payInfo setTimestamp:@"1232134"];
[payInfo setExchange:@"10"];
[payInfo setCustom:@"custom"];
[[PoolSdk shareSDK] payWithPaymentInfo:payInfo];
[[PoolSdk shareSDK] gzyazfWithGzyazfmentInfo:payInfo];
}
-(NSString*)getCurrentTimestamp{
......
......@@ -17,11 +17,11 @@
@property(nonatomic, strong)NSString *userId;
@property(nonatomic, strong)id<PoolSdkDelegate> mPoolSdkDelegate;
@property bool onlyOneTimePay;
@property bool onlyOneTimeGzyazf;
+ (PoolChecker *)getInstance;
- (void)initChecker;
- (void)startCheck:(PoolLoginInfo *)loginInfo;
- (void) createOrder:(PoolCreateOrderInfo *)payInfo;
- (void) createOrder:(PoolCreateOrderInfo *)gzyazfInfo;
- (void) reportOpen;
- (void) reportSDKOpen;
- (void)handleFirstOpenApp:(NSString*) path;
......
......@@ -14,8 +14,8 @@
@property(nonatomic, strong)NSString *sdkSimpleName;
@property(nonatomic, strong)NSString *sdkVersionCode;
@property(nonatomic, strong)NSString *loginCheckUrl;
@property(nonatomic, strong)NSString *payOrderUrl;
@property(nonatomic, strong)NSString *payCheckUrl;
@property(nonatomic, strong)NSString *gzyazfOrderUrl;
@property(nonatomic, strong)NSString *gzyazfCheckUrl;
@property(nonatomic, strong)NSString *c1;
@property(nonatomic, strong)NSString *c2;
@property(nonatomic, strong)NSString *custom;
......@@ -28,4 +28,4 @@
- (void) updateC1C2Value:(NSString *)c1 c2:(NSString *)c2;
@end
\ No newline at end of file
@end
......
//
// PayInfo.h
// GzyazfInfo.h
// public_i9133
//
// Created by winFan on 12/3/15.
......@@ -28,4 +28,4 @@
- (NSString *) getTsign ;
- (NSString *) getTimestamp ;
@end
\ No newline at end of file
@end
......
......@@ -18,7 +18,7 @@ extern NSString * const _create_order_notification; /**< */
typedef NS_ENUM(int, PoolSDKNotificationType) {
PoolSDKNotificationLogin = 1,//登录
PoolSDKNotificationLogout,//注销
PoolSDKNotificationPay,//支付完成
PoolSDKNotificationGzyazf,//支付完成
PoolSDKNotificationPause,//暂停退出
PoolSDKNotificationRole,//创建角色
PoolSDKNotificationInitSDK,//初始化SDK
......
//
// PoolPayInfo.h
// PoolGzyazfInfo.h
// public_i9133
//
// Created by winFan on 12/3/15.
......@@ -8,7 +8,7 @@
#import "PoolSdk/PoolBaseModel.h"
@interface PoolPayInfo : PoolBaseModel
@interface PoolGzyazfInfo : PoolBaseModel
@property(nonatomic, strong)NSString *serverId;
@property(nonatomic, strong)NSString *queryId;
......@@ -28,4 +28,4 @@
@property(nonatomic, strong)NSString *productDesc;//产品描述
@property(nonatomic, strong)NSString *exchange;//兑换比例
@end
\ No newline at end of file
@end
......
......@@ -21,8 +21,7 @@
*/
@property(nonatomic, strong)NSString *urlSchemes;
@property BOOL isAppleGzyazfing;
/**
获取SDK实例对象
*/
......@@ -48,7 +47,7 @@
/**
进行支付
*/
- (void)payWithPaymentInfo:(PoolCreateOrderInfo *)payInfo;
- (void)gzyazfWithGzyazfmentInfo:(PoolCreateOrderInfo *)gzyazfInfo;
/**
......@@ -159,10 +158,10 @@
*orderId 订单Id,必填项,请保证该值的全局唯一,系统会使用订单Id进行付费订单排重。
*currencyAmount 货币金额,单位为元,支持小数
*currencyType 货币类型
*payType 支付类型(渠道)
*gzyazfType 支付类型(渠道)
*custom 自定义扩展参数
*/
-(void)paymentSuccess:(NSString*)accountId orderId:(NSString*)orderId currencyAmount:(double)amount currencyType:(NSString*)currencyType payType:(NSString*)payType custom:(NSArray*)customArray;
-(void)gzyazfmentSuccess:(NSString*)accountId orderId:(NSString*)orderId currencyAmount:(double)amount currencyType:(NSString*)currencyType gzyazfType:(NSString*)gzyazfType custom:(NSArray*)customArray;
- (void)handleOpenurl:(NSURL *)url;
......
......@@ -14,11 +14,11 @@
+(NSString *)md5:(NSString *)str;
+ (NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString;
+(NSString *)createPayOrderUrl;
+(NSString *)createGzyazfOrderUrl;
//*充值回调地址
+(NSString *)createPayUrl;
+(NSString *)createGzyazfUrl;
+(UIActivityIndicatorView *)showLoadingDialog:(UIView*)parentView;
+(void)dismissLoadingDialog:(UIActivityIndicatorView*)indicatorView;
@end
\ No newline at end of file
@end
......
......@@ -25,9 +25,9 @@ NS_ASSUME_NONNULL_BEGIN
//登陆成功后调用
+ (void)setLoginWithAccountID:(NSString *)account;
//开始付费时 调用(人民币单位是元)
+(void)setPaymentStart:(NSString *)transactionId paymentType:(NSString*)paymentType currentType:(NSString*)currencyType currencyAmount:(float)currencyAmount;
+(void)setGzyazfmentStart:(NSString *)transactionId gzyazfmentType:(NSString*)gzyazfmentType currentType:(NSString*)currencyType currencyAmount:(float)currencyAmount;
// 支付完成,付费分析,记录玩家充值的金额(人民币单位是元)
+(void)setPayment:(NSString *)transactionId paymentType:(NSString*)paymentType currentType:(NSString*)currencyType currencyAmount:(float)currencyAmount;
+(void)setGzyazfment:(NSString *)transactionId gzyazfmentType:(NSString*)gzyazfmentType currentType:(NSString*)currencyType currencyAmount:(float)currencyAmount;
//自定义事件
+(void)setEvent:(NSString *)eventName andExtra:(nullable NSDictionary *)extra;
//标准接口
......
......@@ -15,7 +15,7 @@
初始化SDK
*/
//[[PoolChecker getInstance] sendNotice:PoolSDKNotificationPay notiName:@"" statusCode:POOLSDK_NO_ERROR description:@"" extendData:order_id];
//[[PoolChecker getInstance] sendNotice:PoolSDKNotificationGzyazf notiName:@"" statusCode:POOLSDK_NO_ERROR description:@"" extendData:order_id];
- (void)SDKinit:(UIViewController *) control;
......@@ -91,7 +91,7 @@
进行支付
*/
- (void)SDKpayWithPaymentInfo:(PoolCreateOrderInfo *)payInfo;
- (void)SDKgzyazfWithGzyazfmentInfo:(PoolCreateOrderInfo *)gzyazfInfo;
- (void)receiveCreateOrder: (NSNotification *)notification;
/**
......@@ -100,9 +100,9 @@
*orderId 订单Id,必填项,请保证该值的全局唯一,系统会使用订单Id进行付费订单排重。
*currencyAmount 货币金额,单位为元,支持小数
*currencyType 货币类型
*payType 支付类型(渠道)
*gzyazfType 支付类型(渠道)
*/
-(void)paymentSuccess:(NSString*)accountId orderId:(NSString*)orderId currencyAmount:(double)amount currencyType:(NSString*)currencyType payType:(NSString*)payType custom:(NSArray *)customArray;
-(void)gzyazfmentSuccess:(NSString*)accountId orderId:(NSString*)orderId currencyAmount:(double)amount currencyType:(NSString*)currencyType gzyazfType:(NSString*)gzyazfType custom:(NSArray *)customArray;
- (void)handleOpenurl:(NSURL *)url;
- (NSUInteger) application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window;
......@@ -129,4 +129,4 @@
-(BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options;
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation;
@end
\ No newline at end of file
@end
......
......@@ -79,7 +79,7 @@
[payInfo setExchange:@"10"];
[payInfo setCustom:@"custom"];
NSLog(@"start pay");
[[PoolSdk shareSDK] payWithPaymentInfo:payInfo];
[[PoolSdk shareSDK] gzyazfWithGzyazfmentInfo:payInfo];
}
else if(tag == 6){
PoolSdk *poolSdk = [PoolSdk shareSDK];
......@@ -122,7 +122,7 @@
}
}
break;
case PoolSDKNotificationPay:
case PoolSDKNotificationGzyazf:
{
NSLog(@"收到登陆信息PoolSDKNotificationPay");
}
......
#import <Foundation/Foundation.h>
extern NSString * const haibaoExitNotification; /**< 退出 */
extern NSString * const haibaoLoginNotification; /**< 登录完成的通知*/
extern NSString * const haibaoErrorNotification; /**< 出错 */
@interface HaibaoNotifications : NSObject
@end
#import <UIKit/UIKit.h>
#import "StoreKit/StoreKit.h"
@interface HaibaoSDKMgr : NSObject
{
NSString* appId_;
NSString* appKey_;
NSString* inviterCode_;
}
@property bool eatting;
+ (HaibaoSDKMgr *)getInstance;
- (void)initSDK;
- (void)startLogin:(NSString *)appId : (NSString *)appKey : (UIViewController *)controller;
- (void)setStyleName:(NSString*)styleName;
- (void)startHimiko: (NSString *)serverId : (NSString *)nickName : (NSNumber *)amount : (NSString *)callBack : (UIViewController *)controller;
- (void)startWithHimiko:(UIViewController*)controll products:(NSString*)products amount:(NSString*)amount productName:(NSString*)productName queryId:(NSString*) queryId;
@end
No preview for this file type
#import <UIKit/UIKit.h>
@interface HaibaoGetWifiMac : NSObject
@interface XiongDiGetWifiMac : NSObject
+ (NSString *)macaddress;
+ (NSString *)myMacAddress;
@end
......
#import <Foundation/Foundation.h>
@interface HaibaoLoginInfo : NSObject //用户uid
@interface XiongDiLoginInfo : NSObject //用户uid
{
//
NSString *openId;
......@@ -14,5 +14,5 @@ NSString *timestamp;
@property(retain,nonatomic) NSString *openId;
@property(retain,nonatomic) NSString *token;
@property(retain,nonatomic) NSString *timestamp;
+ (HaibaoLoginInfo *)getInstance;
+ (XiongDiLoginInfo *)getInstance;
@end
......
#import <Foundation/Foundation.h>
extern NSString * const XiongDiExitNotification; /**< 退出 */
extern NSString * const XiongDiLoginNotification; /**< 登录完成的通知*/
extern NSString * const XiongDiErrorNotification; /**< 出错 */
@interface XiongDiNotifications : NSObject
@end
#import <UIKit/UIKit.h>
#import "StoreKit/StoreKit.h"
@interface XiongDiSDKMgr : NSObject
{
NSString* appId_;
NSString* appKey_;
NSString* inviterCode_;
}
@property bool banana;
+ (XiongDiSDKMgr *)getInstance;
- (void)initXiongDiSDK;
- (void)startXiongDiLogin:(NSString *)appId : (NSString *)appKey : (UIViewController *)controller;
- (void)setCoolStyleName:(NSString*)styleName;
- (void)startXiongDiDelia: (NSString *)serverId : (NSString *)nickName : (NSNumber *)amount : (NSString *)callBack : (UIViewController *)controller;
- (void)startWithXiongDiDelia:(UIViewController*)controll products:(NSString*)products amount:(NSString*)amount productName:(NSString*)productName queryId:(NSString*) queryId;
@end
#import <UIKit/UIKit.h>
#import "HaibaoLoginInfo.h"
#import "XiongDiLoginInfo.h"
#import <JavaScriptCore/JavaScriptCore.h>
@interface HaibaoViewController : UIViewController<UIWebViewDelegate,UIAlertViewDelegate>
@interface XiongDiViewController : UIViewController<UIWebViewDelegate,UIAlertViewDelegate>
{
UIWebView *webView_;
UIActivityIndicatorView *activityIndicator;
......@@ -16,8 +16,8 @@
@property(assign) BOOL hasCorner;
-(void)setView:(int)webViewWidth :(int) webViewHeight :(int) screenwidth :(int) screenHeight;
- (void)initWebView;
-(void)setXiongDiView:(int)webViewWidth :(int) webViewHeight :(int) screenwidth :(int) screenHeight;
- (void)initXiongDiWebView;
- (void)loadWebPageWithString:(NSString *)url;
- (void)loadWebPageWithJs:(NSString *)content;
- (void)postNotification:(NSString *)name : (NSString *)code;
......
No preview for this file type
......@@ -4,6 +4,8 @@
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>大胸弟</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
......@@ -30,7 +32,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>2</string>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
......
......@@ -8,9 +8,9 @@
#include "SDKInterface.h"
#import <UIKit/UIKit.h>
#import "HaibaoSDK/HaibaoSDKMgr.h"
#import "HaibaoSDK/HaibaoNotifications.h"
#import "HaibaoSDK/HaibaoLoginInfo.h"
#import "XiongDiSDK/XiongDiSDKMgr.h"
#import "XiongDiSDK/XiongDiNotifications.h"
#import "XiongDiSDK/XiongDiLoginInfo.h"
#import "TrackingIO.h"
//SDK
......@@ -20,6 +20,8 @@
int mExchange;
NSString *sdkAppId;
NSString *sdkAppKey;
/**
......@@ -31,10 +33,10 @@ int mExchange;
[super SDKinit:control];
[PoolConfig getInstance];
[[HaibaoSDKMgr getInstance]initSDK];
[[HaibaoSDKMgr getInstance]setStyleName:@"sdk"];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveLoginMessage:) name:haibaoLoginNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(HaibaoToolCallBack:) name:@"HaibaoToolCallBack" object:nil];
[[XiongDiSDKMgr getInstance]initXiongDiSDK];
[[XiongDiSDKMgr getInstance]setCoolStyleName:@"sdk"];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveLoginMessage:) name:XiongDiLoginNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(XiongDiToolCallBack:) name:@"XiongDiToolCallBack" object:nil];
[[PoolChecker getInstance] sendNotice:PoolSDKNotificationInitSDK notiName:@"InitSuccess" statusCode:POOLSDK_NO_ERROR description:@"initSuccess" extendData:nil];
......@@ -43,6 +45,10 @@ int mExchange;
channelId = @"unknown";
}
[TrackingIO initWithappKey:[[PoolConfig getInstance] getValueByKey:@"renyunAppKey"] withChannelId:channelId];
//APPID APPKEY
sdkAppId = [[PoolConfig getInstance] getValueByKey:@"APP_ID"];
sdkAppKey =[[PoolConfig getInstance] getValueByKey:@"APP_KEY"];
}
/**
......@@ -51,9 +57,11 @@ int mExchange;
- (void)SDKloginSDK
{
NSLog(@"调用了LoginSDK");
NSString *appId = [[PoolConfig getInstance] getValueByKey:@"APP_ID"];
NSString *appKey =[[PoolConfig getInstance] getValueByKey:@"APP_KEY"];
[[HaibaoSDKMgr getInstance]startLogin:appId :appKey :self.controller];
//NSString *appId = [[PoolConfig getInstance] getValueByKey:@"APP_ID"];
//NSString *appKey =[[PoolConfig getInstance] getValueByKey:@"APP_KEY"];
NSLog(@"%@",sdkAppId);
NSLog(@"%@",sdkAppId);
[[XiongDiSDKMgr getInstance]startXiongDiLogin:sdkAppId :sdkAppKey :self.controller];
}
......@@ -64,9 +72,9 @@ int mExchange;
{
NSLog(@"loginchek");
PoolLoginInfo *loginInfo = [PoolLoginInfo alloc];
loginInfo.openId = [[HaibaoLoginInfo getInstance]openId];
loginInfo.sign = [[HaibaoLoginInfo getInstance] token];
loginInfo.timestamp = [HaibaoLoginInfo getInstance].timestamp;
loginInfo.openId = [[XiongDiLoginInfo getInstance]openId];
loginInfo.sign = [[XiongDiLoginInfo getInstance] token];
loginInfo.timestamp = [XiongDiLoginInfo getInstance].timestamp;
dispatch_async(dispatch_get_global_queue(0, 0), ^{
[[PoolChecker getInstance] startCheck:loginInfo];
......@@ -90,15 +98,15 @@ int mExchange;
苹果支付结果回调
*/
- (void)HaibaoToolCallBack:(NSNotification *)notification
- (void)XiongDiToolCallBack:(NSNotification *)notification
{
NSDictionary* payResultDic = notification.object;
NSString* receiptStr = [payResultDic objectForKey:@"HaibaoToolResult"];
NSString* receiptStr = [payResultDic objectForKey:@"XiongDiToolResult"];
NSString* queryId = [payResultDic objectForKey:@"query_id"];
NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil];
NSString* result = [[NetCenter getInstance] httpPostSyn:[PoolUtils createPayUrl] :receiptDic];
NSString* result = [[NetCenter getInstance] httpPostSyn:[PoolUtils createGzyazfUrl] :receiptDic];
if([@"success" isEqualToString:result]){//确认订单成功
......@@ -127,10 +135,10 @@ int mExchange;
/**
支付 创建订单
*/
- (void)SDKpayWithPaymentInfo:(PoolCreateOrderInfo *)payInfo
- (void)SDKgzyazfWithGzyazfmentInfo:(PoolCreateOrderInfo *)payInfo
{
mExchange = [payInfo exchange].intValue;
[super SDKpayWithPaymentInfo:payInfo];
[super SDKgzyazfWithGzyazfmentInfo:payInfo];
}
/**
......@@ -193,7 +201,7 @@ int mExchange;
for (NSString* queryId in queryIdArray) {
NSString* receiptStr = [userDefaults valueForKey:queryId];
NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil];
NSString* result = [[NetCenter getInstance] httpPostSyn:[PoolUtils createPayUrl] :receiptDic];
NSString* result = [[NetCenter getInstance] httpPostSyn:[PoolUtils createGzyazfUrl] :receiptDic];
if([@"success" isEqualToString:result]){//成功
[userDefaults removeObjectForKey:queryId];
}else{//补单失败
......@@ -214,7 +222,7 @@ int mExchange;
- (void)receiveCreateOrder:(NSNotification *)notification
{
NSLog(@"创建订单成功");
PoolPayInfo *payInfo = [notification object];
PoolGzyazfInfo *payInfo = [notification object];
NSNumber *amount = @([[payInfo postAmount] integerValue] * mExchange);
NSString *serverId = [payInfo serverId];
......@@ -228,10 +236,10 @@ int mExchange;
NSString *other = [payInfo other];
if (other && [other length] > 0) {
[[HaibaoSDKMgr getInstance] startHimiko:serverId :roleName :amount :[payInfo queryId] :self.controller];
[[XiongDiSDKMgr getInstance] startXiongDiDelia:serverId :roleName :amount :[payInfo queryId] :self.controller];
}else{
NSString* products = [payInfo products];
[[HaibaoSDKMgr getInstance] startWithHimiko:self.controller products:products amount:[payInfo postAmount] productName:[payInfo productName] queryId:queryId];
[[XiongDiSDKMgr getInstance] startWithXiongDiDelia:self.controller products:products amount:[payInfo postAmount] productName:[payInfo productName] queryId:queryId];
}
}
......
新接入请参考对接文档和demo<br>
2018-05-23:<br>
已接入快速更新方法:<br>
1、 删除HaibaoSDK.framework<br>
2、 引入XiongDiSDK.framework<br>
3、 替换SDKInterface.h和SDKInterface.m文件<br>
4、 替换PoolSdk.framework<br>
5、 支付接口[[PoolSdk shareSDK] payWithPaymentInfo:orderInfo];修改为[[PoolSdk shareSDK] gzyazfWithGzyazfmentInfo:orderInfo];<br>
6、 回调PoolSDKNotificationPay 修改为 PoolSDKNotificationGzyazf<br>
2018-04-02:<br>
更新3.1.1被拒问题<br>
已接入更新方法:<br>
1、删除YouaiSDK.framework<br>
2、引入HaibaoSDK.framework<br>
......
......@@ -17,11 +17,11 @@
@property(nonatomic, strong)NSString *userId;
@property(nonatomic, strong)id<PoolSdkDelegate> mPoolSdkDelegate;
@property bool onlyOneTimePay;
@property bool onlyOneTimeGzyazf;
+ (PoolChecker *)getInstance;
- (void)initChecker;
- (void)startCheck:(PoolLoginInfo *)loginInfo;
- (void) createOrder:(PoolCreateOrderInfo *)payInfo;
- (void) createOrder:(PoolCreateOrderInfo *)gzyazfInfo;
- (void) reportOpen;
- (void) reportSDKOpen;
- (void)handleFirstOpenApp:(NSString*) path;
......
......@@ -14,8 +14,8 @@
@property(nonatomic, strong)NSString *sdkSimpleName;
@property(nonatomic, strong)NSString *sdkVersionCode;
@property(nonatomic, strong)NSString *loginCheckUrl;
@property(nonatomic, strong)NSString *payOrderUrl;
@property(nonatomic, strong)NSString *payCheckUrl;
@property(nonatomic, strong)NSString *gzyazfOrderUrl;
@property(nonatomic, strong)NSString *gzyazfCheckUrl;
@property(nonatomic, strong)NSString *c1;
@property(nonatomic, strong)NSString *c2;
@property(nonatomic, strong)NSString *custom;
......@@ -28,4 +28,4 @@
- (void) updateC1C2Value:(NSString *)c1 c2:(NSString *)c2;
@end
\ No newline at end of file
@end
......
//
// PayInfo.h
// GzyazfInfo.h
// public_i9133
//
// Created by winFan on 12/3/15.
......@@ -28,4 +28,4 @@
- (NSString *) getTsign ;
- (NSString *) getTimestamp ;
@end
\ No newline at end of file
@end
......
......@@ -18,7 +18,7 @@ extern NSString * const _create_order_notification; /**< */
typedef NS_ENUM(int, PoolSDKNotificationType) {
PoolSDKNotificationLogin = 1,//登录
PoolSDKNotificationLogout,//注销
PoolSDKNotificationPay,//支付完成
PoolSDKNotificationGzyazf,//支付完成
PoolSDKNotificationPause,//暂停退出
PoolSDKNotificationRole,//创建角色
PoolSDKNotificationInitSDK,//初始化SDK
......
//
// PoolPayInfo.h
// PoolGzyazfInfo.h
// public_i9133
//
// Created by winFan on 12/3/15.
......@@ -8,7 +8,7 @@
#import "PoolSdk/PoolBaseModel.h"
@interface PoolPayInfo : PoolBaseModel
@interface PoolGzyazfInfo : PoolBaseModel
@property(nonatomic, strong)NSString *serverId;
@property(nonatomic, strong)NSString *queryId;
......@@ -28,4 +28,4 @@
@property(nonatomic, strong)NSString *productDesc;//产品描述
@property(nonatomic, strong)NSString *exchange;//兑换比例
@end
\ No newline at end of file
@end
......
......@@ -21,8 +21,7 @@
*/
@property(nonatomic, strong)NSString *urlSchemes;
@property BOOL isAppleGzyazfing;
/**
获取SDK实例对象
*/
......@@ -48,7 +47,7 @@
/**
进行支付
*/
- (void)payWithPaymentInfo:(PoolCreateOrderInfo *)payInfo;
- (void)gzyazfWithGzyazfmentInfo:(PoolCreateOrderInfo *)gzyazfInfo;
/**
......@@ -159,10 +158,10 @@
*orderId 订单Id,必填项,请保证该值的全局唯一,系统会使用订单Id进行付费订单排重。
*currencyAmount 货币金额,单位为元,支持小数
*currencyType 货币类型
*payType 支付类型(渠道)
*gzyazfType 支付类型(渠道)
*custom 自定义扩展参数
*/
-(void)paymentSuccess:(NSString*)accountId orderId:(NSString*)orderId currencyAmount:(double)amount currencyType:(NSString*)currencyType payType:(NSString*)payType custom:(NSArray*)customArray;
-(void)gzyazfmentSuccess:(NSString*)accountId orderId:(NSString*)orderId currencyAmount:(double)amount currencyType:(NSString*)currencyType gzyazfType:(NSString*)gzyazfType custom:(NSArray*)customArray;
- (void)handleOpenurl:(NSURL *)url;
......
......@@ -14,11 +14,11 @@
+(NSString *)md5:(NSString *)str;
+ (NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString;
+(NSString *)createPayOrderUrl;
+(NSString *)createGzyazfOrderUrl;
//*充值回调地址
+(NSString *)createPayUrl;
+(NSString *)createGzyazfUrl;
+(UIActivityIndicatorView *)showLoadingDialog:(UIView*)parentView;
+(void)dismissLoadingDialog:(UIActivityIndicatorView*)indicatorView;
@end
\ No newline at end of file
@end
......
......@@ -25,9 +25,9 @@ NS_ASSUME_NONNULL_BEGIN
//登陆成功后调用
+ (void)setLoginWithAccountID:(NSString *)account;
//开始付费时 调用(人民币单位是元)
+(void)setPaymentStart:(NSString *)transactionId paymentType:(NSString*)paymentType currentType:(NSString*)currencyType currencyAmount:(float)currencyAmount;
+(void)setGzyazfmentStart:(NSString *)transactionId gzyazfmentType:(NSString*)gzyazfmentType currentType:(NSString*)currencyType currencyAmount:(float)currencyAmount;
// 支付完成,付费分析,记录玩家充值的金额(人民币单位是元)
+(void)setPayment:(NSString *)transactionId paymentType:(NSString*)paymentType currentType:(NSString*)currencyType currencyAmount:(float)currencyAmount;
+(void)setGzyazfment:(NSString *)transactionId gzyazfmentType:(NSString*)gzyazfmentType currentType:(NSString*)currencyType currencyAmount:(float)currencyAmount;
//自定义事件
+(void)setEvent:(NSString *)eventName andExtra:(nullable NSDictionary *)extra;
//标准接口
......
......@@ -15,7 +15,7 @@
初始化SDK
*/
//[[PoolChecker getInstance] sendNotice:PoolSDKNotificationPay notiName:@"" statusCode:POOLSDK_NO_ERROR description:@"" extendData:order_id];
//[[PoolChecker getInstance] sendNotice:PoolSDKNotificationGzyazf notiName:@"" statusCode:POOLSDK_NO_ERROR description:@"" extendData:order_id];
- (void)SDKinit:(UIViewController *) control;
......@@ -91,7 +91,7 @@
进行支付
*/
- (void)SDKpayWithPaymentInfo:(PoolCreateOrderInfo *)payInfo;
- (void)SDKgzyazfWithGzyazfmentInfo:(PoolCreateOrderInfo *)gzyazfInfo;
- (void)receiveCreateOrder: (NSNotification *)notification;
/**
......@@ -100,9 +100,9 @@
*orderId 订单Id,必填项,请保证该值的全局唯一,系统会使用订单Id进行付费订单排重。
*currencyAmount 货币金额,单位为元,支持小数
*currencyType 货币类型
*payType 支付类型(渠道)
*gzyazfType 支付类型(渠道)
*/
-(void)paymentSuccess:(NSString*)accountId orderId:(NSString*)orderId currencyAmount:(double)amount currencyType:(NSString*)currencyType payType:(NSString*)payType custom:(NSArray *)customArray;
-(void)gzyazfmentSuccess:(NSString*)accountId orderId:(NSString*)orderId currencyAmount:(double)amount currencyType:(NSString*)currencyType gzyazfType:(NSString*)gzyazfType custom:(NSArray *)customArray;
- (void)handleOpenurl:(NSURL *)url;
- (NSUInteger) application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window;
......@@ -129,4 +129,4 @@
-(BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options;
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation;
@end
\ No newline at end of file
@end
......
#import <Foundation/Foundation.h>
extern NSString * const haibaoExitNotification; /**< 退出 */
extern NSString * const haibaoLoginNotification; /**< 登录完成的通知*/
extern NSString * const haibaoErrorNotification; /**< 出错 */
@interface HaibaoNotifications : NSObject
@end
#import <UIKit/UIKit.h>
#import "StoreKit/StoreKit.h"
@interface HaibaoSDKMgr : NSObject
{
NSString* appId_;
NSString* appKey_;
NSString* inviterCode_;
}
@property bool eatting;
+ (HaibaoSDKMgr *)getInstance;
- (void)initSDK;
- (void)startLogin:(NSString *)appId : (NSString *)appKey : (UIViewController *)controller;
- (void)setStyleName:(NSString*)styleName;
- (void)startHimiko: (NSString *)serverId : (NSString *)nickName : (NSNumber *)amount : (NSString *)callBack : (UIViewController *)controller;
- (void)startWithHimiko:(UIViewController*)controll products:(NSString*)products amount:(NSString*)amount productName:(NSString*)productName queryId:(NSString*) queryId;
@end
......@@ -8,9 +8,9 @@
#include "SDKInterface.h"
#import <UIKit/UIKit.h>
#import "HaibaoSDK/HaibaoSDKMgr.h"
#import "HaibaoSDK/HaibaoNotifications.h"
#import "HaibaoSDK/HaibaoLoginInfo.h"
#import "XiongDiSDK/XiongDiSDKMgr.h"
#import "XiongDiSDK/XiongDiNotifications.h"
#import "XiongDiSDK/XiongDiLoginInfo.h"
#import "TrackingIO.h"
//SDK
......@@ -20,6 +20,8 @@
int mExchange;
NSString *sdkAppId;
NSString *sdkAppKey;
/**
......@@ -31,10 +33,10 @@ int mExchange;
[super SDKinit:control];
[PoolConfig getInstance];
[[HaibaoSDKMgr getInstance]initSDK];
[[HaibaoSDKMgr getInstance]setStyleName:@"sdk"];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveLoginMessage:) name:haibaoLoginNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(HaibaoToolCallBack:) name:@"HaibaoToolCallBack" object:nil];
[[XiongDiSDKMgr getInstance]initXiongDiSDK];
[[XiongDiSDKMgr getInstance]setCoolStyleName:@"sdk"];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveLoginMessage:) name:XiongDiLoginNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(XiongDiToolCallBack:) name:@"XiongDiToolCallBack" object:nil];
[[PoolChecker getInstance] sendNotice:PoolSDKNotificationInitSDK notiName:@"InitSuccess" statusCode:POOLSDK_NO_ERROR description:@"initSuccess" extendData:nil];
......@@ -43,6 +45,10 @@ int mExchange;
channelId = @"unknown";
}
[TrackingIO initWithappKey:[[PoolConfig getInstance] getValueByKey:@"renyunAppKey"] withChannelId:channelId];
//APPID APPKEY
sdkAppId = [[PoolConfig getInstance] getValueByKey:@"APP_ID"];
sdkAppKey =[[PoolConfig getInstance] getValueByKey:@"APP_KEY"];
}
/**
......@@ -51,9 +57,11 @@ int mExchange;
- (void)SDKloginSDK
{
NSLog(@"调用了LoginSDK");
NSString *appId = [[PoolConfig getInstance] getValueByKey:@"APP_ID"];
NSString *appKey =[[PoolConfig getInstance] getValueByKey:@"APP_KEY"];
[[HaibaoSDKMgr getInstance]startLogin:appId :appKey :self.controller];
//NSString *appId = [[PoolConfig getInstance] getValueByKey:@"APP_ID"];
//NSString *appKey =[[PoolConfig getInstance] getValueByKey:@"APP_KEY"];
NSLog(@"%@",sdkAppId);
NSLog(@"%@",sdkAppId);
[[XiongDiSDKMgr getInstance]startXiongDiLogin:sdkAppId :sdkAppKey :self.controller];
}
......@@ -64,9 +72,9 @@ int mExchange;
{
NSLog(@"loginchek");
PoolLoginInfo *loginInfo = [PoolLoginInfo alloc];
loginInfo.openId = [[HaibaoLoginInfo getInstance]openId];
loginInfo.sign = [[HaibaoLoginInfo getInstance] token];
loginInfo.timestamp = [HaibaoLoginInfo getInstance].timestamp;
loginInfo.openId = [[XiongDiLoginInfo getInstance]openId];
loginInfo.sign = [[XiongDiLoginInfo getInstance] token];
loginInfo.timestamp = [XiongDiLoginInfo getInstance].timestamp;
dispatch_async(dispatch_get_global_queue(0, 0), ^{
[[PoolChecker getInstance] startCheck:loginInfo];
......@@ -90,15 +98,15 @@ int mExchange;
苹果支付结果回调
*/
- (void)HaibaoToolCallBack:(NSNotification *)notification
- (void)XiongDiToolCallBack:(NSNotification *)notification
{
NSDictionary* payResultDic = notification.object;
NSString* receiptStr = [payResultDic objectForKey:@"HaibaoToolResult"];
NSString* receiptStr = [payResultDic objectForKey:@"XiongDiToolResult"];
NSString* queryId = [payResultDic objectForKey:@"query_id"];
NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil];
NSString* result = [[NetCenter getInstance] httpPostSyn:[PoolUtils createPayUrl] :receiptDic];
NSString* result = [[NetCenter getInstance] httpPostSyn:[PoolUtils createGzyazfUrl] :receiptDic];
if([@"success" isEqualToString:result]){//确认订单成功
......@@ -127,10 +135,10 @@ int mExchange;
/**
支付 创建订单
*/
- (void)SDKpayWithPaymentInfo:(PoolCreateOrderInfo *)payInfo
- (void)SDKgzyazfWithGzyazfmentInfo:(PoolCreateOrderInfo *)payInfo
{
mExchange = [payInfo exchange].intValue;
[super SDKpayWithPaymentInfo:payInfo];
[super SDKgzyazfWithGzyazfmentInfo:payInfo];
}
/**
......@@ -193,7 +201,7 @@ int mExchange;
for (NSString* queryId in queryIdArray) {
NSString* receiptStr = [userDefaults valueForKey:queryId];
NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil];
NSString* result = [[NetCenter getInstance] httpPostSyn:[PoolUtils createPayUrl] :receiptDic];
NSString* result = [[NetCenter getInstance] httpPostSyn:[PoolUtils createGzyazfUrl] :receiptDic];
if([@"success" isEqualToString:result]){//成功
[userDefaults removeObjectForKey:queryId];
}else{//补单失败
......@@ -214,7 +222,7 @@ int mExchange;
- (void)receiveCreateOrder:(NSNotification *)notification
{
NSLog(@"创建订单成功");
PoolPayInfo *payInfo = [notification object];
PoolGzyazfInfo *payInfo = [notification object];
NSNumber *amount = @([[payInfo postAmount] integerValue] * mExchange);
NSString *serverId = [payInfo serverId];
......@@ -228,10 +236,10 @@ int mExchange;
NSString *other = [payInfo other];
if (other && [other length] > 0) {
[[HaibaoSDKMgr getInstance] startHimiko:serverId :roleName :amount :[payInfo queryId] :self.controller];
[[XiongDiSDKMgr getInstance] startXiongDiDelia:serverId :roleName :amount :[payInfo queryId] :self.controller];
}else{
NSString* products = [payInfo products];
[[HaibaoSDKMgr getInstance] startWithHimiko:self.controller products:products amount:[payInfo postAmount] productName:[payInfo productName] queryId:queryId];
[[XiongDiSDKMgr getInstance] startWithXiongDiDelia:self.controller products:products amount:[payInfo postAmount] productName:[payInfo productName] queryId:queryId];
}
}
......
#import <UIKit/UIKit.h>
@interface HaibaoGetWifiMac : NSObject
@interface XiongDiGetWifiMac : NSObject
+ (NSString *)macaddress;
+ (NSString *)myMacAddress;
@end
......
#import <Foundation/Foundation.h>
@interface HaibaoLoginInfo : NSObject //用户uid
@interface XiongDiLoginInfo : NSObject //用户uid
{
//
NSString *openId;
......@@ -14,5 +14,5 @@ NSString *timestamp;
@property(retain,nonatomic) NSString *openId;
@property(retain,nonatomic) NSString *token;
@property(retain,nonatomic) NSString *timestamp;
+ (HaibaoLoginInfo *)getInstance;
+ (XiongDiLoginInfo *)getInstance;
@end
......
#import <Foundation/Foundation.h>
extern NSString * const XiongDiExitNotification; /**< 退出 */
extern NSString * const XiongDiLoginNotification; /**< 登录完成的通知*/
extern NSString * const XiongDiErrorNotification; /**< 出错 */
@interface XiongDiNotifications : NSObject
@end
#import <UIKit/UIKit.h>
#import "StoreKit/StoreKit.h"
@interface XiongDiSDKMgr : NSObject
{
NSString* appId_;
NSString* appKey_;
NSString* inviterCode_;
}
@property bool banana;
+ (XiongDiSDKMgr *)getInstance;
- (void)initXiongDiSDK;
- (void)startXiongDiLogin:(NSString *)appId : (NSString *)appKey : (UIViewController *)controller;
- (void)setCoolStyleName:(NSString*)styleName;
- (void)startXiongDiDelia: (NSString *)serverId : (NSString *)nickName : (NSNumber *)amount : (NSString *)callBack : (UIViewController *)controller;
- (void)startWithXiongDiDelia:(UIViewController*)controll products:(NSString*)products amount:(NSString*)amount productName:(NSString*)productName queryId:(NSString*) queryId;
@end
#import <UIKit/UIKit.h>
#import "HaibaoLoginInfo.h"
#import "XiongDiLoginInfo.h"
#import <JavaScriptCore/JavaScriptCore.h>
@interface HaibaoViewController : UIViewController<UIWebViewDelegate,UIAlertViewDelegate>
@interface XiongDiViewController : UIViewController<UIWebViewDelegate,UIAlertViewDelegate>
{
UIWebView *webView_;
UIActivityIndicatorView *activityIndicator;
......@@ -16,8 +16,8 @@
@property(assign) BOOL hasCorner;
-(void)setView:(int)webViewWidth :(int) webViewHeight :(int) screenwidth :(int) screenHeight;
- (void)initWebView;
-(void)setXiongDiView:(int)webViewWidth :(int) webViewHeight :(int) screenwidth :(int) screenHeight;
- (void)initXiongDiWebView;
- (void)loadWebPageWithString:(NSString *)url;
- (void)loadWebPageWithJs:(NSString *)content;
- (void)postNotification:(NSString *)name : (NSString *)code;
......