Seriously? This has been answered several hundred times. Don't listen to ANYBODY with a post count below 20. They are new here which means they don't know jack shit. Just a little heads up.
Anywayz...
YOU CANNOT MAKE ANY FORM OF CODE GENERATOR AT ALL. GET THE STUPID THOUGHT OUT OF YOUR HEAD!
Codes are NOT active until purchase and then are removed from the database after redemption. Go take a look at ANY card from ANY company at the store. The card will clearly say "Not activated until purchase."
Therefore, how in God's name are you going to be able to activate a code that is non existent.
Now have a nice day.