                         self.paymentEnabled(false)
                     } else {
                         self.completionBlock?(nil, error)
+                        self.loadingView.stopAnimating()
                     }
                 } else if let response = response {
                     self.completionBlock?(response, nil)
+                    self.loadingView.stopAnimating()
                 }
-                self.loadingView.stopAnimating()
             })
             
         } catch let error as JudoError {

        }
        UIView.animateWithDuration(0.5, animations: { () -> Void in
            self.threeDSecureWebView.alpha = alphaVal
        })
    }
    

            }
            
            if let receiptID = self.pending3DSReceiptID {
                if self.transactionType == .RegisterCard {
                    self.loadingView.actionLabel.text = kVerifying3DSRegisterCardTitle
                } else {
                    self.loadingView.actionLabel.text = kVerifying3DSPaymentTitle
                }
                self.loadingView.startAnimating()
                self.title = kAuthenticationTitle
                self.pending3DSTransaction?.threeDSecure(results, receiptID: receiptID, block: { (resp, error) -> () in
