Files
JJBB/Sdk/iOS/YuCheng/ThirdLibs/FWPay/lib/FWInterface.h
2024-08-23 15:49:34 +08:00

69 lines
2.0 KiB
Objective-C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "FWParam.h"
@protocol FWInterfaceDelegate <NSObject>
@required
/*
支付的结果回调
payid: 单号
success: YES支付成功NO支付失败
message: 结果详细信息
*/
- (void)receiveResult:(NSString*)payid result:(BOOL)success message:(NSString*)message;
@optional
/**
@abstract Api版本的SDK返回通道信息
@param types 通道代码数组 1微信支付2支付宝支付3点卡支付4银联支付,QQ支付5百度支付6京东支付7
*/
- (void)receiveChannelTypes:(NSArray<NSNumber *>*)types;
@end
@interface FWInterface : NSObject
/*
@abstract 初始化接口
@params appIdAPP的唯一标识由凡伟提供
@params wxAppId在微信开放平台注册的WXAppId。
*/
+(void)init:(NSString *)appId useAPI:(BOOL)useAPI withWXAppId:(NSString *)wxAppId;
/**
@abstract API版本直接支付
@params controller 视图控制器
@params params 支付参数
@params type 通道代码数组 1微信支付2支付宝支付3点卡支付4银联支付,QQ支付5百度支付6京东支付7
@params delegate 支付回调的代理
*/
+ (void)start:(UIViewController *)controller withParams:(FWParam *)params withType:(NSUInteger)type withDelegate:(id<FWInterfaceDelegate>)delegate;
/*
启动接口
controller 视图控制器
params 支付参数
delegate 支付回调对象
推荐使用这种
*/
+(void)start:(UIViewController *)controller withParams:(FWParam*)params withDelegate:(id<FWInterfaceDelegate>)delegate;
/*
启动接口
controller 视图控制器
params 支付参数
delegate 支付回调对象
*/
+(void)start:(UIViewController *)controller withParams:(FWParam*)params withDelegate:(id<FWInterfaceDelegate>)delegate withView:(UIView*)view;
/*
选择通道下单
*/
+(void)selectChannel:(NSInteger)channelType;
/*
应用进入后台
*/
+(void)applicationWillEnterForeground:(UIApplication *)application;
@end