26 lines
737 B
Objective-C
26 lines
737 B
Objective-C
//
|
||
// IAPVerifyTransactionObj.h
|
||
// 将 Swift 内购验签逻辑迁移到 Objective-C
|
||
//
|
||
|
||
#import <Foundation/Foundation.h>
|
||
#import <StoreKit/StoreKit.h>
|
||
#import "FGIAPVerifyTransaction.h"
|
||
|
||
NS_ASSUME_NONNULL_BEGIN
|
||
|
||
FOUNDATION_EXPORT NSNotificationName const KBIAPDidCompletePurchaseNotification;
|
||
|
||
@interface IAPVerifyTransactionObj : NSObject <FGIAPVerifyTransaction>
|
||
|
||
/// 校验票据(StoreKit 2 入口)
|
||
/// - Parameters:
|
||
/// - receipt: Base64 编码的票据
|
||
/// - completion: 回调,success 表示验签成功,statusCode 为后端状态码
|
||
- (void)verifyReceipt:(NSString *)receipt
|
||
completion:(void (^)(BOOL success, NSString * _Nullable message, NSInteger statusCode))completion;
|
||
|
||
@end
|
||
|
||
NS_ASSUME_NONNULL_END
|