I would like a script that automatically generates a new paypal button that can be inserted in to an ebook.
Basically, I will be giving away a free ebook that has the option at the end of it to buy something from me. When they buy, they will be sent to a download/thank you page. On the thank you page I would like a simple form text field in which they enter their PayPal email address. Once they press the submit button for their email address, I would like the script to automatically create a paypal button and insert it into the ebook. The person then needs to be given a unique link, so that when they send a visitor to my site, who then downloads the ebook....they are actually downloading the affiliates branded ebook with the affiliate paypal button in it, not mine. The paypal button also needs to redirect the customer back to my generic thank you page after successful payment.