内购的逻辑
This commit is contained in:
36
xplan-ios/Base/Tool/IAPHelper/XPIAPHelper.h
Normal file
36
xplan-ios/Base/Tool/IAPHelper/XPIAPHelper.h
Normal file
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// XPIAPHelper.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/26.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef NS_ENUM(NSInteger ,PaymentStatus) {
|
||||
PaymentStatus_Purchasing = 1,//付款中
|
||||
PaymentStatus_Purchased, //付款操作已经完成
|
||||
PaymentStatus_Failed, //付款操作失败
|
||||
PaymentStatus_Deferred, //未知状态
|
||||
};
|
||||
|
||||
@protocol XPIAPHelperDelegate <NSObject>
|
||||
|
||||
///当前充值的状态
|
||||
- (void)rechargeProcessStatus:(PaymentStatus)status;
|
||||
|
||||
///充值成功回调id
|
||||
- (void)rechargeSuccess:(NSString *)transactionIdentifier;
|
||||
@end
|
||||
|
||||
@interface XPIAPHelper : NSObject
|
||||
+ (instancetype)shareHelper;
|
||||
///代理
|
||||
@property (nonatomic,weak) id<XPIAPHelperDelegate> delegate;
|
||||
///购买商品
|
||||
- (void)buyAppProductWithAppProductId:(NSString *)appProductId;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
Reference in New Issue
Block a user