looking for an idea

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
Unal
Forum Newbie
Posts: 1
Joined: Thu Aug 13, 2009 9:12 am

looking for an idea

Post 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.
izzy4505
Forum Newbie
Posts: 16
Joined: Tue Aug 11, 2009 1:38 pm

Re: looking for an idea

Post 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.
Post Reply