Commit 4b78e60254d932512fa9014149c2dfb77fee9f71
1 parent
d15437f2
删除
Showing
6 changed files
with
0 additions
and
222 deletions
CNLivePaySDK.framework/CNLivePaySDK deleted
100644 → 0
No preview for this file type
CNLivePaySDK.framework/Headers/CNLivePayArg.h deleted
100644 → 0
| 1 | -// | ||
| 2 | -// CNLivePayArg.h | ||
| 3 | -// CNLivePaySDK | ||
| 4 | -// | ||
| 5 | -// Created by cnliveJunBo on 17/5/2. | ||
| 6 | -// Copyright © 2017年 cnlive. All rights reserved. | ||
| 7 | -// | ||
| 8 | - | ||
| 9 | -#import <Foundation/Foundation.h> | ||
| 10 | - | ||
| 11 | -typedef enum { | ||
| 12 | - CNLivePayTypeWeChatPay = 1, | ||
| 13 | - CNLivePayTypeAliPay = 3, | ||
| 14 | - CNLivePayTypeInAppPurchase = 1001 | ||
| 15 | -} CNLivePayType; | ||
| 16 | - | ||
| 17 | -@interface CNLivePayArg : NSObject | ||
| 18 | - | ||
| 19 | -/** | ||
| 20 | - 视讯云平台获得的第三方平台帐号; | ||
| 21 | - */ | ||
| 22 | -@property (nonatomic, copy) NSString * account; | ||
| 23 | - | ||
| 24 | - | ||
| 25 | -/** | ||
| 26 | - 支付类型(微信, 支付宝, 内购) | ||
| 27 | - */ | ||
| 28 | -@property (nonatomic, assign) CNLivePayType type; | ||
| 29 | - | ||
| 30 | - | ||
| 31 | -/** | ||
| 32 | - 唯一业务系统中的订单号 | ||
| 33 | - */ | ||
| 34 | -@property (nonatomic, copy) NSString *out_trade_no; | ||
| 35 | - | ||
| 36 | - | ||
| 37 | -/** | ||
| 38 | - 商品价格,以分为单位,只能是整数; | ||
| 39 | - */ | ||
| 40 | -@property (nonatomic, assign) int total_fee; | ||
| 41 | - | ||
| 42 | - | ||
| 43 | -/** | ||
| 44 | - 用户付款通知业务系统接收地址;不能有参数; | ||
| 45 | - */ | ||
| 46 | -@property (nonatomic, copy) NSString *notify_url; | ||
| 47 | - | ||
| 48 | - | ||
| 49 | -/** | ||
| 50 | - 订单信息 | ||
| 51 | - */ | ||
| 52 | -@property (nonatomic, copy) NSString *body; | ||
| 53 | - | ||
| 54 | - | ||
| 55 | -/** | ||
| 56 | - 业务回传参数,传递参数用于给 notify_url 用户付款通知业务系统接收地址拼接参数; | ||
| 57 | - 业务回传参数可以使用多个参数,由业务系统自行使用。但有长度限制,所有attach 的总字符长度不能超过300。 例如: attach.phone=13523455432 attach.others=o … | ||
| 58 | - */ | ||
| 59 | -@property (nonatomic, strong) NSDictionary *attach; | ||
| 60 | - | ||
| 61 | - | ||
| 62 | -/** | ||
| 63 | - 业务系统用户ID | ||
| 64 | - */ | ||
| 65 | -@property (nonatomic, copy) NSString *user_id; | ||
| 66 | - | ||
| 67 | -@end |
CNLivePaySDK.framework/Headers/CNLivePayResult.h deleted
100644 → 0
| 1 | -// | ||
| 2 | -// CNLivePayResult.h | ||
| 3 | -// CNLivePaySDKDemo | ||
| 4 | -// | ||
| 5 | -// Created by cnliveJunBo on 17/5/3. | ||
| 6 | -// Copyright © 2017年 cnlive. All rights reserved. | ||
| 7 | -// | ||
| 8 | - | ||
| 9 | -#import <Foundation/Foundation.h> | ||
| 10 | - | ||
| 11 | -/** | ||
| 12 | - * 返回值详解 | ||
| 13 | - */ | ||
| 14 | -typedef NS_ENUM(NSUInteger, CNLiveBackExplain) { | ||
| 15 | - | ||
| 16 | - CNLive_CODE_SUCCESS = 2000, /**< 成功*/ | ||
| 17 | - CNLive_CODE_FAIL_CANCEL = 4004, /**< 用户取消支付*/ | ||
| 18 | - CNLive_CODE_ERROR_DEAL = 4201, /**< 处理中*/ | ||
| 19 | - CNLive_CODE_Failure = 4005, /**< 失败*/ | ||
| 20 | - CNLive_CODE_ERROR_CONNECT = 4202, /**< 网络错误*/ | ||
| 21 | - CNLive_CODE_ERROR_INSIDE = 4006, /**< SDK内部错误*/ | ||
| 22 | - CNLive_CODE_ERROR_NOTADDSDK = 4007, /**< 缺少相关SDK*/ | ||
| 23 | - CNLive_CODE_ERROR_WX_NOT_INSTALL = 4101, /**< 未安装微信*/ | ||
| 24 | - CNLive_CODE_ERROR_WX_NOT_SUPPORT_PAY = 4102, /**< 微信不支持OpenApi*/ | ||
| 25 | - CNLive_CODE_ERROR_WX_SENTFAIL = 4103, /**< 微信发送失败*/ | ||
| 26 | - CNLive_CODE_ERROR_WX_AUTHDENY = 4104, /**< 微信授权失败*/ | ||
| 27 | - CNLive_CODE_ChannelWrong = 4003, /**< 渠道信息错误*/ | ||
| 28 | - CNLive_CODE_ERROR_CHARGE_PARAMETER = 4002 /**< 参数信息错误*/ | ||
| 29 | -}; | ||
| 30 | - | ||
| 31 | -@interface CNLivePayResult : NSObject | ||
| 32 | - | ||
| 33 | -/** | ||
| 34 | - * 枚举详解 | ||
| 35 | - */ | ||
| 36 | -@property (assign, nonatomic) CNLiveBackExplain explain; | ||
| 37 | -/** | ||
| 38 | - * 错误描述 | ||
| 39 | - */ | ||
| 40 | -@property (copy, nonatomic) NSString *backDescription; | ||
| 41 | -/** | ||
| 42 | - * 支付渠道返回的错误码 | ||
| 43 | - */ | ||
| 44 | -@property (copy, nonatomic) NSString *channelBackCode; | ||
| 45 | -/** | ||
| 46 | - * 支付渠道 | ||
| 47 | - */ | ||
| 48 | -@property (copy, nonatomic) NSString *channel; | ||
| 49 | -/** | ||
| 50 | - * 支付渠道返回的信息 | ||
| 51 | - */ | ||
| 52 | -@property (strong, nonatomic) NSString *channelBackInfo; | ||
| 53 | - | ||
| 54 | -@end |
CNLivePaySDK.framework/Headers/CNLivePaySDK.h deleted
100644 → 0
| 1 | -// | ||
| 2 | -// CNLivePaySDK.h | ||
| 3 | -// CNLivePaySDK | ||
| 4 | -// | ||
| 5 | -// Created by cnliveJunBo on 17/5/1. | ||
| 6 | -// Copyright © 2017年 cnlive. All rights reserved. | ||
| 7 | -// | ||
| 8 | - | ||
| 9 | -#import <Foundation/Foundation.h> | ||
| 10 | -#import "CNLivePayArg.h" | ||
| 11 | -#import "CNLivePayResult.h" | ||
| 12 | - | ||
| 13 | -typedef void(^CNLCompletionBlock)(CNLivePayResult *cnlivePayResult); | ||
| 14 | - | ||
| 15 | -@interface CNLivePaySDK : NSObject | ||
| 16 | - | ||
| 17 | -/** | ||
| 18 | - 获取SDK当前版本号 | ||
| 19 | - | ||
| 20 | - @return 返回SDK当前版本号 | ||
| 21 | - */ | ||
| 22 | -+ (NSString *)getVersion; | ||
| 23 | - | ||
| 24 | - | ||
| 25 | -/** | ||
| 26 | - 获取支付核心类单例 | ||
| 27 | - | ||
| 28 | - @return 返回支付核心类单例 | ||
| 29 | - */ | ||
| 30 | -+ (instancetype)sharedCNLivePayManager; | ||
| 31 | - | ||
| 32 | - | ||
| 33 | -/** | ||
| 34 | - 注册支付SDK | ||
| 35 | - | ||
| 36 | - @param appid 从视讯云平台获取到的appId | ||
| 37 | - @param appkey 从视讯云平台获取到的appKey | ||
| 38 | - @warning 必须传参数 appid appkey | ||
| 39 | - @discussion 您在使用支付SDK所有功能之前,您必须先调用此方法初始化SDK。在App整个生命周期中,您只需要执行一次初始化。 | ||
| 40 | - | ||
| 41 | - @return 是否注册成功 | ||
| 42 | - */ | ||
| 43 | -- (BOOL) registerApp:(NSString *)appid AppKey:(NSString *)appkey; | ||
| 44 | - | ||
| 45 | - | ||
| 46 | -/** | ||
| 47 | - 注册微信支付(只有使用了微信支付才会使用到此方法) | ||
| 48 | - | ||
| 49 | - @param wxAppId 微信平台申请到的appId | ||
| 50 | - | ||
| 51 | - @return 是否注册成功 | ||
| 52 | - */ | ||
| 53 | -- (BOOL) registerWXApiWithWXAppId:(NSString *)wxAppId; | ||
| 54 | - | ||
| 55 | - | ||
| 56 | -/** | ||
| 57 | - 支付方法(微信, 支付宝) | ||
| 58 | - | ||
| 59 | - @param payArg 支付所需参数结构体; | ||
| 60 | - @param schemeStr 支付宝支付时需要的appScheme,需要与info配置的scheme对应;其他支付不需要可填nil; | ||
| 61 | - @param completionBlock 支付结果回调; | ||
| 62 | - @discussion 支付宝 客户端, 网页 支付结果回调都在此方法中的block回调中; | ||
| 63 | - 微信客户端支付结果回调在此方法中的block回调中; | ||
| 64 | - */ | ||
| 65 | -- (void)pay:(CNLivePayArg *)payArg appScheme:(NSString *)schemeStr completion:(CNLCompletionBlock)completionBlock; | ||
| 66 | - | ||
| 67 | - | ||
| 68 | -/** | ||
| 69 | - 支付方法(内购) | ||
| 70 | - | ||
| 71 | - @param payArg 支付所需参数结构体; | ||
| 72 | - @param isDebug 是否是测试环境,上线时务必改成NO;开发环境请填YES,内购支付会到沙盒环境下验证支付结果,验证成功才算支付成功,并且会给用户付款通知业务系统接收地址异步通知时返回参数 sandbox=1 后台可以此作为标记判断加不加商品;真实环境请填NO,内购支付会到真实环境下验证支付结果,验证成功才算支付成功; | ||
| 73 | - @param productId 内购时商品的ID,只有内购时用到,其他支付可传nil; | ||
| 74 | - @param completionBlock 支付结果回调; | ||
| 75 | - @discussion 内购支付结果回调在此方法中的block回调中; | ||
| 76 | - */ | ||
| 77 | -- (void)pay:(CNLivePayArg *)payArg isDebug:(BOOL)isDebug productId:(NSString *)productId completion:(CNLCompletionBlock)completionBlock; | ||
| 78 | - | ||
| 79 | - | ||
| 80 | -/** | ||
| 81 | - 处理支付渠道通过URL启动App时传递的数据 | ||
| 82 | - 在 appdelegate | ||
| 83 | - iOS 8.0 以前 | ||
| 84 | - - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation; | ||
| 85 | - iOS 9.0及以后 | ||
| 86 | - - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary *)options; | ||
| 87 | - 中实现此方法,否则支付结果回调无法实现; | ||
| 88 | - | ||
| 89 | - @param url 支付渠道在启动第三方应用时传递过来的URL | ||
| 90 | - | ||
| 91 | - @return 成功返回YES,失败返回NO; | ||
| 92 | - */ | ||
| 93 | -- (BOOL)handleOpenURL:(NSURL *)url; | ||
| 94 | - | ||
| 95 | -@end |
CNLivePaySDK.framework/Info.plist deleted
100644 → 0
No preview for this file type