First off are there any GOTCHAS I should be aware of?
Here's a few off the top of my head.
Don't store the CC number in a DB ever. Maybe store the last 4 digits but only if you really need to.
Make sure that both the forms page and the processing page are SSL. Don't just have the forms page point to an HTTPS page. Put PHP code in each of those pages that checks the port number and redirects to SSL if they aren't already.
You shouldn't email order details to the site's owner. Make an SSL secured reports page that shows all the order details. It's ok to email the site's owner with a notice "Order #123 came in for $300 for a new pair of skis" but don't send the customer's name or address - or CC# 🙂
It's not a bad idea to install an intrusion detection system that gets MD5 scores of all the files on both the web site and the operating system. And if you do this, TEST IT. See what happens if you actually modify one of the critical files.
See if you can disable FTP. Use SSH and SCP if you can. If you have any code where users can upload their own files, triple check it for security holes.
Have a programmer (who is not you) check your site over for SQL injection weaknesses.
Think about whether or not there is any code on your site that you didn't write. This is a prime vector for attack. Are there any bulletin boards? Email forms scripts? If so, consider them a risk.
Second if any of the card providers decide to change security the developer is responsible for updating the system to accommodate for these changes.
Not if you write the contract carefully. 🙂 Make sure that you get to bill for future work. Changes to the protocol don't mean that you made a mistake. You are not responsible for the update because you aren't fixing something that you left broken.
Realistically speaking, In 12 years of integrating with payment gateways, I've never had one change protocols.
In my experience, when the site owner decides to accept a new card, this usually requires little more than adding it as an option to your HTML form.
Regarding the large list of possible responses from the gateway, I have found that most companies provide sample code that shows how to parse through the possible responses so it's less work than you expect. Treat the response you hear from the gateway as INPUT just as you would INPUT from a user. That is, assume the response is from a hacker and only trust input that matches the format you expect. For example, I once used ereg to scan the response for "ACCEPTED" to see if the credit card was accepted until I realized that the user could claim that their last name is "ACCEPTED" and the failed credit card transaction would mistakenly be considered good.