lizhihui

更新190524版本2

Showing 71 changed files with 258 additions and 258 deletions
No preview for this file type
......@@ -7,11 +7,11 @@
objects = {
/* Begin PBXBuildFile section */
269A4AF12297F0AD0012E39E /* Goddess.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 269A4AF02297F0AD0012E39E /* Goddess.framework */; };
269A4B2B2297F2AC0012E39E /* Dissipation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 269A4B2A2297F2AC0012E39E /* Dissipation.framework */; };
269A4B2D2297F2E80012E39E /* SDKInterface.m in Sources */ = {isa = PBXBuildFile; fileRef = 269A4B2C2297F2E70012E39E /* SDKInterface.m */; };
269F653821B6613F006AEC88 /* HaiBaoJuheSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 269F653721B6613F006AEC88 /* HaiBaoJuheSDK.framework */; };
845D18221C8D778400F27EB9 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 845D181B1C8D778400F27EB9 /* Images.xcassets */; };
846BD2241EE9342700E89A1D /* haibaoyouxi_config in Resources */ = {isa = PBXBuildFile; fileRef = 846BD21F1EE9342700E89A1D /* haibaoyouxi_config */; };
846BD2261EE9342700E89A1D /* SDKInterface.m in Sources */ = {isa = PBXBuildFile; fileRef = 846BD2231EE9342700E89A1D /* SDKInterface.m */; };
847EE5E21EE9007E003A4B7B /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 847EE5E11EE9007E003A4B7B /* MainViewController.m */; };
8484E4F51EE7E0DC00B402D1 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8484E4F21EE7E0DC00B402D1 /* AppDelegate.m */; };
8484E4F61EE7E0DC00B402D1 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8484E4F41EE7E0DC00B402D1 /* ViewController.m */; };
......@@ -59,13 +59,13 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
269A4AF02297F0AD0012E39E /* Goddess.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Goddess.framework; sourceTree = "<group>"; };
269A4B2A2297F2AC0012E39E /* Dissipation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Dissipation.framework; sourceTree = "<group>"; };
269A4B2C2297F2E70012E39E /* SDKInterface.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDKInterface.m; path = poolsdk_file/poolsdk/SDKInterface.m; sourceTree = "<group>"; };
269F653721B6613F006AEC88 /* HaiBaoJuheSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = HaiBaoJuheSDK.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>"; };
846BD21F1EE9342700E89A1D /* haibaoyouxi_config */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = haibaoyouxi_config; path = poolsdk_file/poolsdk/haibaoyouxi_config; sourceTree = "<group>"; };
846BD2221EE9342700E89A1D /* SDKInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDKInterface.h; path = poolsdk_file/poolsdk/SDKInterface.h; sourceTree = "<group>"; };
846BD2231EE9342700E89A1D /* SDKInterface.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDKInterface.m; path = poolsdk_file/poolsdk/SDKInterface.m; sourceTree = "<group>"; };
847EE5E01EE9007E003A4B7B /* MainViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainViewController.h; sourceTree = "<group>"; };
847EE5E11EE9007E003A4B7B /* MainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainViewController.m; sourceTree = "<group>"; };
8484E4F11EE7E0DC00B402D1 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
......@@ -102,7 +102,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
269A4AF12297F0AD0012E39E /* Goddess.framework in Frameworks */,
269A4B2B2297F2AC0012E39E /* Dissipation.framework in Frameworks */,
8484E5161EE7E36800B402D1 /* SystemConfiguration.framework in Frameworks */,
269F653821B6613F006AEC88 /* HaiBaoJuheSDK.framework in Frameworks */,
8484E4FC1EE7E1D800B402D1 /* libsqlite3.dylib in Frameworks */,
......@@ -143,12 +143,12 @@
8476DF641C4DD71D00EC42BA /* poolsdk */ = {
isa = PBXGroup;
children = (
269A4AF02297F0AD0012E39E /* Goddess.framework */,
269A4B2A2297F2AC0012E39E /* Dissipation.framework */,
84A090AC1F174E21003D23FB /* TrackingIO.h */,
84A090AA1F160A69003D23FB /* TrackingIO.a */,
846BD21F1EE9342700E89A1D /* haibaoyouxi_config */,
846BD2221EE9342700E89A1D /* SDKInterface.h */,
846BD2231EE9342700E89A1D /* SDKInterface.m */,
269A4B2C2297F2E70012E39E /* SDKInterface.m */,
845D181B1C8D778400F27EB9 /* Images.xcassets */,
845D181C1C8D778400F27EB9 /* Info.plist */,
);
......@@ -333,7 +333,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
846BD2261EE9342700E89A1D /* SDKInterface.m in Sources */,
269A4B2D2297F2E80012E39E /* SDKInterface.m in Sources */,
8484E4F51EE7E0DC00B402D1 /* AppDelegate.m in Sources */,
847EE5E21EE9007E003A4B7B /* MainViewController.m in Sources */,
BB5F3C8E1C1811BC00DA339D /* main.m in Sources */,
......
#import <Foundation/Foundation.h>
@interface GoddessControl : NSObject
@interface DissipationControl : NSObject
- (void)initGoddessInstance;
- (void)initDissipationInstance;
- (void)GoddessStartGo;
- (void)DissipationStartGo;
@property(strong) NSMutableArray* myarray;
......
#import <Foundation/Foundation.h>
@interface GoddessControl1 : NSObject
@interface DissipationControl1 : NSObject
- (void)initGoddessInstance;
- (void)initDissipationInstance;
- (void)GoddessStartGo;
- (void)DissipationStartGo;
@property(strong) NSMutableArray* myarray;
......
#import <Foundation/Foundation.h>
@interface GoddessControl2 : NSObject
@interface DissipationControl2 : NSObject
- (void)initGoddessInstance;
- (void)initDissipationInstance;
- (void)GoddessStartGo;
- (void)DissipationStartGo;
@property(strong) NSMutableArray* myarray;
......
#import <Foundation/Foundation.h>
@interface GoddessControl3 : NSObject
@interface DissipationControl3 : NSObject
- (void)initGoddessInstance;
- (void)initDissipationInstance;
- (void)GoddessStartGo;
- (void)DissipationStartGo;
@property(strong) NSMutableArray* myarray;
......
#import <Foundation/Foundation.h>
@interface GoddessControl4 : NSObject
@interface DissipationControl4 : NSObject
- (void)initGoddessInstance;
- (void)initDissipationInstance;
- (void)GoddessStartGo;
- (void)DissipationStartGo;
@property(strong) NSMutableArray* myarray;
......
#import <Foundation/Foundation.h>
#import "OtherSetting.h"
@interface GoddessHaiBaoJuheBaseModel : NSObject
@interface DissipationHaiBaoJuheBaseModel : NSObject
- (NSString *)GoddessHaiBaoJuheObjectToJsonString;
- (NSString *)DissipationHaiBaoJuheObjectToJsonString;
- (NSMutableString *)paramAddToString;
- (id)initWithDiction:(NSDictionary *)diction;
......
......@@ -11,7 +11,7 @@ typedef NS_ENUM(NSInteger, DGLoggerLevel)
ELogError
};
@interface GoddessHaiBaoJuheDGLogger : NSObject
@interface DissipationHaiBaoJuheDGLogger : NSObject
+ (void)showLog:(NSString *)fmt,...;
......
......@@ -15,11 +15,11 @@
- (void)initChecker;
- (void)startCheck:(HaiBaoJuheLoginInfo *)loginInfo;
- (void) createOrder:(HaiBaoJuheCreateOrderInfo *)gzyazfInfo;
- (void) GoddessHaiBaoJuhereportOpen;
- (void) GoddessHaiBaoJuhereportSDKOpen;
- (void)GoddessHaiBaoJuhehandleFirstOpenApp:(NSString*) path;
- (void) DissipationHaiBaoJuhereportOpen;
- (void) DissipationHaiBaoJuhereportSDKOpen;
- (void)DissipationHaiBaoJuhehandleFirstOpenApp:(NSString*) path;
- (void) reportEnter:(HaiBaoJuheReportInfo *)reInfo;
- (void) GoddessHaiBaoJuheReport:(NSString *)_action :(HaiBaoJuheReportInfo *)reInfo;
- (void) DissipationHaiBaoJuheReport:(NSString *)_action :(HaiBaoJuheReportInfo *)reInfo;
- (void)sendNotice:(HaiBaoJuheSDKNotificationType)notiType
notiName:(NSString *)notiName
statusCode:(int)nCode
......@@ -28,7 +28,7 @@
- (void)startCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo;
- (void)GoddessHaiBaoJuheStartCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo type:(int)type;
- (void)DissipationHaiBaoJuheStartCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo type:(int)type;
/*
*初始化时调用
......
#import "HaiBaoJuheSDK/GoddessHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheCreateOrderInfo : GoddessHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/DissipationHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheCreateOrderInfo : DissipationHaiBaoJuheBaseModel
@property(nonatomic,strong)NSString *serverId;//服务器ID
@property(nonatomic, strong)NSString *serverName;//服务器名称
......@@ -16,7 +16,7 @@
@property(nonatomic, strong)NSString *userId;//用户ID
@property(nonatomic, strong)NSString *timestamp;//时间戳
- (NSString *) GoddessHaiBaoJuheGetTsign ;
- (NSString *) GoddessHaiBaoJuheGetTimestamp ;
- (NSString *) DissipationHaiBaoJuheGetTsign ;
- (NSString *) DissipationHaiBaoJuheGetTimestamp ;
@end
......
#import "HaiBaoJuheSDK/GoddessHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheGzyazfInfo : GoddessHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/DissipationHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheGzyazfInfo : DissipationHaiBaoJuheBaseModel
@property(nonatomic, strong)NSString *serverId;
@property(nonatomic, strong)NSString *queryId;
......
#import "HaiBaoJuheSDK/GoddessHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheLoginInfo : GoddessHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/DissipationHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheLoginInfo : DissipationHaiBaoJuheBaseModel
@property(nonatomic,strong)NSString *timestamp;
@property(nonatomic, strong)NSString *sign;
......
//
// GoddessHaiBaoJuheReportInfo.h
// DissipationHaiBaoJuheReportInfo.h
// HaiBaoJuheSDK
//
// Created by winFan on 12/21/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import "HaiBaoJuheSDK/GoddessHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheReportInfo : GoddessHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/DissipationHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheReportInfo : DissipationHaiBaoJuheBaseModel
@property(nonatomic, strong)NSString *reportType;//类型
@property(nonatomic, strong)NSString *playerId;//玩家ID
......
......@@ -10,7 +10,7 @@
@property(nonatomic, strong)NSString *urlSchemes;
@property(strong) NSMutableArray* GoddessList;
@property(strong) NSMutableArray* DissipationList;
@property BOOL isAppleGzyazfing;
......
......@@ -4,7 +4,7 @@
@interface HaiBaoJuheUtils : NSObject
+(NSString *)md5:(NSString *)str;
+ (NSDictionary *)GoddessHaiBaoJuheDictionaryWithJsonString:(NSString *)jsonString;
+ (NSDictionary *)DissipationHaiBaoJuheDictionaryWithJsonString:(NSString *)jsonString;
+(NSString *)createGzyazfOrderUrl;
//*充值回调地址
+(NSString *)createGzyazfUrl;
......
#import <UIKit/UIKit.h>
#import "StoreKit/StoreKit.h"
@interface DissipationAllManager : NSObject
{
NSString* DissipationAPPID_;
NSString* DissipationAPPKEY_;
NSString* DissipationInviterCode_;
}
@property bool DissipationGeiWoHuaQianBa;
+ (DissipationAllManager *)DissipationInstance;
- (void)DissipationChuShiHua;
- (void)DissipationDengLu:(NSString *)DissipationAPPID : (NSString *)DissipationAPPKEY : (UIViewController *)controller;
- (void)DissipationYangShi:(NSString*)DissipationLeiXing;
- (void)DissipationQuery: (NSString *)DissipationFuWuQiID : (NSString *)DissipationNickName : (NSNumber *)DissipationAmount : (NSString *)DissipationCallBack : (UIViewController *)controller : (NSString *)DissipationServerName;
- (void)DissipationQueryOperation:(UIViewController*)controll DissipationHuoWuID:(NSString*)products DissipationJiaGe:(NSString*)amount DissipationHuoWuMing:(NSString*)productName DissipationDingDanHao:(NSString*) DingDanHao;
@end
#import <Foundation/Foundation.h>
extern NSString * const DissipationExitNotification;
extern NSString * const DissipationLoginNotification;
extern NSString * const DissipationErrorNotification;
@interface DissipationHuiTiaoNotification : NSObject
@end
#import <UIKit/UIKit.h>
@interface DissipationIAPHelperControl : NSObject<UITableViewDelegate, UITableViewDataSource>
@property(nonatomic,strong) NSString* DissipationDingDanHao;
@property(nonatomic,strong) NSDictionary* DissipationHuoWuLieBiao;
@property(nonatomic,strong) NSMutableArray* DissipationHuoWuIDLieBiao;
@property(nonatomic, strong) UITableView *DissipationHuoWuLieBiaoView;
- (void)DissipationHuaQianView:(UIViewController*)controller DissipationHuoWuD:(NSString*)products DissipationQian:(NSString*)amount DissipationHuoWuMing:(NSString*)productName DissipationDingDanHao:(NSString*)DingDanHao;
@end
#import <Foundation/Foundation.h>
@interface GoddessInformation : NSObject
@interface DissipationInformation : NSObject
{
//
NSString *openId;
......@@ -12,5 +12,5 @@ NSString *timestamp;
@property(retain,nonatomic) NSString *openId;
@property(retain,nonatomic) NSString *token;
@property(retain,nonatomic) NSString *timestamp;
+ (GoddessInformation *)getInstance;
+ (DissipationInformation *)getInstance;
@end
......
#import <Foundation/Foundation.h>
@interface GoddessInformationJM : NSObject
@interface DissipationInformationJM : NSObject
+(NSString *)GoddessJM:(NSString *)jm;
+(NSString *)DissipationJM:(NSString *)jm;
@end
......
#import <UIKit/UIKit.h>
@interface GoddessLocation : NSObject
@interface DissipationLocation : NSObject
+ (NSString *)GoddessSKCloudServiceSetupOptionsKey;
+ (NSString *)DissipationSKCloudServiceSetupOptionsKey;
@end
......
#import <UIKit/UIKit.h>
#import "GoddessInformation.h"
#import "DissipationInformation.h"
#import <JavaScriptCore/JavaScriptCore.h>
@interface GoddessMain : UIViewController<UIWebViewDelegate,UIAlertViewDelegate>
@interface DissipationMain : UIViewController<UIWebViewDelegate,UIAlertViewDelegate>
{
UIWebView *webGoddessView_;
UIWebView *webDissipationView_;
UIActivityIndicatorView *activityIndicator;
}
@property(assign) BOOL GoddessYouYuanJiao;
@property(assign) BOOL DissipationYouYuanJiao;
- (void)GoddessSettingGoddessView:(int)webViewWidth :(int) webViewHeight :(int) screenwidth :(int) screenHeight;
- (void)GoddessInitWebView;
- (void)DissipationSettingDissipationView:(int)webViewWidth :(int) webViewHeight :(int) screenwidth :(int) screenHeight;
- (void)DissipationInitWebView;
- (void)loadWebPageWithString:(NSString *)url;
- (void)loadWebPageWithJs:(NSString *)content;
- (void)postNotification:(NSString *)name : (NSString *)code;
......
#import <UIKit/UIKit.h>
#import "StoreKit/StoreKit.h"
@interface GoddessAllManager : NSObject
{
NSString* GoddessAPPID_;
NSString* GoddessAPPKEY_;
NSString* GoddessInviterCode_;
}
@property bool GoddessGeiWoHuaQianBa;
+ (GoddessAllManager *)GoddessInstance;
- (void)GoddessChuShiHua;
- (void)GoddessDengLu:(NSString *)GoddessAPPID : (NSString *)GoddessAPPKEY : (UIViewController *)controller;
- (void)GoddessYangShi:(NSString*)GoddessLeiXing;
- (void)GoddessQuery: (NSString *)GoddessFuWuQiID : (NSString *)GoddessNickName : (NSNumber *)GoddessAmount : (NSString *)GoddessCallBack : (UIViewController *)controller : (NSString *)GoddessServerName;
- (void)GoddessQueryOperation:(UIViewController*)controll GoddessHuoWuID:(NSString*)products GoddessJiaGe:(NSString*)amount GoddessHuoWuMing:(NSString*)productName GoddessDingDanHao:(NSString*) DingDanHao;
@end
#import <Foundation/Foundation.h>
extern NSString * const GoddessExitNotification;
extern NSString * const GoddessLoginNotification;
extern NSString * const GoddessErrorNotification;
@interface GoddessHuiTiaoNotification : NSObject
@end
#import <UIKit/UIKit.h>
@interface GoddessIAPHelperControl : NSObject<UITableViewDelegate, UITableViewDataSource>
@property(nonatomic,strong) NSString* GoddessDingDanHao;
@property(nonatomic,strong) NSDictionary* GoddessHuoWuLieBiao;
@property(nonatomic,strong) NSMutableArray* GoddessHuoWuIDLieBiao;
@property(nonatomic, strong) UITableView *GoddessHuoWuLieBiaoView;
- (void)GoddessHuaQianView:(UIViewController*)controller GoddessHuoWuD:(NSString*)products GoddessQian:(NSString*)amount GoddessHuoWuMing:(NSString*)productName GoddessDingDanHao:(NSString*)DingDanHao;
@end
#include "SDKInterface.h"
#import <UIKit/UIKit.h>
#import "Goddess/GoddessAllManager.h"
#import "Goddess/GoddessHuiTiaoNotification.h"
#import "Goddess/GoddessInformation.h"
#import "Dissipation/DissipationAllManager.h"
#import "Dissipation/DissipationHuiTiaoNotification.h"
#import "Dissipation/DissipationInformation.h"
#import "TrackingIO.h"
@implementation SDKInterface : Interface
int mExchange;
NSString *GoddessAppId;
NSString *GoddessAppKey;
NSString *GoddessLeakOrderUrl;
NSString *DissipationAppId;
NSString *DissipationAppKey;
NSString *DissipationLeakOrderUrl;
- (void)SDKinit:(UIViewController *) control
{
......@@ -20,10 +20,10 @@ NSString *GoddessLeakOrderUrl;
[super SDKinit:control];
[HaiBaoJuheConfig getInstance];
[[GoddessAllManager GoddessInstance]GoddessChuShiHua];
[[GoddessAllManager GoddessInstance]GoddessYangShi:@"sdk4"];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveLoginMessage:) name:GoddessLoginNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(HCKAssetsToolCallBack:) name:@"GoddessToolCallBack" object:nil];
[[DissipationAllManager DissipationInstance]DissipationChuShiHua];
[[DissipationAllManager DissipationInstance]DissipationYangShi:@"sdk4"];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveLoginMessage:) name:DissipationLoginNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(HCKAssetsToolCallBack:) name:@"DissipationToolCallBack" object:nil];
[[HaiBaoJuheChecker getInstance] sendNotice:HaiBaoJuheSDKNotificationInitSDK notiName:@"InitSuccess" statusCode:HaiBaoJuheSDK_NO_ERROR description:@"initSuccess" extendData:nil];
......@@ -40,9 +40,9 @@ NSString *GoddessLeakOrderUrl;
- (void)SDKloginSDK
{
//APPID APPKEY
GoddessAppId = [[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_ID"];
GoddessAppKey =[[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_KEY"];
[[GoddessAllManager GoddessInstance]GoddessDengLu:GoddessAppId :GoddessAppKey :self.controller];
DissipationAppId = [[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_ID"];
DissipationAppKey =[[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_KEY"];
[[DissipationAllManager DissipationInstance]DissipationDengLu:DissipationAppId :DissipationAppKey :self.controller];
}
......@@ -53,9 +53,9 @@ NSString *GoddessLeakOrderUrl;
{
NSLog(@"loginchek");
HaiBaoJuheLoginInfo *loginInfo = [HaiBaoJuheLoginInfo alloc];
loginInfo.openId = [[GoddessInformation getInstance]openId];
loginInfo.sign = [[GoddessInformation getInstance] token];
loginInfo.timestamp = [[GoddessInformation getInstance] timestamp];
loginInfo.openId = [[DissipationInformation getInstance]openId];
loginInfo.sign = [[DissipationInformation getInstance] token];
loginInfo.timestamp = [[DissipationInformation getInstance] timestamp];
dispatch_async(dispatch_get_global_queue(0, 0), ^{
[[HaiBaoJuheChecker getInstance] startCheck:loginInfo];
......@@ -82,7 +82,7 @@ NSString *GoddessLeakOrderUrl;
- (void)HCKAssetsToolCallBack:(NSNotification *)notification
{
NSDictionary* payResultDic = notification.object;
NSString* receiptStr = [payResultDic objectForKey:@"GoddessToolResult"];
NSString* receiptStr = [payResultDic objectForKey:@"DissipationToolResult"];
NSString* queryId = [payResultDic objectForKey:@"query_id"];
//收到回调,保存queryid和data
......@@ -101,7 +101,7 @@ NSString *GoddessLeakOrderUrl;
[userDefaults setObject:receiptStr forKey:queryId];
NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil];
NSString* result = [[NetCenter getInstance] httpPostSyn:GoddessLeakOrderUrl :receiptDic];
NSString* result = [[NetCenter getInstance] httpPostSyn:DissipationLeakOrderUrl :receiptDic];
if([@"success" isEqualToString:result]){//确认订单成功
//删除已保存的
......@@ -121,11 +121,11 @@ NSString *GoddessLeakOrderUrl;
NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
NSString* lastqueryid = [userDefaults objectForKey:@"lastqueryid"];
GoddessLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
DissipationLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
[HaiBaoJuheUtils createGzyazfUrl],
[payInfo userId],
[payInfo playerId]];
[userDefaults setObject:GoddessLeakOrderUrl forKey:@"lastGoddessLeakOrderUrl"];
[userDefaults setObject:DissipationLeakOrderUrl forKey:@"lastDissipationLeakOrderUrl"];
if (lastqueryid!=nil) {
//创建订单前进行补单
......@@ -135,7 +135,7 @@ NSString *GoddessLeakOrderUrl;
receiptStr = [receiptStr stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
//如果不为空,进行最后一次补单
NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",lastqueryid,@"query_id", nil];
NSString* result = [[NetCenter getInstance] httpPostSyn:GoddessLeakOrderUrl :receiptDic];
NSString* result = [[NetCenter getInstance] httpPostSyn:DissipationLeakOrderUrl :receiptDic];
if([@"success" isEqualToString:result]){//确认订单成功
//删除已保存的
[userDefaults removeObjectForKey:@"lastqueryid"];
......@@ -145,7 +145,7 @@ NSString *GoddessLeakOrderUrl;
mExchange = [payInfo exchange].intValue;
[super SDKgzyazfWithGzyazfmentInfo:payInfo];
GoddessLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
DissipationLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
[HaiBaoJuheUtils createGzyazfUrl],
[payInfo userId],
[payInfo playerId]];
......@@ -212,10 +212,10 @@ NSString *GoddessLeakOrderUrl;
for (NSString* queryId in queryIdArray) {
NSString* receiptStr = [userDefaults valueForKey:queryId];
NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil];
NSString* lastGoddessLeakOrderUrl = [userDefaults objectForKey:@"lastGoddessLeakOrderUrl"];
NSString* lastDissipationLeakOrderUrl = [userDefaults objectForKey:@"lastDissipationLeakOrderUrl"];
NSString* result;
if (lastGoddessLeakOrderUrl!=nil) {
result = [[NetCenter getInstance] httpPostSyn:lastGoddessLeakOrderUrl :receiptDic];
if (lastDissipationLeakOrderUrl!=nil) {
result = [[NetCenter getInstance] httpPostSyn:lastDissipationLeakOrderUrl :receiptDic];
}else{
result = [[NetCenter getInstance] httpPostSyn:[HaiBaoJuheUtils createGzyazfUrl] :receiptDic];
}
......@@ -253,14 +253,14 @@ NSString *GoddessLeakOrderUrl;
NSString *other = [payInfo other];
if (other && [other length] > 0) {
[[GoddessAllManager GoddessInstance] GoddessQuery:serverId :roleName :amount :[payInfo queryId] :self.controller :[payInfo serverName]];
[[DissipationAllManager DissipationInstance] DissipationQuery:serverId :roleName :amount :[payInfo queryId] :self.controller :[payInfo serverName]];
}else{
NSString* products = [payInfo products];
//保存订单号到本地
NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
[userDefaults setObject:queryId forKey:@"lastqueryid"];
[userDefaults synchronize];
[[GoddessAllManager GoddessInstance] GoddessQueryOperation:self.controller GoddessHuoWuID:products GoddessJiaGe:[payInfo postAmount] GoddessHuoWuMing:[payInfo productName] GoddessDingDanHao:queryId];
[[DissipationAllManager DissipationInstance] DissipationQueryOperation:self.controller DissipationHuoWuID:products DissipationJiaGe:[payInfo postAmount] DissipationHuoWuMing:[payInfo productName] DissipationDingDanHao:queryId];
}
}
......
#import <Foundation/Foundation.h>
@interface GoddessControl : NSObject
@interface DissipationControl : NSObject
- (void)initGoddessInstance;
- (void)initDissipationInstance;
- (void)GoddessStartGo;
- (void)DissipationStartGo;
@property(strong) NSMutableArray* myarray;
......
#import <Foundation/Foundation.h>
@interface GoddessControl1 : NSObject
@interface DissipationControl1 : NSObject
- (void)initGoddessInstance;
- (void)initDissipationInstance;
- (void)GoddessStartGo;
- (void)DissipationStartGo;
@property(strong) NSMutableArray* myarray;
......
#import <Foundation/Foundation.h>
@interface GoddessControl2 : NSObject
@interface DissipationControl2 : NSObject
- (void)initGoddessInstance;
- (void)initDissipationInstance;
- (void)GoddessStartGo;
- (void)DissipationStartGo;
@property(strong) NSMutableArray* myarray;
......
#import <Foundation/Foundation.h>
@interface GoddessControl3 : NSObject
@interface DissipationControl3 : NSObject
- (void)initGoddessInstance;
- (void)initDissipationInstance;
- (void)GoddessStartGo;
- (void)DissipationStartGo;
@property(strong) NSMutableArray* myarray;
......
#import <Foundation/Foundation.h>
@interface GoddessControl4 : NSObject
@interface DissipationControl4 : NSObject
- (void)initGoddessInstance;
- (void)initDissipationInstance;
- (void)GoddessStartGo;
- (void)DissipationStartGo;
@property(strong) NSMutableArray* myarray;
......
#import <Foundation/Foundation.h>
#import "OtherSetting.h"
@interface GoddessHaiBaoJuheBaseModel : NSObject
@interface DissipationHaiBaoJuheBaseModel : NSObject
- (NSString *)GoddessHaiBaoJuheObjectToJsonString;
- (NSString *)DissipationHaiBaoJuheObjectToJsonString;
- (NSMutableString *)paramAddToString;
- (id)initWithDiction:(NSDictionary *)diction;
......
......@@ -11,7 +11,7 @@ typedef NS_ENUM(NSInteger, DGLoggerLevel)
ELogError
};
@interface GoddessHaiBaoJuheDGLogger : NSObject
@interface DissipationHaiBaoJuheDGLogger : NSObject
+ (void)showLog:(NSString *)fmt,...;
......
......@@ -15,11 +15,11 @@
- (void)initChecker;
- (void)startCheck:(HaiBaoJuheLoginInfo *)loginInfo;
- (void) createOrder:(HaiBaoJuheCreateOrderInfo *)gzyazfInfo;
- (void) GoddessHaiBaoJuhereportOpen;
- (void) GoddessHaiBaoJuhereportSDKOpen;
- (void)GoddessHaiBaoJuhehandleFirstOpenApp:(NSString*) path;
- (void) DissipationHaiBaoJuhereportOpen;
- (void) DissipationHaiBaoJuhereportSDKOpen;
- (void)DissipationHaiBaoJuhehandleFirstOpenApp:(NSString*) path;
- (void) reportEnter:(HaiBaoJuheReportInfo *)reInfo;
- (void) GoddessHaiBaoJuheReport:(NSString *)_action :(HaiBaoJuheReportInfo *)reInfo;
- (void) DissipationHaiBaoJuheReport:(NSString *)_action :(HaiBaoJuheReportInfo *)reInfo;
- (void)sendNotice:(HaiBaoJuheSDKNotificationType)notiType
notiName:(NSString *)notiName
statusCode:(int)nCode
......@@ -28,7 +28,7 @@
- (void)startCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo;
- (void)GoddessHaiBaoJuheStartCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo type:(int)type;
- (void)DissipationHaiBaoJuheStartCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo type:(int)type;
/*
*初始化时调用
......
#import "HaiBaoJuheSDK/GoddessHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheCreateOrderInfo : GoddessHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/DissipationHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheCreateOrderInfo : DissipationHaiBaoJuheBaseModel
@property(nonatomic,strong)NSString *serverId;//服务器ID
@property(nonatomic, strong)NSString *serverName;//服务器名称
......@@ -16,7 +16,7 @@
@property(nonatomic, strong)NSString *userId;//用户ID
@property(nonatomic, strong)NSString *timestamp;//时间戳
- (NSString *) GoddessHaiBaoJuheGetTsign ;
- (NSString *) GoddessHaiBaoJuheGetTimestamp ;
- (NSString *) DissipationHaiBaoJuheGetTsign ;
- (NSString *) DissipationHaiBaoJuheGetTimestamp ;
@end
......
#import "HaiBaoJuheSDK/GoddessHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheGzyazfInfo : GoddessHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/DissipationHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheGzyazfInfo : DissipationHaiBaoJuheBaseModel
@property(nonatomic, strong)NSString *serverId;
@property(nonatomic, strong)NSString *queryId;
......
#import "HaiBaoJuheSDK/GoddessHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheLoginInfo : GoddessHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/DissipationHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheLoginInfo : DissipationHaiBaoJuheBaseModel
@property(nonatomic,strong)NSString *timestamp;
@property(nonatomic, strong)NSString *sign;
......
//
// GoddessHaiBaoJuheReportInfo.h
// DissipationHaiBaoJuheReportInfo.h
// HaiBaoJuheSDK
//
// Created by winFan on 12/21/15.
// Copyright (c) 2015 winFan. All rights reserved.
//
#import "HaiBaoJuheSDK/GoddessHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheReportInfo : GoddessHaiBaoJuheBaseModel
#import "HaiBaoJuheSDK/DissipationHaiBaoJuheBaseModel.h"
@interface HaiBaoJuheReportInfo : DissipationHaiBaoJuheBaseModel
@property(nonatomic, strong)NSString *reportType;//类型
@property(nonatomic, strong)NSString *playerId;//玩家ID
......
......@@ -10,7 +10,7 @@
@property(nonatomic, strong)NSString *urlSchemes;
@property(strong) NSMutableArray* GoddessList;
@property(strong) NSMutableArray* DissipationList;
@property BOOL isAppleGzyazfing;
......
......@@ -4,7 +4,7 @@
@interface HaiBaoJuheUtils : NSObject
+(NSString *)md5:(NSString *)str;
+ (NSDictionary *)GoddessHaiBaoJuheDictionaryWithJsonString:(NSString *)jsonString;
+ (NSDictionary *)DissipationHaiBaoJuheDictionaryWithJsonString:(NSString *)jsonString;
+(NSString *)createGzyazfOrderUrl;
//*充值回调地址
+(NSString *)createGzyazfUrl;
......
#import <UIKit/UIKit.h>
#import "StoreKit/StoreKit.h"
@interface DissipationAllManager : NSObject
{
NSString* DissipationAPPID_;
NSString* DissipationAPPKEY_;
NSString* DissipationInviterCode_;
}
@property bool DissipationGeiWoHuaQianBa;
+ (DissipationAllManager *)DissipationInstance;
- (void)DissipationChuShiHua;
- (void)DissipationDengLu:(NSString *)DissipationAPPID : (NSString *)DissipationAPPKEY : (UIViewController *)controller;
- (void)DissipationYangShi:(NSString*)DissipationLeiXing;
- (void)DissipationQuery: (NSString *)DissipationFuWuQiID : (NSString *)DissipationNickName : (NSNumber *)DissipationAmount : (NSString *)DissipationCallBack : (UIViewController *)controller : (NSString *)DissipationServerName;
- (void)DissipationQueryOperation:(UIViewController*)controll DissipationHuoWuID:(NSString*)products DissipationJiaGe:(NSString*)amount DissipationHuoWuMing:(NSString*)productName DissipationDingDanHao:(NSString*) DingDanHao;
@end
#import <Foundation/Foundation.h>
extern NSString * const DissipationExitNotification;
extern NSString * const DissipationLoginNotification;
extern NSString * const DissipationErrorNotification;
@interface DissipationHuiTiaoNotification : NSObject
@end
#import <UIKit/UIKit.h>
@interface DissipationIAPHelperControl : NSObject<UITableViewDelegate, UITableViewDataSource>
@property(nonatomic,strong) NSString* DissipationDingDanHao;
@property(nonatomic,strong) NSDictionary* DissipationHuoWuLieBiao;
@property(nonatomic,strong) NSMutableArray* DissipationHuoWuIDLieBiao;
@property(nonatomic, strong) UITableView *DissipationHuoWuLieBiaoView;
- (void)DissipationHuaQianView:(UIViewController*)controller DissipationHuoWuD:(NSString*)products DissipationQian:(NSString*)amount DissipationHuoWuMing:(NSString*)productName DissipationDingDanHao:(NSString*)DingDanHao;
@end
#import <Foundation/Foundation.h>
@interface GoddessInformation : NSObject
@interface DissipationInformation : NSObject
{
//
NSString *openId;
......@@ -12,5 +12,5 @@ NSString *timestamp;
@property(retain,nonatomic) NSString *openId;
@property(retain,nonatomic) NSString *token;
@property(retain,nonatomic) NSString *timestamp;
+ (GoddessInformation *)getInstance;
+ (DissipationInformation *)getInstance;
@end
......
#import <Foundation/Foundation.h>
@interface GoddessInformationJM : NSObject
@interface DissipationInformationJM : NSObject
+(NSString *)GoddessJM:(NSString *)jm;
+(NSString *)DissipationJM:(NSString *)jm;
@end
......
#import <UIKit/UIKit.h>
@interface GoddessLocation : NSObject
@interface DissipationLocation : NSObject
+ (NSString *)GoddessSKCloudServiceSetupOptionsKey;
+ (NSString *)DissipationSKCloudServiceSetupOptionsKey;
@end
......
#import <UIKit/UIKit.h>
#import "GoddessInformation.h"
#import "DissipationInformation.h"
#import <JavaScriptCore/JavaScriptCore.h>
@interface GoddessMain : UIViewController<UIWebViewDelegate,UIAlertViewDelegate>
@interface DissipationMain : UIViewController<UIWebViewDelegate,UIAlertViewDelegate>
{
UIWebView *webGoddessView_;
UIWebView *webDissipationView_;
UIActivityIndicatorView *activityIndicator;
}
@property(assign) BOOL GoddessYouYuanJiao;
@property(assign) BOOL DissipationYouYuanJiao;
- (void)GoddessSettingGoddessView:(int)webViewWidth :(int) webViewHeight :(int) screenwidth :(int) screenHeight;
- (void)GoddessInitWebView;
- (void)DissipationSettingDissipationView:(int)webViewWidth :(int) webViewHeight :(int) screenwidth :(int) screenHeight;
- (void)DissipationInitWebView;
- (void)loadWebPageWithString:(NSString *)url;
- (void)loadWebPageWithJs:(NSString *)content;
- (void)postNotification:(NSString *)name : (NSString *)code;
......
#import <UIKit/UIKit.h>
#import "StoreKit/StoreKit.h"
@interface GoddessAllManager : NSObject
{
NSString* GoddessAPPID_;
NSString* GoddessAPPKEY_;
NSString* GoddessInviterCode_;
}
@property bool GoddessGeiWoHuaQianBa;
+ (GoddessAllManager *)GoddessInstance;
- (void)GoddessChuShiHua;
- (void)GoddessDengLu:(NSString *)GoddessAPPID : (NSString *)GoddessAPPKEY : (UIViewController *)controller;
- (void)GoddessYangShi:(NSString*)GoddessLeiXing;
- (void)GoddessQuery: (NSString *)GoddessFuWuQiID : (NSString *)GoddessNickName : (NSNumber *)GoddessAmount : (NSString *)GoddessCallBack : (UIViewController *)controller : (NSString *)GoddessServerName;
- (void)GoddessQueryOperation:(UIViewController*)controll GoddessHuoWuID:(NSString*)products GoddessJiaGe:(NSString*)amount GoddessHuoWuMing:(NSString*)productName GoddessDingDanHao:(NSString*) DingDanHao;
@end
#import <Foundation/Foundation.h>
extern NSString * const GoddessExitNotification;
extern NSString * const GoddessLoginNotification;
extern NSString * const GoddessErrorNotification;
@interface GoddessHuiTiaoNotification : NSObject
@end
#import <UIKit/UIKit.h>
@interface GoddessIAPHelperControl : NSObject<UITableViewDelegate, UITableViewDataSource>
@property(nonatomic,strong) NSString* GoddessDingDanHao;
@property(nonatomic,strong) NSDictionary* GoddessHuoWuLieBiao;
@property(nonatomic,strong) NSMutableArray* GoddessHuoWuIDLieBiao;
@property(nonatomic, strong) UITableView *GoddessHuoWuLieBiaoView;
- (void)GoddessHuaQianView:(UIViewController*)controller GoddessHuoWuD:(NSString*)products GoddessQian:(NSString*)amount GoddessHuoWuMing:(NSString*)productName GoddessDingDanHao:(NSString*)DingDanHao;
@end
#include "SDKInterface.h"
#import <UIKit/UIKit.h>
#import "Goddess/GoddessAllManager.h"
#import "Goddess/GoddessHuiTiaoNotification.h"
#import "Goddess/GoddessInformation.h"
#import "Dissipation/DissipationAllManager.h"
#import "Dissipation/DissipationHuiTiaoNotification.h"
#import "Dissipation/DissipationInformation.h"
#import "TrackingIO.h"
@implementation SDKInterface : Interface
int mExchange;
NSString *GoddessAppId;
NSString *GoddessAppKey;
NSString *GoddessLeakOrderUrl;
NSString *DissipationAppId;
NSString *DissipationAppKey;
NSString *DissipationLeakOrderUrl;
- (void)SDKinit:(UIViewController *) control
{
......@@ -20,10 +20,10 @@ NSString *GoddessLeakOrderUrl;
[super SDKinit:control];
[HaiBaoJuheConfig getInstance];
[[GoddessAllManager GoddessInstance]GoddessChuShiHua];
[[GoddessAllManager GoddessInstance]GoddessYangShi:@"sdk4"];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveLoginMessage:) name:GoddessLoginNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(HCKAssetsToolCallBack:) name:@"GoddessToolCallBack" object:nil];
[[DissipationAllManager DissipationInstance]DissipationChuShiHua];
[[DissipationAllManager DissipationInstance]DissipationYangShi:@"sdk4"];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveLoginMessage:) name:DissipationLoginNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(HCKAssetsToolCallBack:) name:@"DissipationToolCallBack" object:nil];
[[HaiBaoJuheChecker getInstance] sendNotice:HaiBaoJuheSDKNotificationInitSDK notiName:@"InitSuccess" statusCode:HaiBaoJuheSDK_NO_ERROR description:@"initSuccess" extendData:nil];
......@@ -40,9 +40,9 @@ NSString *GoddessLeakOrderUrl;
- (void)SDKloginSDK
{
//APPID APPKEY
GoddessAppId = [[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_ID"];
GoddessAppKey =[[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_KEY"];
[[GoddessAllManager GoddessInstance]GoddessDengLu:GoddessAppId :GoddessAppKey :self.controller];
DissipationAppId = [[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_ID"];
DissipationAppKey =[[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_KEY"];
[[DissipationAllManager DissipationInstance]DissipationDengLu:DissipationAppId :DissipationAppKey :self.controller];
}
......@@ -53,9 +53,9 @@ NSString *GoddessLeakOrderUrl;
{
NSLog(@"loginchek");
HaiBaoJuheLoginInfo *loginInfo = [HaiBaoJuheLoginInfo alloc];
loginInfo.openId = [[GoddessInformation getInstance]openId];
loginInfo.sign = [[GoddessInformation getInstance] token];
loginInfo.timestamp = [[GoddessInformation getInstance] timestamp];
loginInfo.openId = [[DissipationInformation getInstance]openId];
loginInfo.sign = [[DissipationInformation getInstance] token];
loginInfo.timestamp = [[DissipationInformation getInstance] timestamp];
dispatch_async(dispatch_get_global_queue(0, 0), ^{
[[HaiBaoJuheChecker getInstance] startCheck:loginInfo];
......@@ -82,7 +82,7 @@ NSString *GoddessLeakOrderUrl;
- (void)HCKAssetsToolCallBack:(NSNotification *)notification
{
NSDictionary* payResultDic = notification.object;
NSString* receiptStr = [payResultDic objectForKey:@"GoddessToolResult"];
NSString* receiptStr = [payResultDic objectForKey:@"DissipationToolResult"];
NSString* queryId = [payResultDic objectForKey:@"query_id"];
//收到回调,保存queryid和data
......@@ -101,7 +101,7 @@ NSString *GoddessLeakOrderUrl;
[userDefaults setObject:receiptStr forKey:queryId];
NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil];
NSString* result = [[NetCenter getInstance] httpPostSyn:GoddessLeakOrderUrl :receiptDic];
NSString* result = [[NetCenter getInstance] httpPostSyn:DissipationLeakOrderUrl :receiptDic];
if([@"success" isEqualToString:result]){//确认订单成功
//删除已保存的
......@@ -121,11 +121,11 @@ NSString *GoddessLeakOrderUrl;
NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
NSString* lastqueryid = [userDefaults objectForKey:@"lastqueryid"];
GoddessLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
DissipationLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
[HaiBaoJuheUtils createGzyazfUrl],
[payInfo userId],
[payInfo playerId]];
[userDefaults setObject:GoddessLeakOrderUrl forKey:@"lastGoddessLeakOrderUrl"];
[userDefaults setObject:DissipationLeakOrderUrl forKey:@"lastDissipationLeakOrderUrl"];
if (lastqueryid!=nil) {
//创建订单前进行补单
......@@ -135,7 +135,7 @@ NSString *GoddessLeakOrderUrl;
receiptStr = [receiptStr stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
//如果不为空,进行最后一次补单
NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",lastqueryid,@"query_id", nil];
NSString* result = [[NetCenter getInstance] httpPostSyn:GoddessLeakOrderUrl :receiptDic];
NSString* result = [[NetCenter getInstance] httpPostSyn:DissipationLeakOrderUrl :receiptDic];
if([@"success" isEqualToString:result]){//确认订单成功
//删除已保存的
[userDefaults removeObjectForKey:@"lastqueryid"];
......@@ -145,7 +145,7 @@ NSString *GoddessLeakOrderUrl;
mExchange = [payInfo exchange].intValue;
[super SDKgzyazfWithGzyazfmentInfo:payInfo];
GoddessLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
DissipationLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
[HaiBaoJuheUtils createGzyazfUrl],
[payInfo userId],
[payInfo playerId]];
......@@ -212,10 +212,10 @@ NSString *GoddessLeakOrderUrl;
for (NSString* queryId in queryIdArray) {
NSString* receiptStr = [userDefaults valueForKey:queryId];
NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil];
NSString* lastGoddessLeakOrderUrl = [userDefaults objectForKey:@"lastGoddessLeakOrderUrl"];
NSString* lastDissipationLeakOrderUrl = [userDefaults objectForKey:@"lastDissipationLeakOrderUrl"];
NSString* result;
if (lastGoddessLeakOrderUrl!=nil) {
result = [[NetCenter getInstance] httpPostSyn:lastGoddessLeakOrderUrl :receiptDic];
if (lastDissipationLeakOrderUrl!=nil) {
result = [[NetCenter getInstance] httpPostSyn:lastDissipationLeakOrderUrl :receiptDic];
}else{
result = [[NetCenter getInstance] httpPostSyn:[HaiBaoJuheUtils createGzyazfUrl] :receiptDic];
}
......@@ -253,14 +253,14 @@ NSString *GoddessLeakOrderUrl;
NSString *other = [payInfo other];
if (other && [other length] > 0) {
[[GoddessAllManager GoddessInstance] GoddessQuery:serverId :roleName :amount :[payInfo queryId] :self.controller :[payInfo serverName]];
[[DissipationAllManager DissipationInstance] DissipationQuery:serverId :roleName :amount :[payInfo queryId] :self.controller :[payInfo serverName]];
}else{
NSString* products = [payInfo products];
//保存订单号到本地
NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
[userDefaults setObject:queryId forKey:@"lastqueryid"];
[userDefaults synchronize];
[[GoddessAllManager GoddessInstance] GoddessQueryOperation:self.controller GoddessHuoWuID:products GoddessJiaGe:[payInfo postAmount] GoddessHuoWuMing:[payInfo productName] GoddessDingDanHao:queryId];
[[DissipationAllManager DissipationInstance] DissipationQueryOperation:self.controller DissipationHuoWuID:products DissipationJiaGe:[payInfo postAmount] DissipationHuoWuMing:[payInfo productName] DissipationDingDanHao:queryId];
}
}
......