diff --git a/commerce_cybersource.module b/commerce_cybersource.module
index 28a4809..cfa3ab2 100644
--- a/commerce_cybersource.module
+++ b/commerce_cybersource.module
@@ -503,27 +503,35 @@ function commerce_cybersource_soap_cc_submit_form_submit($payment_method, $pane_
     $transaction->currency_code = $charge['currency_code'];
     $transaction->payload[REQUEST_TIME] = $response;
 
-    // If we didn't get an approval response code...
-    if ($response->ccAuthReply->reasonCode != 100) {
-      // Create a failed transaction with the error message.
-      $transaction->status = COMMERCE_PAYMENT_STATUS_FAILURE;
-    }
-    else {
-      // Otherwise if we also captured successfully, mark this as a success.
-      if ($payment_method['settings']['credit_card']['transaction_type'] == COMMERCE_CREDIT_AUTH_CAPTURE &&
-        $response->ccCaptureReply->reasonCode == 100) {
-        $transaction->status = COMMERCE_PAYMENT_STATUS_SUCCESS;
-        $transaction->remote_status = COMMERCE_CREDIT_AUTH_CAPTURE;
+    // Make sure the response reason code is successful before attempting to
+    // check authorization and capture reason codes.
+    if ($response->reasonCode == 100) {
+      // If we didn't get an approval response code...
+      if ($response->ccAuthReply->reasonCode != 100) {
+        // Create a failed transaction with the error message.
+        $transaction->status = COMMERCE_PAYMENT_STATUS_FAILURE;
       }
       else {
-        // Or leave it pending.
-        $transaction->status = COMMERCE_PAYMENT_STATUS_PENDING;
+        // Otherwise if we also captured successfully, mark this as a success.
+        if ($payment_method['settings']['credit_card']['transaction_type'] == COMMERCE_CREDIT_AUTH_CAPTURE &&
+          $response->ccCaptureReply->reasonCode == 100) {
+          $transaction->status = COMMERCE_PAYMENT_STATUS_SUCCESS;
+          $transaction->remote_status = COMMERCE_CREDIT_AUTH_CAPTURE;
+        }
+        else {
+          // Or leave it pending.
+          $transaction->status = COMMERCE_PAYMENT_STATUS_PENDING;
 
-        // Store the transaction type with the timestamp so the request token can be
-        // reliably retrieved later for capturing.
-        $transaction->remote_status = COMMERCE_CREDIT_AUTH_ONLY . ':' . REQUEST_TIME;
+          // Store the transaction type with the timestamp so the request token can be
+          // reliably retrieved later for capturing.
+          $transaction->remote_status = COMMERCE_CREDIT_AUTH_ONLY . ':' . REQUEST_TIME;
+        }
       }
     }
+    else {
+      // If the api request response code is not successfull.
+      $transaction->status = COMMERCE_PAYMENT_STATUS_FAILURE;
+    }
 
     // Build a meaningful response message.
     $message = array(
@@ -547,8 +555,9 @@ function commerce_cybersource_soap_cc_submit_form_submit($payment_method, $pane_
     commerce_payment_transaction_save($transaction);
 
     // If the payment failed, display an error and rebuild the form.
-    if ($response->ccAuthReply->reasonCode != 100) {
-      drupal_set_message(t('We received the following error processing your card: @reason', array('@reason' => commerce_cybersource_reason_message($response->ccAuthReply->reasonCode))), 'error');
+    if ($response->reasonCode != 100 || $response->ccAuthReply->reasonCode != 100) {
+      $reason_code = empty($response->ccAuthReply->reasonCode) ? $response->reasonCode : $response->ccAuthReply->reasonCode;
+      drupal_set_message(t('We received the following error processing your card: @reason', array('@reason' => commerce_cybersource_reason_message($reason_code))), 'error');
       drupal_set_message('Please enter you information again or try a different card.', 'error');
       return FALSE;
     }
