diff --git a/modules/eway_integration_commerce/modules/eway_integration_commerce_dc/eway_integration_commerce_dc.module b/modules/eway_integration_commerce/modules/eway_integration_commerce_dc/eway_integration_commerce_dc.module
index 79c12bc..b841413 100644
--- a/modules/eway_integration_commerce/modules/eway_integration_commerce_dc/eway_integration_commerce_dc.module
+++ b/modules/eway_integration_commerce/modules/eway_integration_commerce_dc/eway_integration_commerce_dc.module
@@ -188,34 +188,39 @@ function eway_integration_commerce_dc_submit_form($payment_method, $pane_values,
     $form['#attached']['js'] = array(
       'https://secure.ewaypayments.com/scripts/eCrypt.js' => array(
         'type' => 'external',
-      ),
-    );
-    $form['#attached']['js'] = array(
-      'https://secure.ewaypayments.com/scripts/eCrypt.js' => array(
-        'type' => 'external',
         'scope' => 'footer'
       ),
-      drupal_get_path('module', 'eway_integration_commerce_dc') . '/js/eway_integration_commerce_dc.js' => array(
-        'type' => 'file',
-        'scope' => 'footer'
-      ),
-    );
-    // Add two temporary fields to save encryption code.
-    $form['credit_card']['eway_encrypt_number'] = array(
-      '#type' => 'hidden',
-      '#default_value' => ''
-    );
-
-    $form['credit_card']['eway_encrypt_code'] = array(
-      '#type' => 'hidden',
-      '#default_value' => '',
     );
+    foreach (array('number', 'code') as $key) {
+      $element =& $form['credit_card'][$key];
+      // Add data-eway-encrypt-name attributes to card number and CVN fields
+      $element['#attributes']['data-eway-encrypt-name'] = 'commerce_payment[payment_details][credit_card][' . $key . ']';
+      // Remove name attribute so values don't get submitted to Drupal
+      $element['#attributes']['name'] = '';
+      $element['#attributes']['value'] = '';
+      // Set #maxlength - 353 characters
+      $element['#maxlength'] = 512;
+      $element['#element_validate'][] = 'eway_integration_commerce_dc_encrypted_element_validate';
+    }
   }
-
   return $form;
 }
 
 /**
+ * Element validate callback: for encrypted fields.
+ */
+function eway_integration_commerce_dc_encrypted_element_validate($element, &$form_state) {
+  // Unset encrypted values from $form_state['input']
+  // Since we don't want it to show on any reloaded form
+  $credit_card_input = $form_state['input']['commerce_payment']['payment_details']['credit_card'];
+  foreach (array('number', 'code') as $key) {
+    if (isset($credit_card_input[$key])) {
+      unset($credit_card_input[$key]);
+    }
+  }
+}
+
+/**
  * Payment method callback: checkout form validation.
  */
 function eway_integration_commerce_dc_submit_form_validate($payment_method, $pane_form, $pane_values, $order, $form_parents = array()) {
@@ -231,12 +236,15 @@ function eway_integration_commerce_dc_submit_form_validate($payment_method, $pan
   module_load_include('inc', 'commerce_payment', 'includes/commerce_payment.credit_card');
 
   // Validate the credit card fields.
-  $settings = array(
-    'form_parents' => array_merge($form_parents, array('credit_card')),
-  );
+  // Unless client-side encryption is enabled since the values won't be valid
+  if (empty($payment_method['settings']['encryption'])) {
+    $settings = array(
+      'form_parents' => array_merge($form_parents, array('credit_card')),
+    );
 
-  if (!commerce_payment_credit_card_validate($pane_values['credit_card'], $settings)) {
-    return FALSE;
+    if (!commerce_payment_credit_card_validate($pane_values['credit_card'], $settings)) {
+      return FALSE;
+    }
   }
 }
 
diff --git a/modules/eway_integration_commerce/modules/eway_integration_commerce_dc/js/eway_integration_commerce_dc.js b/modules/eway_integration_commerce/modules/eway_integration_commerce_dc/js/eway_integration_commerce_dc.js
deleted file mode 100644
index 702458e..0000000
--- a/modules/eway_integration_commerce/modules/eway_integration_commerce_dc/js/eway_integration_commerce_dc.js
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * @file
- * module client-side js file.
- */
-
-(function ($, Drupal, window, document, undefined) {
-
-    Drupal.behaviors.eway_integration_commerce_dc = {
-        attach: function (context, settings) {
-            $("form#commerce-checkout-form-review #edit-continue").click(function (event) {
-                card_number = $('input[name*="[number]"]').val();
-                card_code = $('input[name*="[code]"]').val();
-                if (card_number) {
-                    $('input[name*="[eway_encrypt_number]"]').val(eCrypt.encryptValue(card_number));
-                }
-                if (card_code) {
-                    $('input[name*="[eway_encrypt_code]"]').val(eCrypt.encryptValue(card_code));
-                }
-            });
-        }
-    }
-
-})(jQuery, Drupal, this, this.document);
