* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * @copyright PayPal */ namespace PaypalAddons\classes\PUI; use Context; use Customer; use Validate; class FraudSessionId { /** * @param Customer|null $customer * * @return string */ public function buildSessionId($customer = null) { if (is_null($customer)) { $customer = Context::getContext()->customer; } if (false == Validate::isLoadedObject($customer)) { return ''; } $key = $customer->email . $customer->id . getmypid(); return md5($key); } }