IAPManager.h 812 B

1234567891011121314151617181920212223242526272829
  1. //
  2. // IAPManager.h
  3. // jiaPei
  4. //
  5. // Created by 张嵘 on 2022/9/21.
  6. // Copyright © 2022 JCZ. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. NS_ASSUME_NONNULL_BEGIN
  10. typedef enum {
  11. IAPPurchSuccess = 0, // 购买成功
  12. IAPPurchFailed = 1, // 购买失败
  13. IAPPurchCancel = 2, // 取消购买
  14. IAPPurchVerFailed = 3, // 订单校验失败
  15. IAPPurchVerSuccess = 4, // 订单校验成功
  16. IAPPurchNotArrow = 5, // 不允许内购
  17. }IAPPurchType;
  18. typedef void (^IAPCompletionHandle)(IAPPurchType type,NSData *data, NSString *transactionIdentifier, BOOL isTest);
  19. @interface IAPManager : NSObject
  20. + (instancetype)shareIAPManager;
  21. - (void)startPurchaseWithID:(NSString *)purchID completeHandle:(IAPCompletionHandle)handle;
  22. @end
  23. NS_ASSUME_NONNULL_END