Files
peko-ios/YuMi/Tools/IAPHelper/XPIAPHelper.h
2023-07-14 18:50:55 +08:00

37 lines
810 B
Objective-C

//
// YMIAPHelper.h
// YUMI
//
// Created by YUMI 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