The second way, works great. In the profile - orders, after the payment appears a link to the exam.
I think the variant of the first way also works and may be interesting if it is necessary that the secret page would be visible, but with a password.