The amazing adventures of Doug Hughes

Archive for September, 2006

How Would You Bill Users?

This is a question I’d like to broadcast to the community in general. I have a client that wants to charge their users for their usage of their site, similar to how the phone company charges you for the usage of your phone line.

It’s actually somewhat similar to how Netflix charges their customers. If you start out with a one DVD subscription your monthly fee is $X. However, if you decided to add a DVD to your subscription they immediately charge you a prorated amount for the extra DVD and then, on your next billing cycle you start paying $Y.

The problem I’m running into is, really, the prorated fee. From what I can tell most gateways will let you change how much the user is charged on their schedule. However, I’m not sure how to charge the prorated amount.

The main problem is that we don’t want to store the user’s credit card information. My client is a small, one person, business. His server is colocated with a hosting provider. If we store the credit data, even if it’s encrypted, we don’t have the security expertise, much less time, to insure that it’s 100% secure.

Heck, with the best of intentions last week a server I work with frequently somehow had a rootkit installed on it! With root access to the server they could easily get the database and the description keys. What’s the point in that case of even encrypting the data?

We’re uncomfortable storing the credit information locally due to the potential of liability problems.

So, what I’d like to find is a service where I can store the credit card details outside of our system in someone else’s secure systems. I’d be happy to store an identifier for the card locally in the database. Then we could create our own process and system for charging the user against their stored credit details.

Anyone know of anything like this? I’m not having much luck finding anything. I’ve heard people refer to this as a “Vault”, but Googling hasn’t turned up much yet. Any other ideas?

When you can't revive a dead IIS process…

I use IIS 5.1 for development. Why? Well, I don’t know so much these days. It used to be because I planned to do some .NET development that never panned out. Anyhow, I use IIS.

What ticks me off about IIS is how from time to time it flakes out. When it does this all you can do is restart the service. But, approximately 229% of the time I get an error saying something akin to this:

Could not stop the IIS Admin service on local computer

Error 1053: The service did not respond to the start or control request in a timely fashion

Usually when this happens I’m forced to reboot.

So, today, after a little creative googling I found this link. This page describes the iisreset command! It turns out that restarting IIS when it craps out like this is as simple as opening a command prompt and typing this command:

iisreset localhost /restart

Of course, you’ll need to use the correct machine name in place of localhost.

Running this program will result in this output:

Attempting stop...
Internet services successfully stopped
Attempting start...
Internet services successfully restarted

After it’s done (which seems to take less time than using the services control panel to restart the services) IIS will work correctly again (till the next time it goes belly up).

Florida Vacation Auction Radio Spots

I just thought this was kinda cool: A year or so ago I announced one of my ventures, FloridaVacationAuction.com. We recently established a partnership with Visit Florida, Floridas official tourism marketing corporation. As part of the partnership a set of radio ads were produced one which relates directly to Florida Vacation Auction.

Just for posterity Ive published the radio spot here. You can listen to them in the attachments section below.

Heres a link to FloridaVacationAuction.com, and here’s one to VisitFlorida.com.

FVA Radio Spots

A Simple Bean Generator

For several years Ive had a little VB program I wrote to generate getters and setters for me. Ive often pondered releasing it out into the wild, but never really felt the need. Honestly, there are a lot of better code generators out there.

Today I decided to rewrite the generator using JavaScript. The end result is a very simple bean generator that can cut a lot of typing out of standard, cookie cutter beans.

Theres no flash or dash, just simple beans. The generator is here.

Breeze Presentation on Reactor for Toronto CFUG

The Toronto ColdFusion user group has invited me to speak to their group about Reactor tomorrow, September 6th. Seeing as I’m inconveniently in North Carolina, I’m forced to give my presentation over Breeze.

I’ll be covering the basics of Reactor including:

  • A quick review of ORM techniques
  • What Reactor is and isn’t
  • Supported database servers
  • The Reactor API (briefly)
  • Some examples (in code)
  • Getting Started / Resources
  • Questions and Answers

If you’re not in Toronto and want to see the presentation you can sit in at the following URL:

http://adobechats.adobe.breezecentral.com/cfugtorontomeeting1/

I’m the second of two presentations. The first presentation is by Edward Apostol on integrating Flex 2 and ColdFusion.

Doors open at 6:30pm EST. The show starts at 7:30 pm and I’m scheduled to speak at 8:30.

The Captcha Component Shares My Frustration

For quite a while now Ive been working on a new version of this website based on Model-Glue Unity. As a part of this update Im essentially rewriting the process by which users can add comments to blog entries.

Well, for the last hour or so Ive been battling a problem. After a new comment is posted I ask reactor for a query of all users subscribed to the entry so that I can send them an email notifying them of the new comment. I then want to include a view which will simply loop over the query and send out an email using the cfmail tag.

Heres the event handler for your reference:

<event-handler access="private" name="blog.subscribe">
    <broadcasts>
        <message name="modelglue.genericDelete">
            <argument name="object" value="EntrySubscription"/>
            <argument name="criteria" value="entryId,emailAddress"/>
        </message>
        <message name="modelglue.genericCommit">
            <argument name="object" value="EntrySubscription"/>
            <argument name="criteria" value="entryId,emailAddress"/>
        </message>
        <message name="NeedSubscribers"/>
    </broadcasts>
    <views>
        <include name="email" template="dspNotifySubscribers.cfm"/>
    </views>
    <results>
        <result anchor="commentForm" append="entryId" do="blog.viewEntry" preservestate="false" redirect="true"/>
    </results>
</event-handler>

Im honestly not sure why, but the system is sending me to the blog.viewEntry event before the dspNotifySubscribers.cfm is being included. I suspected that Unity ignores all views when the unnamed result is a redirect. To confirm this I set the redirect attribute to false and reran the event. Wonderfully the view was included, but unfortunately Im not being redirected as I wanted.

So, I decided to try to create another event handler which I would do my redirect. In other words, I changed the do attribute to run blog.goToViewEntry and redirect to false. I then wrote the blog.goToViewEntry event to do nothing but redirect to blog.viewEntry.

Theoretically this should have worked!

Did it? No!

Why? I dont know yet!

Does it matter? In the grand scheme of things, no.

But, as frustrated as I was, it was nice to see one thing

DangMG

As least the Captcha Component felt my pain.

Tag Cloud