123456789101112131415161718192021222324252627282930313233343536373839404142 |
- //
- // KDIAPManager.h
- // KDChat
- //
- // Created by JYJ on 2019/6/14.
- // Copyright © 2019 dcjf. All rights reserved.
- //
- #import <Foundation/Foundation.h>
- typedef NS_ENUM(NSUInteger,IAPResultType) {
- IAPResultSuccess = 0, // 购买成功
- IAPResultFailed = 1, // 购买失败
- IAPResultCancle = 2, // 取消购买
- IAPResultVerFailed = 3, // 订单校验失败
- IAPResultVerSuccess = 4, // 订单校验成功
- IAPResultNotArrow = 5, // 不允许内购
- IAPResultIDError = 6, // 项目ID错误
- };
- typedef void(^IAPCompletionHandle)(IAPResultType type, NSData *data);
- @interface KDIAPManager : NSObject
- + (instancetype)shareIAPManager;
- /** 检测客户端与服务器漏单情况处理*/
- + (void)checkOrderStatus;
- /**
- 开启内购
-
- @param productID 内购项目的产品ID
- @param handle 内购的结果回调
- */
- - (void)startIAPWithOrderId:(NSString *)orderId productID:(NSString *)productID completeHandle: (IAPCompletionHandle)handle;
- @end
|