Skip to content

Commit

Permalink
revert cancel handling instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
KunJeongPark committed Nov 10, 2024
1 parent d047ffe commit 7e99123
Showing 1 changed file with 4 additions and 26 deletions.
30 changes: 4 additions & 26 deletions v2_MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,7 @@ class MyViewController {
// payment successful
handleSuccess(result)
} catch {
switch error {
// separate handling of cancel error if needed
case CardClientError.threeDSecureCanceled:
handleCancellation()
default:
handleError(error)
}
handleError(error)
}
}
}
Expand All @@ -125,13 +119,7 @@ class MyViewController {
// Payment successful
handleSuccess(result)
} catch {
switch error {
// separate handling of cancel error if needed
case PayPalWebCheckoutClientError.checkoutCanceled:
handleCancellation()
default:
handleError(error)
}
handleError()
}
}
}
Expand Down Expand Up @@ -169,12 +157,7 @@ func processPayment() {
removeLoadingIndicator()

if let error = error {
switch error {
case CardClientError.threeDSecureCanceled:
handleCancellation()
default:
handleError(error)
}
handleError()
return
}

Expand All @@ -194,12 +177,7 @@ func processPayment() async {
let result = try await cardClient.approveOrder(request: cardRequest)
handleSuccess(result)
} catch {
switch error {
case CardClient.threeDSecureCanceled:
handleCancellation()
default:
handleError(error)
}
handleError()
}
}
```

0 comments on commit 7e99123

Please sign in to comment.