Files
keyboard/keyBoard/Class/Vender/FGIAPService/FGIAPService.h

47 lines
1.3 KiB
C
Raw Normal View History

2025-11-13 19:20:57 +08:00
//
// FGIAPManager.h
// MaltBaby
//
// Created by FoneG on 2020/5/7.
//
#import <Foundation/Foundation.h>
#import <StoreKit/StoreKit.h>
#import "FGIAPVerifyTransaction.h"
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger, FGIAPManagerPurchaseRusult) {
FGIAPManagerPurchaseRusultSuccess = 0, //内购成功
FGIAPManagerPurchaseRusultHalfSuccess, //苹果扣款成功,但是验签接口失败了
FGIAPManagerPurchaseRusultFail, //内购失败
FGIAPManagerPurchaseRusultCancel //用户取消
};
typedef void(^FGIAPManagerBuyBlock)(NSString *message, FGIAPManagerPurchaseRusult result);
@interface FGIAPService : NSObject
/**
*
* @param verifyTransaction <verifyTransaction>
*/
- (instancetype)initWithTransaction:(id<FGIAPVerifyTransaction>)verifyTransaction;
/**
* iap支付
* @param product
* @param completion
*/
- (void)buyProduct:(SKProduct *)product onCompletion:(FGIAPManagerBuyBlock)completion;
/**
* App Store下载页面触发的内购行为
*/
- (void)tryShouldAddStorePayments;
@end
NS_ASSUME_NONNULL_END