summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2022-08-12 12:40:03 +0200
committerAndrej Mihajlov <and@mullvad.net>2022-08-12 14:57:05 +0200
commit89a07ca483758789c0bb703aa87729016442111a (patch)
tree250bb0245bfb2fb8c8e8c2bd91b323b46fce5ecb
parent2d2aab3570a832f27afb211c37fee1e79e95edef (diff)
downloadmullvadvpn-89a07ca483758789c0bb703aa87729016442111a.tar.xz
mullvadvpn-89a07ca483758789c0bb703aa87729016442111a.zip
Do not show error when user cancels payment
-rw-r--r--ios/MullvadVPN/AccountViewController.swift8
1 files changed, 7 insertions, 1 deletions
diff --git a/ios/MullvadVPN/AccountViewController.swift b/ios/MullvadVPN/AccountViewController.swift
index 6bd0a50151..13e5122ea0 100644
--- a/ios/MullvadVPN/AccountViewController.swift
+++ b/ios/MullvadVPN/AccountViewController.swift
@@ -345,7 +345,13 @@ class AccountViewController: UIViewController, AppStorePaymentObserver, TunnelOb
accountToken: String?,
didFailWithError error: AppStorePaymentManager.Error
) {
- showPaymentErrorAlert(error: error)
+ switch error {
+ case .storePayment(SKError.paymentCancelled):
+ break
+
+ default:
+ showPaymentErrorAlert(error: error)
+ }
didProcessPayment(payment)
}