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" |
|
11 |
@class WAIapProduct,WAIapResult; |
|
12 |
|
|
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; |
|
63 |
/*! |
|
64 |
@abstract 支付某个商品 |
|
65 |
@param productId 商品id |
|
66 |
@param extInfo 扩展信息 |
962836
|
67 |
@param delegate 委托 |
dcdc07
|
68 |
*/ |
W |
69 |
+(void)payWithProductId:(NSString*)productId extInfo:(NSString*)extInfo delegate:(id<WAPaymentDelegate>)delegate; |
|
70 |
/*! |
|
71 |
@abstract 查询是否某个支付平台 |
|
72 |
@param platform 支付平台 |
|
73 |
@return bool 是否支持某个支付平台 |
|
74 |
*/ |
|
75 |
+(BOOL)isPayServiceAvailableWithPlatform:(NSString *const)platform; |
|
76 |
|
|
77 |
@end |