Skip to content

Commit

Permalink
Update ApplePayViewController.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
stechiu authored Feb 13, 2025
1 parent d1c7b98 commit 7932c96
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Demo/Application/Features/ApplePayViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ class ApplePayViewController: PaymentButtonBaseViewController {

let paymentRequest = self.constructPaymentRequest(with: request)
// swiftlint:disable:next force_unwrapping
let paymentAuthorizationViewController = PKPaymentAuthorizationViewController(paymentRequest: paymentRequest)!
guard let paymentAuthorizationViewController = PKPaymentAuthorizationViewController(paymentRequest: paymentRequest) else {
self.progressBlock("Could not create PKPaymentAuthorizationViewController")
return
}
paymentAuthorizationViewController.delegate = self

if #available(iOS 16.0, *) {
Expand Down

0 comments on commit 7932c96

Please sign in to comment.