-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ApplePay Component cancel issue #517
Comments
Hey @zayar-supers Thanks for reaching out! The Quick questions:
|
@descorp Thanks for your confirmation on client key portion. The component is not dismiss and I only try to present component in this code as the sample.
|
aha! Unfortunately ApplePay does not dismiss itself from NavigationController's stack. there are few things you need to do:
private var applePayComponent: ApplePayComponent?
private func finish(with resultCode: PaymentsResponse.ResultCode) {
let success = resultCode == .authorised || resultCode == .received || resultCode == .pending
applePayComponent?.stopLoading(withSuccess: success) { [weak self] in
self?.dismiss {
// Do success flow
}
}
}
private func finish(with error: Error) {
let isCancelled = ((error as? ComponentError) == .cancelled)
self.dismiss {
if !isCancelled {
// Do nothing - user decided not to continue with ApplePay
} else {
// Do unsuccess flow
}
} |
@descorp Thanks for your sample snippet. My problem was the component did not persist. Now the issue is solved. 🍻 |
I used ApplePayComponent to pop up payment sheet controller and cannot cancel the payment by clicking Cancel button before authenticate the payment. Nothing is happening when I click Cancel button.
Another issue is when I click the upper area of the payment sheet at that time, the payment sheet disappears but the controller is still in view hierarchy when I debug the view hierarchy.
Can I able to check didFail delegate method will be called for the upper scenarios ?
Cause didFail delegate is not called upon my testing.
Is this possible to happen this kind of issues if I am using the improper client key for the ApplePayComponent ?
The iOS sdk version I used is the latest v3.8.5.
The text was updated successfully, but these errors were encountered: