![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Jan 2008
Location: North Bay Ontario
Posts: 0
Rep Power: 0
![]() |
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!" |
|
|
|
|
|
#2 |
|
Professional Programmer
Join Date: Oct 2005
Location: Chitown
Posts: 423
Rep Power: 4
![]() |
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.
|
|
|
|
|
|
#3 |
|
Newbie
Join Date: Jan 2008
Location: North Bay Ontario
Posts: 0
Rep Power: 0
![]() |
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!" |
|
|
|
|
|
#4 |
|
Professional Programmer
Join Date: Oct 2005
Location: Chitown
Posts: 423
Rep Power: 4
![]() |
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.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
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 |