Jump to content

Web Site Design Help - How to generate an email for order fulfillment


mpowers

Recommended Posts

Hi all.

 

I apologize if this has been asked many times before, but all my searches on this site did not result in any answers. I also read all the documentation and manuals I could find online for PHP but that didn't seem to help. FAQs did not address my questions either. So, I think I may be looking in the wrong places or not thinking of the right questions. Thanks in advance for any help to get me started on the right path!

 

I am looking for help on how to best design my web site to sell eBooks I have written. I have no problem with the HTML code as I have done many stateless web sites so the visual display is no problem.

 

However, I have not found any online shopping cart applications or credit card merchants that will take care of the product delivery in an affordable manner. So, I was hoping to code something simple myself that will still protect the product.

 

My eBooks are currently saved on my local machine as password protected PDF files. I could put those up on the web server if I can find a way to secure them so they are not easily seen or downloaded without the right security validation.

 

So, in relation to that, I have some very basic questions:

 

1. What is the best language to use to create scripts to run on the web server for generating emails to users that just purchased? PHP?

 

2. Can I store the ebooks in a protected folder on my web server so users can't see them, but still be able to send them out as an email attachment with a password to open the file, or send an email after purchase that gives them the password and a link to a secure part of my website?

 

3. Does anyone know of any script sample code for doing this kind of thing?

 

4. What info would I need back passed back from the credit card merchant and how should I handle it programmatically? (ex: name, email address, product code)

 

5. What other security measure should I take in coding, storage, etc?

 

6. Any other basic advice for me?

 

Again - I know it is annoying to deal with complete newbies, but I appreciate any help to point me in the right direction. Thank you all!

 

 

Link to comment
Share on other sites

1. What is the best language to use to create scripts to run on the web server for generating emails to users that just purchased? PHP?

 

There is no best language. You could do it in Perl, Python, Ruby, PHP, etc.

 

2. Can I store the ebooks in a protected folder on my web server so users can't see them, but still be able to send them out as an email attachment with a password to open the file, or send an email after purchase that gives them the password and a link to a secure part of my website?

 

The most secure would be to store the files above the document root. In that way you would never be able to access it directly through a browser. You can then serve it dynamically using PHP, or you could send it as an email attachment.

 

3. Does anyone know of any script sample code for doing this kind of thing?

 

I don't know if there is any readily available application that will do what you want, but you can see an example of dynamically serving a file here, and various library classes such as Zend_Mail or the ones you would find in PEAR will enable you to easily send MIME multi-part messages (which is what you need for attachments).

 

4. What info would I need back passed back from the credit card merchant and how should I handle it programmatically? (ex: name, email address, product code)

 

Strictly speaking you don't need any information other than whether the transaction was successful and a way to identify customers. Ideally you would store it in a database. Most shopping cart systems would ship with integration with a couple of CC processors.

 

5. What other security measure should I take in coding, storage, etc?

 

All the usual stuff should suffice. See this tutorial for instance: http://www.phpfreaks.com/tutorial/php-security

 

6. Any other basic advice for me?

 

I'm not sure what kind of advice you want, but make sure you read the following chapters of the manual: "Language Reference", "Features" and "Security".

 

You'd probably want to check out the existing shopping carts that are available. It's not the easiest type of application to start out with for a beginning programmer.

 

Again - I know it is annoying to deal with complete newbies, but I appreciate any help to point me in the right direction. Thank you all!

 

Not at all. Nobody has an innate knowledge in any fields. The annoying ones are the ones who don't bother to research themselves. Clearly you've done that.

Link to comment
Share on other sites

Thank you VERY much for your helpful reply.

 

I made a few attempts at PHP and I am glad to have learned a bit more about that language. In the end, my search resulted ironically in finding an affordable shopping cart vendor that did exactly what I needed.

 

So, in the event that anyone reads this post and has the same questions I did, I signed up with:

 

SHopping Cart Vendor: www.e-junkie.com

Cost:  $5/month

Service: And they do digital storage, delivery, and security of PDF docs.

 

Credit Card Vendor: www.2checkout.com

Cost: $49.95 setup fee + 5.5% of transaction +$0.45 per transaction.

 

Overall, that was worth it to me rather than to try to code everything myself.

 

Every other shopping cart vendor did not offer all the services I needed until I was on their Platinum or Gold plans at $200-$300 per month.

 

Anyway, thanks again!

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.