lpw
1 days ago cb1edc584dd8de265779f253291184f935cf95c8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//
//  WAIPay.h
//  WASdkIntfUI
//
//  Created by GHW-T-01 on 16/3/1.
//  Copyright © 2016年 GHW-T-01. All rights reserved.
//
 
#import <Foundation/Foundation.h>
#import <StoreKit/StoreKit.h>
#import <WASdkIntf/WASubscriptionStatus.h>
 
@protocol WAInventoryDelegate,WAPaymentDelegate;
@interface WAIPay : NSObject
-(void)init4Iap;
-(void)queryInventory:(id<WAInventoryDelegate>)delegate;
-(void)payWithProductId:(NSString *)productId extInfo:(NSString *)extInfo delegate:(id<WAPaymentDelegate>)delegate;
-(void)paySub:(NSString *)subProductId extInfo:(NSString *)extInfo delegate:(id<WAPaymentDelegate>)delegate;
-(void)queryChannelProduct:(NSString *)channel
             callBackBlock:(void(^)(NSArray *channelProductsArray,NSError *error))callBackBlock;
-(BOOL)isPayServiceAvailable;
-(void)fetchProductInformations:(NSDictionary *)waProductIds inventoryDelegate:(id<WAInventoryDelegate>)delegate;
- (void)checkFinishTransactions;
-(SKProduct*)getCurrentProduct;
-(NSData*)getCurrentReceipt;
-(float)getReorderLimitTime;
-(void)payLog:(NSString *)logInfo;
-(void)startRunAppleTransactionObserve;
-(void)removeAppleTransactionObserve;
-(void)removeAppleTransactionObserve;
-(void)restore;
/// 恢复购买(收据刷新),完成后回调;成功 error 为 nil,失败为具体错误,主线程回调
- (void)restoreWithCompletion:(void(^)(NSError * _Nullable error))completion;
- (BOOL)isOpenRestore;
-(void)getSubStatus:(nullable NSString *)subProductId
                callBackBlock:(void(^)(NSArray<WASubscriptionStatus *> * _Nullable statusList, NSError * _Nullable error))callBackBlock;
- (void)hasSubOfferAccess:(nullable NSString *)subProductId
               completion:(void (^)(BOOL hasAccess, NSError * _Nullable error))completion;
- (BOOL)isOpenSubscription;
- (void)openSubscriptionManager:(void(^)(NSError *_Nullable error))callBackBlock;
- (void)presentCodeRedemptionSheet:(void(^)(NSError *_Nullable error))callback;
@end