37 lines
817 B
Objective-C
37 lines
817 B
Objective-C
//
|
|
// 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
|