How are you generting the random string
you should save the random string to the session:
$_SESSION['randomString'] = $randomString;
go to the bindings panel, click the plus button and select session, name it randomString to create the binding.
use the session binding in the store order summary behavior and any place else you want to refer to it.