1
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#import "KBJfPay.h"
|
||||
#import "KBJfPayCell.h"
|
||||
#import "FGIAPProductsFilter.h"
|
||||
#import "FGIAPManager.h"
|
||||
static NSString * const kKBJfPayCellId = @"kKBJfPayCellId";
|
||||
|
||||
@interface KBJfPay () <UICollectionViewDataSource, UICollectionViewDelegateFlowLayout>
|
||||
@@ -61,7 +62,7 @@ static NSString * const kKBJfPayCellId = @"kKBJfPayCellId";
|
||||
@{ @"coins": @9990, @"price": @"$99.90" ,@"product_id" : @"100_coin" },
|
||||
@{ @"coins": @19990,@"price": @"$199.90" ,@"product_id" : @"100_coin" },
|
||||
];
|
||||
self.selectedIndex = 1; // 默认选中第二个,贴近截图
|
||||
self.selectedIndex = 0;
|
||||
|
||||
// 视图组装
|
||||
[self.view addSubview:self.myPointsTitleLabel];
|
||||
@@ -244,12 +245,18 @@ static NSString * const kKBJfPayCellId = @"kKBJfPayCellId";
|
||||
// }
|
||||
NSString *productId = @"com.yolo.vip.1month";
|
||||
/// 2.获取商品信息
|
||||
[KBHUD show];
|
||||
[self.filter requestProductsWith:[NSSet setWithObject:productId] completion:^(NSArray<SKProduct *> * _Nonnull products) {
|
||||
NSLog(@"=====");
|
||||
// if (products.count > 0) {
|
||||
// SKProduct *pro = productsp[0];
|
||||
// }
|
||||
// [[FGIAPManager shared].iap buyProduct:product onCompletion:^(NSString * _Nonnull message, FGIAPManagerPurchaseRusult result) { }];
|
||||
|
||||
/// 3.支付购买
|
||||
// [[FGIAPManager shared].iap buyProduct:products.firstObject onCompletion:^(NSString * _Nonnull message, FGIAPManagerPurchaseRusult result) {
|
||||
[[FGIAPManager shared].iap buyProduct:products.firstObject onCompletion:^(NSString * _Nonnull message, FGIAPManagerPurchaseRusult result) {
|
||||
// [self.view makeToast:message];
|
||||
// }];
|
||||
}];
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user