Page 1 of 1

looking for an idea

Posted: Thu Aug 13, 2009 9:15 am
by Unal
Hi All,

I am developing a php website for a friend of mine who sells gift vouchers.

I am looking for a starting point to train myself by actually doing this application.

System requirements: Client will select the gift voucher from the online shop,fill the details that will be printed onto voucher(i.e. name etc.) pay it through paypal. Once the payment is received system will then create an image of the voucher and send them an e-mail with a downloadable image of the voucher they bought.

I would appreciate if you could give me some idea of how to develope this.

Re: looking for an idea

Posted: Thu Aug 13, 2009 9:21 am
by izzy4505
This would be a fairly simple application to write... just a bit time consuming. You'll need a database to store all of your order information. Use MySQL for this. Once your customer has finished filling out all the appropriate information for the gift voucher, send them to the PayPal URL for processing payments.

You should set your PayPal account up to use IPN, Instant Payment Notification. PayPal's IPN stuff is very detailed, but you can find it if you log in to their site. The script that receives IPN from PayPal should then generate this voucher and e-mail it over. If this voucher is to be printed, I recommend PDF. Google generating PDF with PHP and you'll find several good articles. Use PEAR's MIME class for sending the e-mail with attachments... it will save you a lot of time.

I'd make sure your vouchers have serial numbers. Printable coupons are always easy to generate without paying. You should also have a web accessible way for them to go and download the voucher, should your e-mail be too big or hit their spam filter.