// // WAIPay.h // WASdkIntfUI // // Created by GHW-T-01 on 16/3/1. // Copyright © 2016年 GHW-T-01. All rights reserved. // #import #import #import @protocol WAInventoryDelegate,WAPaymentDelegate; @interface WAIPay : NSObject -(void)init4Iap; -(void)queryInventory:(id)delegate; -(void)payWithProductId:(NSString *)productId extInfo:(NSString *)extInfo delegate:(id)delegate; -(void)paySub:(NSString *)subProductId extInfo:(NSString *)extInfo delegate:(id)delegate; -(void)queryChannelProduct:(NSString *)channel callBackBlock:(void(^)(NSArray *channelProductsArray,NSError *error))callBackBlock; -(BOOL)isPayServiceAvailable; -(void)fetchProductInformations:(NSDictionary *)waProductIds inventoryDelegate:(id)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 * _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