Paul's Dev Blog – iGonzo.net

Might have been on the losing side. Still not convinced it was the wrong one.

Authorize.net and Classic ASP

with 2 comments

You know, a lot of people are moving off to other, cooler programming languages. PHP, ASP.NET, Ruby, all of these are seen as superior to Classic ASP; at one time the greatest language to use for dynamic data driven sites.

More often than I care to admit, I get asked “Why don’t you do it in [insert current language here] to do that? It’s easier”. True, but I have been using ASP for 11 years and am quite good at it if I do say so myself. Besides, as long as it can process XML, I see little reason to change our entire code base. Which brings me to the actual crux of this post: Using Classic ASP with Authorize.net.

More specifically, you can use any programming language with the Authorize API as long as you can process XML. But since I use primarily Classic ASP, that is what we have to use.

Authorize, in their wisdom, has seen fit to provide examples of accessing their API. One of these examples includes an ASP version. At first I totally ignored these, assuming that they could not accomplish what the client needed (which is integration with the Authorize CIM system). And so I toiled for many an hour creating functions and testing. Eventually I came across a problem I could not bull my way through, so I humbled myself and looked at their example code.

My first reaction was, of course, chagrin. Their ASP examples were performing functions that I needed. Precisely what I needed. *urg*. So, over the next 20 minutes, I functionalized their examples, added in our data points, and low and behold I got a positive response without any errors. I even tried to create errors and still the data went through.

Begin head banging on desk.

So then, after my headache went away, I grabbed every code example they had and was able to add in a whole mess of features and functions that not only added robustness to the site, but some serious value for the client. The transmission functions I created are able to take any form of XML request and sent it to Authorize and get a response back. After a quick check my reply data is added to the database and its on to the next thing: which for the client is making money (businesses are funny that way).

The lesson here, trolls and girls, is to not scoff at API example code. We can all look at the PDF of how to form this or that request, and what to expect back in response, but seeing a bit of sample code execute without errors is, in my opinion, a very uplifting thing to experience.

Now, if I can just figure out how this FBML crap, I think I’ll be golden.

Cheers

Written by iGonzo

November 5th, 2010 at 1:34 pm

2 Responses to 'Authorize.net and Classic ASP'

Subscribe to comments with RSS or TrackBack to 'Authorize.net and Classic ASP'.

  1. We run a youth sports league that has an old legacy ASP registration system that we used paypal with, but we would prefer use something like authorize.net. Are there any samples out there that show using a paynow button will work with our current system and update our access DB.

    Matt

    7 Feb 12 at 7:08 am

  2. Matt,
    I think that using Access is something that you should consider updating. I know that rebuilding a database is daunting but when options like MySQL are out there, updating now will save time later.
    As to the authorize.net integration, if you signup for a developer account (free at http://developer.authorize.net/) you will get access to all their testing scripts. I have not seen a Buy Now button, but I have not really been tasked with making one.
    They have a Simple Checkout option which would probably be your best bet. Still, there are requirements such as SSL, that you need to have before going live.
    Honestly, if the paypal option works for you, then stick with it. If you are expecting lots of transactions to come through, then you would want something more robust (and cheaper) to operate.
    If you have any questions let me know here or via the contact page.
    -Cheers, Paul

    iGonzo

    7 Feb 12 at 10:16 am

Leave a Reply