2
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user