1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee
react-native-alipay/ios/AlipaySDK.framework/Headers/AFServiceCenter.h

57 lines
1.9 KiB
C
Raw Permalink Normal View History

2020-07-07 20:10:43 +08:00
//
// AFServiceCenter.h
// AFServiceSDK
//
// Created by jiajunchen on 02/01/2018.
// Copyright © 2018 antfin. All rights reserved.
//
#import <Foundation/Foundation.h>
@class AFServiceResponse;
/**
SDK支持的业务枚举值
- AFServiceEInvoice:
- AFServiceAuth:
*/
typedef NS_ENUM(NSUInteger, AFService) {
AFServiceEInvoice,
AFServiceAuth,
AFServiceDeduct
};
extern NSString * const kAFServiceOptionBizParams; // 钱包服务调用入参
extern NSString * const kAFServiceOptionCallbackScheme; // 业务回跳当前app的scheme
extern NSString * const kAFServiceOptionNotUseLanding; // 不使用支付宝提示下载页做补偿,为true时需要商户自己处理用户未安装支付宝的情况
extern NSString * const kAFServiceBizParamsKeyUrl; // 独立签约入参url
typedef void(^AFServiceResultBlock)(AFServiceResponse *response);
@interface AFServiceCenter : NSObject
/**
@param service service, AFService枚举值
@param params Dictionary, key值详情参见kAFServiceOptionBizParamskAFServiceOptionCallbackScheme注释
@param block block, block参数是AFServiceResponse类型result属性获取,kAFServiceOptionNotUseLanding未设置为true,使H5landing页做补偿,block回调结果
*/
+ (void)callService:(AFService)service
withParams:(NSDictionary *)params
andCompletion:(AFServiceResultBlock)block;
/**
APP的URL
@param url URL
@param block blockblockblock只有在跳转钱包后,APP被系统回收的情况下回跳才生效
*/
+ (void)handleResponseURL:(NSURL *)url
withCompletion:(AFServiceResultBlock)block;
@end