Forums | MacLife
You are not logged in.
#1 2002-12-23 1:06 pm
Selling stuff...
OK, I'm gonna be doing a website for a guy who wants to start of with just showcasing his stuff and then later on, when business picks up, start accepting credit cards and selling things via the same website.
How hard is it to do that. I can make things look pretty, but I've never done the back end like that before.
I'm gonna try and drive the site via PHP/MySQL because we'll want to make it easy to add designs and to make the products searchable.
So if I do set it up via PHP/MySQL, how hard would it be to then add the e-commerce back end? Should I set it up differently?
What's the best way I can do that?
I am open to just about anything so please suggest anything.
Offline
#2 2002-12-23 2:15 pm
Re: Selling stuff...
It's really not as difficult as people think.
A php/mySQL backend is just fine. Since you are building your site dynamic and the product base is in database, you most of the way there already. You really just need to is incorporate a way for customers to select the items the want to purchase (shopping cart).
You can do that a couple of ways. You can store everything in session variables which is the easiest. Or you can store the shopping information in the database, and use some sort identifier in a cookie. That method would allow them place items in the cart and they would still be there on a later visit.
The next part is the funds. It is sort of complex, but not from a code stand point. You need to have a secure cert, preferably on your sever under the same domain name. Otherwise you will have to approach the shopping cart a little different as cookies and sessions are not available on different domain names. (you can store it in the database and pass a session id to the secure page for example)
Next you will need to have a way to verify/transfer funds. You can use something like Verisign who has different options. One option is to use them to capture the sales and transfer the funds directly to your account. Another is to have them do everything and then transfer funds from them to you. Each method is a little different. If you opt do it through your bank account it will cost less, but there are more hoops to jump through as now your bank is dealing with cc transactions.
Most places like Verisign will try to sell you on their whole pack that usually includes some sort of turn key cart like Miva or something. While that is fine, it can be limiting as you are stuck with their package.
So that brings us back to your site. You have(or will have) a catalog built, and a cart system, so rather than installing some third-party package like Miva and reworking your site, opt to do it yourself.
What that entails is very simple. You will be given an account number and either some software or URLs. When a check out occurs, the data from the card page queries a remote server for a response. It will be either success or fail and you will just build a success page and a failure page which the provided package will redirect to. That's it. You control every step of the process with the exception of one point where you get a true/false from a remote server.
It usually works best to build your own, as it is line with your site objectives, you will know the entire process should there be problem and you aren't restricted by what another developer thinks in important. Also the turn key solutions tend to be feature bloated.
If you go that route, just make sure to read up on security first. Simple things often get overlooked. (like passing key data like price via hidden fields and such)
HTH,
Scott.
Offline
#3 2002-12-23 6:38 pm
Re: Selling stuff...
Wow, thanks for the info.
That explains a lot and takes the 'voodoo' edge off. Now that I know what needs to happen it doesn't seem like such a daunting task.
Thanks a lot.
Shawn
Offline
#5 2003-01-13 5:39 pm
Re: Selling stuff...
You don't want pass key data through hidden fields. Several problems can arise through that.
From the minor like storing the amount or items in your cart. User browses around and adds things to their cart and they are passed via hidden fields. (there was a hobby site that was like this.) If your browser caches, it will mess things up. Add several things to your cart, go back to static page you had visited before and cart is reset to what it was last time. Or worse items are removed from the cart, and a cached page re-adds them.
To the major
Offline
#6 2003-01-14 2:26 pm
- AudioKill
- Member
- From: somewhere past the blue shift
- Registered: 2001-12-24
- Posts: 235
Re: Selling stuff...
Scott, I can't thank you enough. I'm at the early stages of making a business site, and this thread has answered so many questions for me.
thanks 
We are the Music makers and we are the dreamers of the Dream - Willy Wonka
Offline
#7 2003-01-15 12:17 am
Re: Selling stuff...
Here are some of the problems with running CC transactions from your bank account...
In order to accept credit cards directly off your site, you'll need what's called a Merchant Account (Internet Merchant Account, I think...). You can get these from your bank, but sometimes getting approved is tricky, because of online fraud and the fact that if someone used an invalid credit card number, the CC company won't pay and the CC owner won't pay... so you'll have to.
I think that's right... good info Scott!
Basseq is me, John Whittet.
(Finishing the remainder of the thought expressed in the post has been left as an exercise for the reader.)
Offline
#8 2003-01-15 4:20 am
Re: Selling stuff...
Here are some of the problems with running CC transactions from your bank account...
In order to accept credit cards directly off your site, you'll need what's called a Merchant Account (Internet Merchant Account, I think...). You can get these from your bank, but sometimes getting approved is tricky, because of online fraud and the fact that if someone used an invalid credit card number, the CC company won't pay and the CC owner won't pay... so you'll have to.
Yes.
To accept CC to your bank account, you need a merchant account. It's the same type of account that any bricks business would have like a bookstore or restaurant. (several years back when I did my first ecommerce site, I got my account through my bank, and it came with a free CC scanner like the ones you see everywhere... I never did use it.)
From that point it varies bank to bank. Most have some sort of approval process or will only work with certain vendors. Once approved or setup or whatever your bank calls it, you will get routing numbers and such to tie it all together.
If you don't have a merchant account or are unable to get one, many hosts or services offer some sort of in-between solution. Verisign uses their Payflow Pro. It can act as the mercent account and just transfer the funds to a bank account. Bear in mind these type of services will make money usually with a monthly fee and a transaction fee. That way they are covered for light sales and make a bigger cut for heavy sales sites.
There is a weird balance to find, and you will just need to run a bunch of numbers. If you expect light sales, you will be paying like $50 - $100 bucks a month wether you sell anything or not. If you are going to be selling a ton of stuff, it would be worth it to avoid the transaction fee. You just have compare and project to find what works out best.
Scott.
Offline

