开发版本-developer——01 first commit
This commit is contained in:
+53
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* AlibcAlipayBridge.h
|
||||
*
|
||||
* 阿里百川电商
|
||||
* 项目名称:阿里巴巴电商 AlibcTradeBiz
|
||||
* 版本号:3.1.1.96
|
||||
* 发布时间:2017-03-24
|
||||
* 开发团队:阿里巴巴百川商业化团队
|
||||
* 阿里巴巴电商SDK答疑群号:1229144682(阿里旺旺)
|
||||
* Copyright (c) 2016-2019 阿里巴巴-移动事业群-百川. All rights reserved.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "UIKit/UIKit.h"
|
||||
|
||||
#ifndef AlibcAlipayBridge_h
|
||||
#define AlibcAlipayBridge_h
|
||||
|
||||
|
||||
/** 支付结果 */
|
||||
@interface AlibcTradePayResult : NSObject
|
||||
/** 支付成功订单 */
|
||||
@property(nonatomic, copy, nullable, readonly) NSArray *paySuccessOrders;
|
||||
/** 支付失败订单 */
|
||||
@property(nonatomic, copy, nullable, readonly) NSArray *payFailedOrders;
|
||||
|
||||
@end
|
||||
|
||||
@interface AlibcAlipayBridge : NSObject
|
||||
|
||||
@property(nonatomic, copy, nullable) NSArray<NSString *> *orderIds;
|
||||
|
||||
|
||||
+ (nonnull instancetype)sharedInstance;
|
||||
|
||||
+ (BOOL)isAlipayAvaleable;
|
||||
|
||||
+ (BOOL)isPaymentSuccess:(nullable NSDictionary *)payment;
|
||||
|
||||
|
||||
/** 支付订单 */
|
||||
- (void)payOrder:(nonnull NSString *)order scheme:(nonnull NSString *)scheme callback:(nullable void (^)(NSDictionary *__nullable result))callback;
|
||||
|
||||
/** 支付结果 */
|
||||
- (void)receiptURL:(nullable NSURL *)url callback:(nullable void (^)(NSDictionary *__nullable result))callback;
|
||||
|
||||
/** 解析支付结果 */
|
||||
- (void)processPayment:(NSDictionary *__nullable)payment callback:(nullable void (^)(AlibcTradePayResult *__nullable result, NSError *__nullable error))callback;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
#endif //AlibcAlipayBridge_h
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* AlibcAuthService.h
|
||||
*
|
||||
* 阿里百川电商
|
||||
* 项目名称:阿里巴巴电商 AlibcTradeBiz
|
||||
* 版本号:3.1.1.96
|
||||
* 发布时间:2017-03-24
|
||||
* 开发团队:阿里巴巴百川商业化团队
|
||||
* 阿里巴巴电商SDK答疑群号:1229144682(阿里旺旺)
|
||||
* Copyright (c) 2016-2019 阿里巴巴-移动事业群-百川. All rights reserved.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "AlibcHintProtocol.h"
|
||||
|
||||
#ifndef ALiAuthService_h
|
||||
#define ALiAuthService_h
|
||||
|
||||
@interface AlibcAuthService : NSObject
|
||||
+ (nonnull instancetype)sharedInstantce;
|
||||
|
||||
- (void)installHintService:(nonnull id <AlibcHintProtocol>)hint;
|
||||
|
||||
@end
|
||||
|
||||
#endif //ALiAuthService_h
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* AlibcChannelModule.h
|
||||
*
|
||||
* 阿里百川电商
|
||||
* 项目名称:阿里巴巴电商 AlibcTradeBiz
|
||||
* 版本号:3.1.1.96
|
||||
* 发布时间:2017-03-24
|
||||
* 开发团队:阿里巴巴百川商业化团队
|
||||
* 阿里巴巴电商SDK答疑群号:1229144682(阿里旺旺)
|
||||
* Copyright (c) 2016-2019 阿里巴巴-移动事业群-百川. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef ALiChannelModule_h
|
||||
#define ALiChannelModule_h
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
//添加umpChannel u_channel isvCode,ybhpss,ttid参数
|
||||
@interface AlibcChannelModule : NSObject
|
||||
|
||||
+ (void)addChannelParam:(NSMutableDictionary *)param;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* ALiChannelModule_h */
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* AlibcConfigService.h
|
||||
*
|
||||
* 阿里百川电商
|
||||
* 项目名称:阿里巴巴电商 AlibcTradeBiz
|
||||
* 版本号:3.1.1.96
|
||||
* 发布时间:2017-03-24
|
||||
* 开发团队:阿里巴巴百川商业化团队
|
||||
* 阿里巴巴电商SDK答疑群号:1229144682(阿里旺旺)
|
||||
* Copyright (c) 2016-2019 阿里巴巴-移动事业群-百川. All rights reserved.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "AlibcTradeTaokeParams.h"
|
||||
|
||||
#ifndef AlibcConfigService_h
|
||||
#define AlibcConfigService_h
|
||||
#define YBHPSS @"ybhpss" //全链路打通数据参数
|
||||
|
||||
@interface AlibcConfigService : NSObject
|
||||
|
||||
+ (instancetype)sharedConfig;
|
||||
|
||||
- (void)updateConfig;
|
||||
|
||||
/*包含ttid的拼装规则*/
|
||||
@property(nonatomic, readonly) NSString *ttid;
|
||||
@property(nonatomic, strong) NSString *isvVersion;
|
||||
@property(nonatomic, copy, readwrite) NSString *channelName;
|
||||
@property(nonatomic, copy, readwrite) NSString *channelType;
|
||||
@property(nonatomic, readonly) NSString *channel;
|
||||
@property(nonatomic, assign) BOOL isForceH5;
|
||||
// TODO:
|
||||
@property(nonatomic, strong) NSString *alipayRequestSender;
|
||||
|
||||
//全局淘客参数
|
||||
@property(nonatomic, strong) AlibcTradeTaokeParams *taokeParams;
|
||||
/* isvCode,tag*/
|
||||
@property(atomic, strong) NSString *isvCode;
|
||||
|
||||
/** 系统版本信息,SDK版本 */
|
||||
@property(atomic, copy) NSString *systemVersion;
|
||||
|
||||
//淘客打点是否使用同步换url的方式
|
||||
- (BOOL)isSyncForTaoke;
|
||||
|
||||
//是否检测WebView支付. 如果安装了支付宝且检测支付, 使用支付宝应用完成支付; 否则, 使用WebView完成支付. 默认YES.
|
||||
- (BOOL)isNeedAlipayNativeForPay;
|
||||
|
||||
//设置是否检测WebView支付
|
||||
- (void)setNeedAlipayNativeForPay:(BOOL)need;
|
||||
|
||||
//是否登陆降级(不触发登陆了)
|
||||
- (BOOL)isLoginDegarade;
|
||||
|
||||
//设置是否同步打点
|
||||
- (void)setIsSyncForTaoke:(BOOL)isSync;
|
||||
|
||||
//双11强制降级配置
|
||||
- (NSString *)double11OpenType;
|
||||
|
||||
//存储所有需要isv设置的配置
|
||||
- (void)setIsvConfig:(id)value forKey:(NSString *)key;
|
||||
|
||||
- (NSString *)isvConfigForKey:(NSString *)key;
|
||||
|
||||
- (void)setExtUserAgent:(NSString *)extUserAgent;
|
||||
|
||||
- (NSString *)extUserAgent;
|
||||
|
||||
@end
|
||||
#endif //AlibcConfigService_h
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* AlibcHintProtocol.h
|
||||
*
|
||||
* 阿里百川电商
|
||||
* 项目名称:阿里巴巴电商 AlibcTradeBiz
|
||||
* 版本号:3.1.1.96
|
||||
* 发布时间:2017-03-24
|
||||
* 开发团队:阿里巴巴百川商业化团队
|
||||
* 阿里巴巴电商SDK答疑群号:1229144682(阿里旺旺)
|
||||
* Copyright (c) 2016-2019 阿里巴巴-移动事业群-百川. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef ALiHintProtocal_h
|
||||
#define ALiHintProtocal_h
|
||||
|
||||
@protocol AlibcHintProtocol <NSObject>
|
||||
|
||||
//根据bizid返回组件的全量权限点
|
||||
- (NSArray<NSString *> *)getHintList:(NSString *)bizID;
|
||||
|
||||
//上报组件返回的权限点有缺失
|
||||
- (void)reportHintLost:(NSString *)bizID hintId:(NSString *)hintId;
|
||||
@end
|
||||
|
||||
#endif /* ALiMtopHintProtocol_h */
|
||||
+123
@@ -0,0 +1,123 @@
|
||||
/*
|
||||
* AlibcLinkPartnerBridge.h
|
||||
*
|
||||
* 阿里百川电商
|
||||
* 项目名称:阿里巴巴电商 AlibcTradeBiz
|
||||
* 版本号:3.1.1.96
|
||||
* 发布时间:2017-03-24
|
||||
* 开发团队:阿里巴巴百川商业化团队
|
||||
* 阿里巴巴电商SDK答疑群号:1229144682(阿里旺旺)
|
||||
* Copyright (c) 2016-2019 阿里巴巴-移动事业群-百川. All rights reserved.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#ifndef AlibcNativeFailMode_Enum
|
||||
#define AlibcNativeFailMode_Enum
|
||||
|
||||
/**
|
||||
拉起手淘失败后的处理策略
|
||||
|
||||
- AlibcNativeFailModeJumpH5: 当拉起手淘/天猫失败, 则在 webview 中跳转对应 H5 页面; 默认选项
|
||||
- AlibcNativeFailModeJumpDownloadPage: 当拉起手淘/天猫失败, 则跳转对应 App 下载页面
|
||||
- AlibcNativeFailModeJumpBrowser: 当拉起手淘/天猫失败, 则在浏览器中跳转对应 H5 页面
|
||||
- AlibcNativeFailModeNone: 当拉起手淘/天猫失败, 不做额外操作
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, AlibcNativeFailMode) {
|
||||
AlibcNativeFailModeJumpH5 = 0,
|
||||
AlibcNativeFailModeJumpDownloadPage = 1,
|
||||
AlibcNativeFailModeJumpBrowser = 2,
|
||||
AlibcNativeFailModeNone = 3,
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef ALiApplinkBridge_h
|
||||
#define ALiApplinkBridge_h
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class AlibcError;
|
||||
@class AlibcTradeTaokeParams;
|
||||
|
||||
@interface AlibcLinkPartnerBridge : NSObject
|
||||
|
||||
|
||||
/**
|
||||
* 初始化
|
||||
|
||||
@param appkey appkey
|
||||
*/
|
||||
+ (void)initWithAppkey:(nonnull NSString *)appkey;
|
||||
|
||||
|
||||
/**
|
||||
* 尝试跳转详情页
|
||||
|
||||
@param itemID Item ID
|
||||
@param params 参数
|
||||
@param failMode 跳转失败处理策略
|
||||
@param taoKeParams 淘客参数
|
||||
@return 跳转错误对象
|
||||
*/
|
||||
+ (nullable AlibcError *)tryJumpToDetail:(NSString *)itemID
|
||||
params:(nullable NSDictionary *)params
|
||||
failMode:(AlibcNativeFailMode)failMode
|
||||
taokeParams:(nullable AlibcTradeTaokeParams *)taoKeParams;
|
||||
|
||||
|
||||
/**
|
||||
* 尝试跳转店铺页
|
||||
|
||||
@param shopID shopID
|
||||
@param params 参数
|
||||
@param failMode 跳转失败处理策略
|
||||
@param taoKeParams 淘客参数
|
||||
@return 跳转错误对象
|
||||
*/
|
||||
+ (nullable AlibcError *)tryJumpToShop:(NSString *)shopID
|
||||
params:(nullable NSDictionary *)params
|
||||
failMode:(AlibcNativeFailMode)failMode
|
||||
taokeParams:(nullable AlibcTradeTaokeParams *)taoKeParams;
|
||||
|
||||
|
||||
/**
|
||||
* 尝试跳转指定网页
|
||||
|
||||
@param url URL String
|
||||
@param params 参数
|
||||
@param failMode 跳转失败处理策略
|
||||
@param taoKeParams 淘客参数
|
||||
@return 跳转错误对象
|
||||
*/
|
||||
+ (nullable AlibcError *)tryJumpToURL:(NSString *)url
|
||||
params:(nullable NSDictionary *)params
|
||||
failMode:(AlibcNativeFailMode)failMode
|
||||
taokeParams:(nullable AlibcTradeTaokeParams *)taoKeParams;
|
||||
|
||||
|
||||
/**
|
||||
* 处理 URL 跳转
|
||||
|
||||
@param url url
|
||||
@param sourceApplication sourceApplication
|
||||
@param options options
|
||||
@return handle or not
|
||||
*/
|
||||
+ (BOOL)handleOpenURL:(NSURL *)url
|
||||
sourceApplication:(nullable NSString *)sourceApplication
|
||||
options:(nullable NSDictionary<NSString *, id> *)options;
|
||||
|
||||
|
||||
/**
|
||||
* 在天猫未安装导致天猫打开失败时, 尝试打开手淘
|
||||
|
||||
@param enable enable
|
||||
*/
|
||||
+ (void)enableOpenTaobaoWhenTmallNotInstalled:(BOOL)enable;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif //ALiApplinkBridge_h
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* AlibcLoginBridge.h
|
||||
*
|
||||
* 阿里百川电商
|
||||
* 项目名称:阿里巴巴电商 AlibcTradeBiz
|
||||
* 版本号:3.1.1.96
|
||||
* 发布时间:2017-03-24
|
||||
* 开发团队:阿里巴巴百川商业化团队
|
||||
* 阿里巴巴电商SDK答疑群号:1229144682(阿里旺旺)
|
||||
* Copyright (c) 2016-2019 阿里巴巴-移动事业群-百川. All rights reserved.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#ifndef AlibcLoginBridge_h
|
||||
#define AlibcLoginBridge_h
|
||||
|
||||
@interface AlibcLoginBridge : NSObject
|
||||
|
||||
|
||||
/**
|
||||
登录模块标准初始化接口
|
||||
*/
|
||||
+ (void)initLogin;
|
||||
|
||||
|
||||
/**
|
||||
登录模块极简版初始化接口
|
||||
|
||||
@brief 极简版没有依赖安全模块, 需要手动传入 Appkey
|
||||
|
||||
@param appkey appkey
|
||||
*/
|
||||
+ (void)initLoginWithAppkey:(NSString *)appkey;
|
||||
|
||||
+ (BOOL)isLoginSvrAvaleable;
|
||||
|
||||
+ (void)showLogin:(UIViewController *)parentController
|
||||
successCallback:(void (^)(NSString *userID))onSuccess
|
||||
failedCallback:(void (^)(NSError *error))onFailure;
|
||||
|
||||
+ (void)logout;
|
||||
|
||||
+ (void)setEnvironment:(AlibcEnvironment)env;
|
||||
|
||||
/**
|
||||
是否是登陆URL
|
||||
*/
|
||||
+ (BOOL)isLoginURL:(NSString *)url;
|
||||
|
||||
/**
|
||||
是否是登出URL
|
||||
*/
|
||||
+ (BOOL)isLogoutUrl:(NSString *)url;
|
||||
|
||||
/**
|
||||
是否是手淘跳回url
|
||||
*/
|
||||
+ (BOOL)isTBBackUrl:(NSString *)url;
|
||||
|
||||
/**
|
||||
手淘跳转回来,拿到url调用
|
||||
*/
|
||||
+ (void)loginByURL:(NSURL *)url;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* AlibcTokenService.h
|
||||
*
|
||||
* 阿里百川电商
|
||||
* 项目名称:阿里巴巴电商 AlibcTradeBiz
|
||||
* 版本号:3.1.1.96
|
||||
* 发布时间:2017-03-24
|
||||
* 开发团队:阿里巴巴百川商业化团队
|
||||
* 阿里巴巴电商SDK答疑群号:1229144682(阿里旺旺)
|
||||
* Copyright (c) 2016-2019 阿里巴巴-移动事业群-百川. All rights reserved.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#ifndef AlibcTokenService_h
|
||||
#define AlibcTokenService_h
|
||||
|
||||
typedef void(^TokenRequestCallback)(NSError *_Nullable error, NSString *_Nullable dataObj);
|
||||
|
||||
|
||||
@interface AlibcTokenService : NSObject
|
||||
@property(nonatomic, strong) NSString *_Nullable token;
|
||||
@property(nonatomic, strong) NSDate *_Nullable expire;
|
||||
@property(nonatomic, strong) NSDate *_Nullable lastUpdate;
|
||||
|
||||
|
||||
+ (nonnull instancetype)sharedInstantce;
|
||||
|
||||
- (nullable NSString *)getLocalToken;
|
||||
|
||||
- (void)setTokenInvalid;
|
||||
|
||||
- (void)getRemoteToken:(nonnull NSArray<NSString *> *)list callBack:(nonnull TokenRequestCallback)callBack;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* AlibcTrackParams.h
|
||||
*
|
||||
* 阿里百川电商
|
||||
* 项目名称:阿里巴巴电商 AlibcTradeBiz
|
||||
* 版本号:3.1.1.96
|
||||
* 发布时间:2017-03-24
|
||||
* 开发团队:阿里巴巴百川商业化团队
|
||||
* 阿里巴巴电商SDK答疑群号:1229144682(阿里旺旺)
|
||||
* Copyright (c) 2016-2019 阿里巴巴-移动事业群-百川. All rights reserved.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#ifndef AlibcTrackParams_h
|
||||
#define AlibcTrackParams_h
|
||||
|
||||
@interface AlibcTrackParams : NSObject
|
||||
/**必填: 供计算效果用,由推荐模块输出内容后,曝光埋点使用 */
|
||||
@property(nonatomic, strong) NSString *scm;
|
||||
/**必填: 供计算效果用,由推荐模块输出内容后,曝光埋点使用 */
|
||||
@property(nonatomic, strong) NSString *pvid;
|
||||
/**必填: 三方app的用户识别id,用于百川识别该用户行为并对推荐效果进行优化 */
|
||||
@property(nonatomic, strong) NSString *puid;
|
||||
/** 三方app页面名称*/
|
||||
@property(nonatomic, strong) NSString *page;
|
||||
/** 三方app控件名称 */
|
||||
@property(nonatomic, strong) NSString *label;
|
||||
|
||||
|
||||
/*
|
||||
* trackParam 参数key说明
|
||||
*/
|
||||
#define track_scm @"scm"
|
||||
#define track_pvid @"pvid"
|
||||
#define track_isv_code @"isv_code"
|
||||
|
||||
/**
|
||||
* 生成Dictionary
|
||||
*/
|
||||
- (NSDictionary *)toDictionary;
|
||||
|
||||
+ (NSString *)ybhpssStringForDictionary:(NSDictionary *)params;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* AlibcTradeBiz.h
|
||||
*
|
||||
* 阿里百川电商
|
||||
* 项目名称:阿里巴巴电商 AlibcTradeBiz
|
||||
* 版本号:3.1.1.96
|
||||
* 发布时间:2017-03-24
|
||||
* 开发团队:阿里巴巴百川商业化团队
|
||||
* 阿里巴巴电商SDK答疑群号:1229144682(阿里旺旺)
|
||||
* Copyright (c) 2016-2019 阿里巴巴-移动事业群-百川. All rights reserved.
|
||||
*/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
//! Project version number for AlibcTradeBiz.
|
||||
FOUNDATION_EXPORT double AlibcTradeBizVersionNumber;
|
||||
|
||||
//! Project version string for AlibcTradeBiz.
|
||||
FOUNDATION_EXPORT const unsigned char AlibcTradeBizVersionString[];
|
||||
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <AlibcTradeBiz/PublicHeader.h>
|
||||
|
||||
#ifndef AlibcTradeBiz_h
|
||||
#define AlibcTradeBiz_h
|
||||
|
||||
#import "AlibcTradeEnv.h"
|
||||
#import "AlibcHintProtocol.h"
|
||||
#import "AlibcAuthService.h"
|
||||
#import "AlibcTradeError.h"
|
||||
#import "AlibcConfigService.h"
|
||||
#import "AlibcAlipayBridge.h"
|
||||
#import "AlibcTrackParams.h"
|
||||
#import "AlibcTradeBizSDK.h"
|
||||
#import "AlibcLinkPartnerBridge.h"
|
||||
#import "AlibcTradeTaokeParams.h"
|
||||
#import "AlibcChannelModule.h"
|
||||
#import "AlibcTradeBizEvent.h"
|
||||
#import "AlibcWebViewController.h"
|
||||
#import "AlibcUserAgent.h"
|
||||
#import "AlibcTokenService.h"
|
||||
#import "AlibcLoginBridge.h"
|
||||
|
||||
#endif
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* AlibcTradeBizEvent.h
|
||||
*
|
||||
* 阿里百川电商
|
||||
* 项目名称:阿里巴巴电商 AlibcTradeBiz
|
||||
* 版本号:3.1.1.96
|
||||
* 发布时间:2017-03-24
|
||||
* 开发团队:阿里巴巴百川商业化团队
|
||||
* 阿里巴巴电商SDK答疑群号:1229144682(阿里旺旺)
|
||||
* Copyright (c) 2016-2019 阿里巴巴-移动事业群-百川. All rights reserved.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
|
||||
#ifndef AlibcTradeBizEvent_h
|
||||
#define AlibcTradeBizEvent_h
|
||||
|
||||
//核心事件监听类,事件的监听和上报都通过ALiMsgBus触发
|
||||
//目前包含登陆,支付事件的触发上报,
|
||||
|
||||
//登陆成功
|
||||
#define ALIBCBIZLOGINSUCCESS @"ALI.BC.Biz.LoginSuccess"
|
||||
//-(void)alibcLoginSUccess:(ALBBSession *)session
|
||||
|
||||
//登陆失败
|
||||
#define ALIBCBIZLOGINFAIL @"ALI.BC.Biz.LoginFail"
|
||||
//-(void)alibcLoginFail:(NSError *)error
|
||||
|
||||
//支付成功
|
||||
#define ALIBCBIZLPAYSUCCESS @"ALI.BC.Biz.PaySuccess"
|
||||
//-(void)alibcPaySuccess:(AlibcTradePayResult *)result context:(ALiURLBusContext*)context
|
||||
|
||||
//支付失败
|
||||
#define ALIBCBIZLPAYFAIL @"ALI.BC.Biz.PayFail"
|
||||
//-(void)alibcPayFail:(NSError *)error context:(ALiURLBusContext*)context
|
||||
|
||||
//webview被关闭
|
||||
#define ALIBCBIZWEBVIEWCLOSE @"ALI.BC.Biz.WebviewClose"
|
||||
//-(void)alibcWebviewClose:(ALiURLBusContext*)context
|
||||
|
||||
#endif
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* AlibcTradeBizSDK.h
|
||||
*
|
||||
* 阿里百川电商
|
||||
* 项目名称:阿里巴巴电商 AlibcTradeBiz
|
||||
* 版本号:3.1.1.96
|
||||
* 发布时间:2017-03-24
|
||||
* 开发团队:阿里巴巴百川商业化团队
|
||||
* 阿里巴巴电商SDK答疑群号:1229144682(阿里旺旺)
|
||||
* Copyright (c) 2016-2019 阿里巴巴-移动事业群-百川. All rights reserved.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <AlibcTradeCommon/AlibcTradeCommon.h>
|
||||
|
||||
#ifndef AlibcTradeBizSDK_h
|
||||
#define AlibcTradeBizSDK_h
|
||||
|
||||
#define AlibcTradeBizSDKVersion @"3.1.1.96"
|
||||
|
||||
|
||||
@interface AlibcTradeBizSDK : NSObject
|
||||
|
||||
/**
|
||||
* 初始化函数,初始化成功后方可正常使用SDK中的功能
|
||||
*
|
||||
* @param onSuccess 初始化成功的回调
|
||||
* @param onFailure 初始化失败的回调
|
||||
*/
|
||||
+ (void)asyncInitWithSuccess:(void (^)())onSuccess
|
||||
failure:(void (^)(NSError *error))onFailure;
|
||||
@end
|
||||
|
||||
|
||||
@interface AlibcTradeBizSDK (Settings)
|
||||
|
||||
/**
|
||||
* 设置环境
|
||||
*/
|
||||
+ (void)setEnv:(AlibcEnvironment)env;
|
||||
|
||||
|
||||
/**
|
||||
开启/关闭 Debug 模式日志
|
||||
|
||||
@param isDebugLogOpen 开启/关闭
|
||||
*/
|
||||
+ (void)setDebugLogOpen:(BOOL)isDebugLogOpen;
|
||||
|
||||
|
||||
/**
|
||||
上层需要运行时获取 SDK Version 时,可以使用这个接口获取
|
||||
|
||||
@return AlibcTradeBizSDKVersion
|
||||
*/
|
||||
+ (NSString *)getSDKVersion;
|
||||
|
||||
@end
|
||||
|
||||
#endif //AlibcTradeBizSDK_h
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* AlibcTradeEnv.h
|
||||
*
|
||||
* 阿里百川电商
|
||||
* 项目名称:阿里巴巴电商 AlibcTradeBiz
|
||||
* 版本号:3.1.1.96
|
||||
* 发布时间:2017-03-24
|
||||
* 开发团队:阿里巴巴百川商业化团队
|
||||
* 阿里巴巴电商SDK答疑群号:1229144682(阿里旺旺)
|
||||
* Copyright (c) 2016-2019 阿里巴巴-移动事业群-百川. All rights reserved.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#ifndef ALiTradeEnv_h
|
||||
#define ALiTradeEnv_h
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/** 地址 */
|
||||
@interface AlibcTradeEnv : NSObject
|
||||
/** 真实ID商品详情页地址 */
|
||||
+ (nullable NSString *)itemURLWithItemType:(NSInteger)itemType itemID:(NSString *)itemID;
|
||||
|
||||
/** 迷你商品详情页地址 */
|
||||
+ (nullable NSString *)miniItemURLWithItemID:(NSString *)itemID;
|
||||
|
||||
/** 直接加购页地址 */
|
||||
+ (nullable NSString *)addCardURL:(NSString *)itemID;
|
||||
|
||||
/** 购物车地址 */
|
||||
+ (nullable NSString *)cartURL;
|
||||
|
||||
/** 我的订单地址 */
|
||||
+ (nullable NSString *)myOrdersURLWithTabCode:(NSString *)tabCode condition:(nullable NSString *)condition;
|
||||
|
||||
/** 店铺页地址 */
|
||||
+ (nullable NSString *)shopURLWithShopID:(nonnull NSString *)shopID;
|
||||
|
||||
/** 淘宝首页 */
|
||||
+ (nullable NSString *)taobaoHomeURL;
|
||||
|
||||
/** 配置服务端host地址(营造维护) */
|
||||
+ (nullable NSString *)configServerHost;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif //ALiTradeEnv_h
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* AlibcTradeError.h
|
||||
*
|
||||
* 阿里百川电商
|
||||
* 项目名称:阿里巴巴电商 AlibcTradeBiz
|
||||
* 版本号:3.1.1.96
|
||||
* 发布时间:2017-03-24
|
||||
* 开发团队:阿里巴巴百川商业化团队
|
||||
* 阿里巴巴电商SDK答疑群号:1229144682(阿里旺旺)
|
||||
* Copyright (c) 2016-2019 阿里巴巴-移动事业群-百川. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef AlibcError_h
|
||||
#define AlibcError_h
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/** 交易错误码 */
|
||||
typedef NS_ENUM (NSUInteger, AlibcTradeError) {
|
||||
/** 交易链路失败 */
|
||||
AlibcErrorProcessFailed = 3001,
|
||||
/** 交易链路中用户取消了操作 */
|
||||
AlibcErrorCancelled = 3002,
|
||||
/** 交易链路中发生支付但是支付失败 */
|
||||
AlibcErrorPaymentFailed = 3003,
|
||||
/** itemId无效 */
|
||||
AlibcErrorInvalidItemID = 3004,
|
||||
/** page url为空 */
|
||||
AlibcErrorNullPageURL = 3005,
|
||||
/** shopId无效 */
|
||||
AlibcErrorInvalidShopID = 3006,
|
||||
};
|
||||
|
||||
extern NSString *const AlibcTradeErrorDomain;
|
||||
|
||||
#endif /* AlibcError_h */
|
||||
Executable
+36
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* AlibcTradeTaokeParams.h
|
||||
*
|
||||
* 阿里百川电商
|
||||
* 项目名称:阿里巴巴电商 AlibcTradeBiz
|
||||
* 版本号:3.1.1.96
|
||||
* 发布时间:2017-03-24
|
||||
* 开发团队:阿里巴巴百川商业化团队
|
||||
* 阿里巴巴电商SDK答疑群号:1229144682(阿里旺旺)
|
||||
* Copyright (c) 2016-2019 阿里巴巴-移动事业群-百川. All rights reserved.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#ifndef AlibcTradeTaokeParams_h
|
||||
#define AlibcTradeTaokeParams_h
|
||||
|
||||
/**
|
||||
* 统一的 key 写法
|
||||
*/
|
||||
static NSString *const AlibcTradeTaokeParamsPid = @"pid";
|
||||
static NSString *const AlibcTradeTaokeParamsUnionID = @"unionId";
|
||||
static NSString *const AlibcTradeTaokeParamsSubPid = @"subpid";
|
||||
|
||||
/** 淘客参数 */
|
||||
@interface AlibcTradeTaokeParams : NSObject
|
||||
/** 淘客ID */
|
||||
@property(nonatomic, copy) NSString *pid;
|
||||
/** */
|
||||
@property(nonatomic, copy) NSString *unionId;
|
||||
/** */
|
||||
@property(nonatomic, copy) NSString *subPid;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* AlibcUserAgent.h
|
||||
*
|
||||
* 阿里百川电商
|
||||
* 项目名称:阿里巴巴电商 AlibcTradeBiz
|
||||
* 版本号:3.1.1.96
|
||||
* 发布时间:2017-03-24
|
||||
* 开发团队:阿里巴巴百川商业化团队
|
||||
* 阿里巴巴电商SDK答疑群号:1229144682(阿里旺旺)
|
||||
* Copyright (c) 2016-2019 阿里巴巴-移动事业群-百川. All rights reserved.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#ifndef AlibcUserAgent_h
|
||||
#define AlibcUserAgent_h
|
||||
|
||||
FOUNDATION_EXPORT NSString *AlibcUserAgentContextKeyWebView;
|
||||
|
||||
@interface AlibcUserAgent : NSObject
|
||||
/** 装载
|
||||
* !!!: 需要主线程调用
|
||||
* */
|
||||
+ (void)install:(NSDictionary *)context;
|
||||
|
||||
/** 卸载 */
|
||||
+ (void)uninstall:(NSDictionary *)context;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* AlibcWebViewController.h
|
||||
*
|
||||
* 阿里百川电商
|
||||
* 项目名称:阿里巴巴电商 AlibcTradeBiz
|
||||
* 版本号:3.1.1.96
|
||||
* 发布时间:2017-03-24
|
||||
* 开发团队:阿里巴巴百川商业化团队
|
||||
* 阿里巴巴电商SDK答疑群号:1229144682(阿里旺旺)
|
||||
* Copyright (c) 2016-2019 阿里巴巴-移动事业群-百川. All rights reserved.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#ifndef AlibcWebViewController_h
|
||||
#define AlibcWebViewController_h
|
||||
|
||||
@interface AlibcWebViewController : UIViewController <UIWebViewDelegate>
|
||||
@property(strong, nonatomic) UIWebView *webView;
|
||||
@end
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user