commit | author | age
|
dcdc07
|
1 |
// |
W |
2 |
// WAPayProxy.h |
|
3 |
// WASdkIntfUI |
|
4 |
// |
|
5 |
// Created by GHW-T-01 on 16/3/1. |
|
6 |
// Copyright © 2016年 GHW-T-01. All rights reserved. |
|
7 |
// |
|
8 |
|
|
9 |
#import <Foundation/Foundation.h> |
|
10 |
#import "WAIPay.h" |
11ca32
|
11 |
@class WAIapProduct,WAIapResult,WAChannelProduct; |
dcdc07
|
12 |
|
W |
13 |
/*! |
|
14 |
@discussion 查询商品库存协议 |
|
15 |
- - - |
|
16 |
*/ |
|
17 |
@protocol WAInventoryDelegate <NSObject> |
|
18 |
@required |
|
19 |
/*! |
|
20 |
@abstract 查询成功 |
|
21 |
@param Inventory 是一个数组,保存着WAIapProduct类型的实例 |
|
22 |
*/ |
|
23 |
-(void)queryInventoryDidCompleteWithResult:(NSArray<WAIapProduct *>*)Inventory; |
|
24 |
/*! |
|
25 |
@abstract 查询失败 |
|
26 |
@param error 错误 |
|
27 |
*/ |
|
28 |
-(void)queryInventoryDidFailWithError:(NSError*)error; |
|
29 |
@end |
|
30 |
/*! |
|
31 |
@discussion 支付协议 |
|
32 |
- - - |
|
33 |
*/ |
|
34 |
@protocol WAPaymentDelegate <NSObject> |
|
35 |
/*! |
|
36 |
@abstract 支付成功 |
|
37 |
@param iapResult 支付结果 |
|
38 |
@param platform 支付平台 |
|
39 |
*/ |
|
40 |
-(void)paymentDidCompleteWithResult:(WAIapResult*)iapResult andPlatform:(NSString*)platform; |
|
41 |
/*! |
|
42 |
@abstract 支付失败 |
|
43 |
@param error 错误 |
|
44 |
@param platform 支付平台 |
|
45 |
*/ |
|
46 |
-(void)paymentDidFailWithError:(NSError*)error andPlatform:(NSString*)platform; |
|
47 |
@end |
|
48 |
|
|
49 |
/*! |
|
50 |
@discussion WAPayProxy 是支付模块的代理类。 |
|
51 |
- - - |
|
52 |
*/ |
|
53 |
@interface WAPayProxy : NSObject |
|
54 |
/*! |
|
55 |
@abstract 应用内支付初始化 |
|
56 |
*/ |
|
57 |
+(void)init4Iap; |
|
58 |
/*! |
|
59 |
@abstract 查询商品列表调用方法 |
962836
|
60 |
@param delegate 委托 |
dcdc07
|
61 |
*/ |
W |
62 |
+(void)queryInventoryWithDelegate:(id<WAInventoryDelegate>)delegate; |
11ca32
|
63 |
|
L |
64 |
/*! |
|
65 |
@abstract 查询渠道商品调用方法 |
|
66 |
@param callBackBlock 回掉 |
|
67 |
*/ |
|
68 |
+ (void)queryChannelProduct:(NSString *)channel |
|
69 |
callBackBlock:(void(^)(NSArray <WAChannelProduct *>*channelProductsArray,NSError *error))callBackBlock; |
|
70 |
|
|
71 |
|
dcdc07
|
72 |
/*! |
W |
73 |
@abstract 支付某个商品 |
|
74 |
@param productId 商品id |
|
75 |
@param extInfo 扩展信息 |
962836
|
76 |
@param delegate 委托 |
dcdc07
|
77 |
*/ |
W |
78 |
+(void)payWithProductId:(NSString*)productId extInfo:(NSString*)extInfo delegate:(id<WAPaymentDelegate>)delegate; |
|
79 |
/*! |
cf3302
|
80 |
@abstract 查询是否支持支付 |
537198
|
81 |
@return bool 是否支持支付 |
dcdc07
|
82 |
*/ |
cf3302
|
83 |
+(BOOL)isPayServiceAvailable; |
dcdc07
|
84 |
|
1417b8
|
85 |
+(void)payLog:(NSString *)logInfo; |
H |
86 |
|
11ca32
|
87 |
|
L |
88 |
|
dcdc07
|
89 |
@end |