that.dork.jordan
Testing failed transactions with Authorize.net’s CIM and AIM APIs

I’ve been working on a checkout page for Social Sonar (check the site out if you have or know of a business that needs social media help!) and most of building a checkout is old news, but one thing is always a major pain: testing the credit card processing. There are a thousand docs telling you how to test a successful transaction, but what about declined transactions! *chirp chirp*

I’m putting this here partially so I have a place to refer back to in however many months when I end up having to do this again, and partially hoping that the next person who runs into this doesn’t have so much trouble. These are some things I learned while integrating with Authorize.net using the Authorize Sauce Python library:

  • You can test different transaction statuses by using the card number 4222-222-222-222 by providing special dollar values. Yes, that is a 13 digit, not a 16 digit card number.
  • If you are testing the CIM API, the API that allows you to store a credit card on Authorize.net’s servers and then charge it later using a token they give you, the dollar values are difficult to find. That’s why I’m including them right here.
  • If you are testing the AIM API, the API that requires you to post the full credit card number with every transaction, the dollar values are pretty simple. Whatever response reason code you want returned, charge that as the whole dollar amount. For example, if you want to test out a duplicate transaction, charge $11.00. The response reason codes are here.
  • Most libraries will not allow you to use 4222-222-222-222 as a credit card number. It doesn’t pass LUHN, and some code might notice the 4, expect a Visa, and not allow a 13 digit card number. You’ll have to work around this unfortunately. I added some code that looks for this card number and if it’s in test mode, it allows it. The code is ugly, so I’m not releasing a patch for anything.
  • You cannot do this if x_test_request is Y.
Share
I need this

Someone buy this for me?

Beautiful-house.jpg

Share
Android ice cubes!

I bought these, can’t wait to have whiskey on the droids!

Android-Ice-Cube-Trays.jpg

Share
Lynx cub

AWWWWWW

Lynx-Cub-and-Mother.jpg

Share
Llamas vs. Alpacas

I. Love. Alpacas.

Llamas-vs.-Alpacas.png

Share
A data center in international waters?

Cool story about a failed data center in international waters.

Share
The value of Aunt Marie

This blog is generally about politics, men, music, and technology. It’s not very often that I stray from that to write anything personal. I need to tell a story that is hugely important to me, and although it occurred a very long time ago, it really has had a profound effect on shaping me as a person.

My Aunt Marie was not a person that I knew terribly well. I could count the number of times I met her on my hands. I also haven’t seen her since 2005; so it’s all the more remarkable that her passing today was able to inspire so much emotion in me.

I must have been well under ten years old. My immediate family took a trip to central New York to visit the bigger Bouvier clan. It’s a tremendous family on my father’s side; he’s the youngest of ten children, and the various aunts, uncles, cousins, and their children are incredibly well dispersed. I don’t remember the occasion, but I know a lot of my extended family was there.

My dad is a funny man. He wields his machismo in such a humorous manner that it completely erases any chance of him seeming intimidating. Let me provide an example so you can see what I mean; trust me, it’s on topic.

Aunt Marie had a fabulous back yard. Her house was in the woods and in the back yard was a tiny lake. Okay, it was probably just a large pond, but I was very small so it, in turn, seemed very big. Aunt Marie would feed the fish in that pond so regularly that the fish were not at all afraid of humans. I feel horrible now that my first fishing expedition was in this lake, I was catching her pets! I, of course, had no clue at the time, so really I should be expunged of any guilt.

So dad decides to impress me and the rest of the crowd by literally catching a fish. No, not casting a line and getting one to bite. He stuck his hand into the water, wrapped his fingers around a fish, and picked it up. Quite the achievement! My dad was a hero to me. Unfortunately for him, that fish was something sharp, and it cut his hand right up. My father lost the battle with the fish, but he won the war of awing me.

The point is Aunt Marie just loved everyone and everything. She loved the fish enough to feed them. She loved us enough to let us hunt her pond. The love that she shared had no borders. It was there for all takers, and we all took and are better for it.

When we had to leave her house, I did the most curious thing for a little future-gay to do. I tried to climb in the cupboards. It takes a lot of love to make a homosexual enjoy being in a closet, but I didn’t ever want to leave her palace. I wanted to pick blackberries and pet the deer in her back yard.

I’m lucky to have a family that is filled with examples like Aunt Marie. People who are joyous, welcoming, and most of all loving. If there’s one thing I’ll carry from this it is that when you love all things, all things love you. There is no greater legacy to be had.

Share