     // Set active payment result.
     paymentResult = result
     
+    // Reset payment handler status
+    paymentHandlerStatus = .started
+    
     // Deserialize payment configuration.
     guard let paymentRequest = PaymentHandler.createPaymentRequest(from: paymentConfiguration, paymentItems: paymentItems) else {
       result(FlutterError(code: "invalidPaymentConfiguration", message: "It was not possible to create a payment request from the provided configuration. Review your payment configuration and run again", details: nil))
       return
     }
     
-    // Display the payment selector with the resquest created.
+    // Display the payment selector with the request created.
     let paymentController = PKPaymentAuthorizationController(paymentRequest: paymentRequest)
     paymentController.delegate = self
     paymentController.present(completion: { (presented: Bool) in
-      if !presented {
+      if presented {
+        self.paymentHandlerStatus = .presented
+      } else {
         result(FlutterError(code: "paymentError", message: "Failed to present payment controller", details: nil))
       }
     })

class PaymentHandler: NSObject {
  
  /// Holds the current status of the payment process.
  var paymentStatus = PKPaymentAuthorizationStatus.failure
  
  /// Stores a reference to the Flutter result while the operation completes.
  var paymentResult: FlutterResult!

    // Return the result back to the channel
    self.paymentResult(String(decoding: paymentResultData, as: UTF8.self))
    
    paymentHandlerStatus = .authorized

    completion(PKPaymentAuthorizationResult(status: PKPaymentAuthorizationStatus.success, errors: nil))
  }
  
  func paymentAuthorizationControllerDidFinish(_ controller: PKPaymentAuthorizationController) {
    controller.dismiss {
      DispatchQueue.main.async {
        // There was no attempt to authorize.
        if self.paymentHandlerStatus == .presented {
          self.paymentResult(FlutterError(code: "paymentCanceled", message: "User canceled payment authorization", details: nil))
        }
        // Authorization started, but it did not succeed
        if self.paymentHandlerStatus == .authorizationStarted {
          self.paymentResult(FlutterError(code: "paymentFailed", message: "Failed to complete the payment", details: nil))
        }
      }
