diff --git a/Model/Service/TransactionHandlerService.php b/Model/Service/TransactionHandlerService.php
index <HASH>..<HASH> 100755
--- a/Model/Service/TransactionHandlerService.php
+++ b/Model/Service/TransactionHandlerService.php
@@ -337,11 +337,12 @@ class TransactionHandlerService
                     $parentTransaction->setIsClosed(0);
                     $parentTransaction->save();
                 }
+                else {
+                    // Close the parent transaction
+                    $parentTransaction->close();                    
+                }
             }
 
-            // Close the parent transaction
-            $parentTransaction->close();
-
             // Save the data
             $this->payment->save();
             $this->transaction->save();
Updated the transaction state handling for voided payments