XYAppStorePayHelpler.h 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. //
  2. // XYAppStorePayHelpler.h
  3. // Starbuds
  4. //
  5. // Created by 翟玉磊 on 2020/1/18.
  6. // Copyright © 2020 翟玉磊. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. NS_ASSUME_NONNULL_BEGIN
  10. /// 支付成功回调
  11. typedef void(^PayHelplerSuccessBlock)(NSInteger payType);
  12. /// 支付失败回调 payType如果是999则说明创建支付订单就失败了没有获取到支付信息
  13. typedef void(^PayHelplerFailureBlock)(NSInteger payStatus, NSString *message, NSInteger payType);
  14. @interface XYAppStorePayHelpler : NSObject
  15. /// 回去订单支付信息和支付参数
  16. /// @param orderId 订单Id
  17. /// @param payType 支付方式 101苹果支付 201支付宝 301微信
  18. /// @param itemId 商品id
  19. /// @param successHandler 请求成功
  20. /// @param failureHandler 请求失败
  21. - (void)addPayOrderWithOrderId:(NSString *)orderId payType:(NSInteger)payType itemId:(NSString *)itemId successHandler:(nonnull PayHelplerSuccessBlock)successHandler failureHandler:(nonnull PayHelplerFailureBlock)failureHandler;
  22. /// 检查苹果支付成功没有校验的订单
  23. /// 在启动APP和进入充值界面调用
  24. + (void)checkAppStorePaySuccessNoValidationOrders;
  25. @end
  26. NS_ASSUME_NONNULL_END