1
This commit is contained in:
@@ -243,19 +243,21 @@ static NSString * const kKBJfPayCellId = @"kKBJfPayCellId";
|
||||
// NSString *msg = [NSString stringWithFormat:@"购买:%@ Coins %@", item[@"coins"], item[@"price"]];
|
||||
// [KBHUD showInfo:msg];
|
||||
// }
|
||||
NSString *productId = @"com.yolo.vip.1month";
|
||||
NSString *productId = @"com.loveKey.nyx.1day";
|
||||
/// 2.获取商品信息
|
||||
[KBHUD show];
|
||||
[self.filter requestProductsWith:[NSSet setWithObject:productId] completion:^(NSArray<SKProduct *> * _Nonnull products) {
|
||||
NSLog(@"=====");
|
||||
// NSLog(@"=====");
|
||||
// if (products.count > 0) {
|
||||
// SKProduct *pro = productsp[0];
|
||||
// }
|
||||
// [[FGIAPManager shared].iap buyProduct:product onCompletion:^(NSString * _Nonnull message, FGIAPManagerPurchaseRusult result) { }];
|
||||
|
||||
/// 3.支付购买
|
||||
SKProduct *product = products.firstObject;
|
||||
[[FGIAPManager shared].iap buyProduct:products.firstObject onCompletion:^(NSString * _Nonnull message, FGIAPManagerPurchaseRusult result) {
|
||||
// [self.view makeToast:message];
|
||||
[KBHUD dismiss];
|
||||
}];
|
||||
}];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user