Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jan 12th, 2008, 6:07 AM   #1
Trudge
Newbie
 
Join Date: Jan 2008
Location: North Bay Ontario
Posts: 0
Rep Power: 0 Trudge is on a distinguished road
Generating gift certificates

I need to create gift certificates in a web-based application for a client. My language of choice is Perl and I'm using MySQL already to track purchases for this client. So I will add another table to the DB to track them.

The scenario I have in mind is a visitor chooses which dollar value they want, and how many gift certificates they want of each value. After submitting the request I bring them to a confirmation button. Upon confirmation I add the 'request' to the DB with a unique ID and a 'status' field of 0 (for unfulfilled).

Upon confirmation they are sent to PayPal to make the payment. However, while there they can still back out of the purchase, thus the status field will remain 0.

Once they complete the purchase I return them to another script that updates the status for that ID to 1, indicating fulfilled.

Now I need to generate the certificate/s which the visitor can print out and bring to the store location or whatever.

My problem is how to stop the visitor from printing several copies of this page. I obviously need to generate a kind of session ID and pass it back to my return script, and maybe include it as part of the certificate (?) and make a list of confirmed requests available to my client somehow.

My client is not all that tech / web savvy and I'm not sure an Internet link is even available at his store location. So how can I confirm that 1 and only 1 gift certificate per ID was printed? This would be similar to generating coupons or tickets, and I'm hoping someone has gone through this and can provide some general ideas and traps to watch out for. CPAN doesn't seem to have anything ready made.

--
Amer Neely - Web Mechanic
"Others make web sites. We make web sites work!"
Trudge is offline   Reply With Quote
Old Jan 12th, 2008, 3:34 PM   #2
Wizard1988
Professional Programmer
 
Wizard1988's Avatar
 
Join Date: Oct 2005
Location: Chitown
Posts: 423
Rep Power: 4 Wizard1988 is on a distinguished road
Re: Generating gift certificates

You can't stop them from printing multiples, you can only check if a certificate has already been used or not, possibly how much money is left. You would have to check this at the store.
__________________

Wizard1988 is offline   Reply With Quote
Old Jan 12th, 2008, 4:15 PM   #3
Trudge
Newbie
 
Join Date: Jan 2008
Location: North Bay Ontario
Posts: 0
Rep Power: 0 Trudge is on a distinguished road
Re: Generating gift certificates

Thanks for the quick response. I've realized this could turn out to be a real bear, so I'm waiting to see if my client will settle for an alternative.
__________________
--
Amer Neely - Web Mechanic
"Others make web sites. We make web sites work!"
Trudge is offline   Reply With Quote
Old Jan 12th, 2008, 4:44 PM   #4
Wizard1988
Professional Programmer
 
Wizard1988's Avatar
 
Join Date: Oct 2005
Location: Chitown
Posts: 423
Rep Power: 4 Wizard1988 is on a distinguished road
Re: Generating gift certificates

Basically there needs to be a way to verify the certificates and their balances, otherwise users can simply create their own certificates.
__________________

Wizard1988 is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Generating a crossword puzzle Wizard1988 Java 3 Sep 17th, 2007 2:53 AM
generating character sequence Gumby Java 12 Jun 14th, 2006 8:46 AM
Confused about a random # generating tutorial. linuxpimp20 C 3 Dec 1st, 2005 1:12 PM
Generating prime and composite numbers saadmir C 5 Sep 9th, 2005 5:08 PM
problems with generating a random letter conbrio C 26 Jun 28th, 2005 12:09 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:05 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC