Updated models for encryption.

This commit is contained in:
James Cole
2015-05-23 08:46:46 +02:00
parent 1c2cbd5b40
commit f05002c729
10 changed files with 221 additions and 25 deletions

View File

@@ -145,9 +145,7 @@ class Account extends Model
return Crypt::decrypt($value);
}
// @codeCoverageIgnoreStart
return $value;
// @codeCoverageIgnoreEnd
}
@@ -228,7 +226,7 @@ class Account extends Model
// save in cents:
$value = intval($value * 100);
$this->attributes['virtual_balance_encrypted'] = Crypt::encrypt($value);
$this->attributes['virtual_balance'] = 0;
$this->attributes['virtual_balance'] = ($value / 100);
}
/**