This commit is contained in:
2025-12-12 14:46:38 +08:00
parent 3813974eae
commit 1eeeef266b
8 changed files with 230 additions and 56 deletions

View File

@@ -5,13 +5,17 @@
#import <Foundation/Foundation.h>
@class KBPayProductModel;
NS_ASSUME_NONNULL_BEGIN
/// 统一的支付回调sta 为状态码0 成功,非 0 失败msg 为后端返回的消息
typedef void(^KBPayCompletion)(NSInteger sta, NSString * _Nullable msg);
/// 统一状态码(与原 Swift 代码的 succCode / errorCode 语义一致
/// In-App 商品列表回调(返回 data 数组
typedef void(^KBPayProductsCompletion)(NSInteger sta,
NSString * _Nullable msg,
NSArray<KBPayProductModel *> * _Nullable products);
@interface PayVM : NSObject
@@ -22,7 +26,10 @@ typedef void(^KBPayCompletion)(NSInteger sta, NSString * _Nullable msg);
needShow:(BOOL)needShow
completion:(KBPayCompletion)completion;
/// 查询 type=in-app-purchase 的商品列表
- (void)fetchInAppProductsNeedShow:(BOOL)needShow
completion:(KBPayProductsCompletion)completion;
@end
NS_ASSUME_NONNULL_END