                         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
        })
    }
    

                        do {
                            self.pending3DSReceiptID = try self.threeDSecureWebView.load3DSWithPayload(userInfo)
                        } catch {
                            self.loadingView.stopAnimating()
                            self.completionBlock?(nil, error as? JudoError)
                        }
                        self.loadingView.actionLabel.text = kRedirecting3DSTitle
