This commit is contained in:
2025-11-17 20:07:39 +08:00
parent ee433db4ad
commit 005e3c7581
43 changed files with 529 additions and 172 deletions

View File

@@ -42,12 +42,12 @@
__weak typeof(self) weakSelf = self;
[self.payVM applePayReqWithParams:params needShow:NO completion:^(NSInteger sta, NSString * _Nullable msg) {
[KBHUD dismiss];
[KBHUD showInfo:(sta == ERROR_CODE ? @"支付失败" : @"支付成功")];
[KBHUD showInfo:(sta == ERROR_CODE ? KBLocalized(@"Payment failed") : KBLocalized(@"Payment successful"))];
if (sta == SUCCESS_CODE) {
[[SKPaymentQueue defaultQueue] finishTransaction:transaction];
if (handler) handler(@"成功", nil);
if (handler) handler(KBLocalized(@"Success"), nil);
} else {
if (handler) handler(@"失败", nil);
if (handler) handler(KBLocalized(@"Failed"), nil);
}
(void)weakSelf; // keep self during block life if needed
}];
@@ -68,4 +68,3 @@
}
@end