commit | author | age
|
d1f6ab
|
1 |
// |
H |
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 查询商品列表调用方法 |
2e0222
|
60 |
@param delegate 委托 |
d1f6ab
|
61 |
*/ |
H |
62 |
+(void)queryInventoryWithDelegate:(id<WAInventoryDelegate>)delegate; |
|
63 |
/*! |
|
64 |
@abstract 支付某个商品 |
|
65 |
@param productId 商品id |
|
66 |
@param extInfo 扩展信息 |
2e0222
|
67 |
@param delegate 委托 |
d1f6ab
|
68 |
*/ |
H |
69 |
+(void)payWithProductId:(NSString*)productId extInfo:(NSString*)extInfo delegate:(id<WAPaymentDelegate>)delegate; |
|
70 |
/*! |
d0b2df
|
71 |
@abstract 查询是否支持支付 |
47f8fd
|
72 |
@return bool 是否支持支付 |
d1f6ab
|
73 |
*/ |
d0b2df
|
74 |
+(BOOL)isPayServiceAvailable; |
d1f6ab
|
75 |
|
H |
76 |
@end |