This commit is contained in:
2025-12-15 15:22:27 +08:00
parent 1f0bdb1bd4
commit 2620bd6845
4 changed files with 25 additions and 3 deletions

View File

@@ -8,6 +8,8 @@
#import "KBHUD.h"
//#import "KBLoginSheetViewController.h"
#import "KBBizCode.h"
NSString * const KBIAPDidCompletePurchaseNotification = @"KBIAPDidCompletePurchaseNotification";
@interface IAPVerifyTransactionObj ()
@property (nonatomic, strong) PayVM *payVM;
@end
@@ -41,10 +43,11 @@
__weak typeof(self) weakSelf = self;
[self.payVM applePayReqWithParams:params needShow:NO completion:^(NSInteger sta, NSString * _Nullable msg) {
// [KBHUD dismiss];
[KBHUD showInfo:(sta == !KBBizCodeSuccess ? KBLocalized(@"Payment failed") : KBLocalized(@"Payment successful"))];
// [KBHUD showInfo:(sta == !KBBizCodeSuccess ? KBLocalized(@"Payment failed") : KBLocalized(@"Payment successful"))];
if (sta == KBBizCodeSuccess) {
[[SKPaymentQueue defaultQueue] finishTransaction:transaction];
[KBHUD showSuccess:@"Success"];
[KBHUD showInfo:@"Success"];
[[NSNotificationCenter defaultCenter] postNotificationName:KBIAPDidCompletePurchaseNotification object:nil];
if (handler) handler(KBLocalized(@"Success"), nil);
}else if(sta == KBBizCodeReceiptError){
[[SKPaymentQueue defaultQueue] finishTransaction:transaction];