I sell single-file ebooks and need a streamlined way to take a PayPal payment and immediately send the buyer two things by email: a secure download link to the ebook and a proper receipt for their records. Everything happens by email—no customer portal or third-party storefront—so the whole flow must trigger automatically as soon as PayPal confirms the transaction. What I’m after Once a customer clicks “Buy Now,” completes checkout through PayPal, and the payment is verified, your script or micro-service should: • Generate (or expose) a unique, time-limited download URL for the purchased ebook. • Compose an email that includes that link plus a clear receipt showing item, price, PayPal transaction ID, and my business details. • Send the message to the buyer’s PayPal email address and BCC me for bookkeeping. • Log the transaction in a simple CSV or lightweight database so I can track sales later. Technical notes I’m fine with PHP, Python, Node, or another lightweight stack as long as it runs on a standard shared host. Use PayPal’s IPN/webhook flow (PayPal is the only gateway required right now, though I’d like the code structured so additional gateways could be added later). The download link should expire after a configurable number of hours or clicks, and direct linking to the raw file must be impossible. Deliverables 1. Working code or script with clear setup instructions. 2. One email template (HTML + plain text fallback) ready for branding tweaks. 3. Brief README showing how to add or swap ebook files and adjust link expiry. I can provide server access and a PayPal sandbox account for testing. Let me know your preferred language and any questions so we can get this live quickly.