Index: payment/uc_credit/uc_credit.module
===================================================================
--- payment/uc_credit/uc_credit.module	(revision 4882)
+++ payment/uc_credit/uc_credit.module	(working copy)
@@ -514,7 +514,7 @@ function uc_payment_method_credit($op, &
       $crypt = new uc_encryption_class;
 
       // Store the encrypted details in the session for the next pageload.
-      $_SESSION['sescrd'] = $crypt->encrypt($key, serialize($arg1->payment_details));
+      $_SESSION['sescrd'] = $crypt->encrypt($key, base64_encode(serialize($arg1->payment_details)));
 
       // Log any errors to the watchdog.
       uc_store_encryption_errors($crypt, 'uc_credit');
@@ -1211,7 +1211,7 @@ function uc_credit_cache($op, $data = NU
       $crypt = new uc_encryption_class;
 
       // Save the unencrypted CC details for the duration of this request.
-      $cc_cache = unserialize($crypt->decrypt($key, $data));
+      $cc_cache = unserialize(base64_decode($crypt->decrypt($key, $data)));
     }
     else {
       $cc_cache = $data;
