123456789101112131415161718192021222324252627282930313233343536373839404142 |
- //
- // XYPayManager.h
- // Starbuds
- //
- // Created by 翟玉磊 on 2020/1/19.
- // Copyright © 2020 翟玉磊. All rights reserved.
- //
- #import <Foundation/Foundation.h>
- NS_ASSUME_NONNULL_BEGIN
- /// 支付成功回调
- typedef void(^PayHelplerSuccessBlock)(NSInteger payType);
- /// 支付失败回调 payType如果是999则说明创建支付订单就失败了没有获取到支付信息
- typedef void(^PayHelplerFailureBlock)(NSInteger payStatus, NSString *message, NSInteger payType);
- @interface XYPayManager : NSObject
- // 默认1星芽 2稀客
- @property (nonatomic, assign) NSInteger appType;
- /// 回去订单支付信息和支付参数
- /// @param orderId 订单Id
- /// @param payType 支付方式 101苹果支付 201支付宝 301微信
- /// @param itemId 商品id
- /// @param successHandler 请求成功
- /// @param failureHandler 请求失败
- - (void)addPayOrderWithOrderId:(NSString *)orderId payType:(NSInteger)payType itemId:(NSString *)itemId successHandler:(nonnull PayHelplerSuccessBlock)successHandler failureHandler:(nonnull PayHelplerFailureBlock)failureHandler;
- /// 调用支付SDK
- /// @param orderId 订单Id
- /// @param payType 支付方式 101苹果支付 201支付宝 301微信
- /// @param itemId 商品id
- /// @param payParams 支付参数
- /// @param successHandler 请求成功
- /// @param failureHandler 请求失败
- - (void)starPayWithOrderId:(NSString *)orderId payType:(NSInteger)payType itemId:(NSString *)itemId payParams:(NSString *)payParams successHandler:(nonnull PayHelplerSuccessBlock)successHandler failureHandler:(nonnull PayHelplerFailureBlock)failureHandler;
- @end
- NS_ASSUME_NONNULL_END
|