NewiPhonePurchaseHelper.h 709 B

123456789101112131415161718192021222324252627282930313233
  1. //
  2. // NewiPhonePurchaseHelper.h
  3. // MingMen
  4. //
  5. // Created by 罗云飞 on 2017/4/27.
  6. // Copyright © 2017年 罗云飞. All rights reserved.
  7. //
  8. // 此类用于苹果内购
  9. #import <Foundation/Foundation.h>
  10. #import <StoreKit/StoreKit.h>
  11. @interface NewiPhonePurchaseHelper : NSObject<SKPaymentTransactionObserver,SKProductsRequestDelegate>
  12. /*!
  13. * @brief 苹果内购相关API封装
  14. * @author 罗云飞
  15. */
  16. + (instancetype)sharedInstance;
  17. // NOTE: 支付回调
  18. @property(nonatomic,copy)void (^NewiPhonePurchaseCallback)(NSString *string);
  19. // NOTE: 添加一个交易队列观察者
  20. - (void)setiPhonePurchase;
  21. // NOTE: 调用支付API
  22. - (void)iPhonePurchasePay:(NSDictionary *)orderDictionary;
  23. @end