国内WASDK Apple实现层
hank
2018-09-14 eb8068cf69a2aa0eeab459f73c5bc7d1770ebcd5
commit | author | age
330f2f 1 //
H 2 //  GHWSDKPaymentTransactionHandler.h
3 //  GHWSdkUI
4 //
5 //  Created by wuyx on 15/8/19.
6 //  Copyright (c) 2015年 GHW-T-01. All rights reserved.
7 //
8
9 #import <Foundation/Foundation.h>
10 #import <StoreKit/StoreKit.h>
11
12 extern NSString *CACHE_KEY_PAYMENT_TRANSACTION;
13
14 @interface WAAPPaymentTransactionHandler : NSObject
15 @property(strong,nonatomic)NSMutableDictionary* unConsumeOrderList;
16 /**
17  *  将上报失败的订单保存到缓存中
18  *
19  *  @param skPaymentTransaction
20  *  @param status
21  */
22 +(void)saveCacheWithPaymentTransaction:(SKPaymentTransaction*)skPaymentTransaction andStatus:(int)status;
23
24
25 /**
26  *  通过skProduct 获取未消耗订单列表
27  *
28  *  @param skProduct
29  *
30  *  @return NSMutableArray
31  */
32 +(NSMutableArray*)getUnconsumeOrderListWithProduct:(SKProduct*)skProduct;
33
34 /**
35  *  处理未消耗订单
36  *
37  *  @param unComsumeList 未消耗订单列表
38  */
39 +(void)handleWithUnComsumeList:(NSArray*)unComsumeList;
40
41 /**
42  *  重试成功,移除未消耗订单
43  *
44  *  @param skPaymentTransaction
45  */
46 +(void)removeUncomsumeListWithPaymentTransaction:(SKPaymentTransaction *)skPaymentTransaction;
eadff8 47
H 48 +(BOOL)isInit;
330f2f 49 @end