Unit tests with Authorize.net and ARB

Hey folks–

I’m using Authorize.net and their ARB (automatic recurring billing)
feature. I’m trying to write unit tests for the interface to make sure
that I can create/update/cancel subscriptions and also get proper errors
back.

I have a developer’s test account, so I can run in “Test” and “Normal”
mode without any ill effects.

In TEST mode, if I submit a valid create_subscription call, I get an
error:
E00009: The payment gateway account is in Test mode. The request cannot
be processed.

If I switch to NORMAL mode, and I submit a valid create_subscription,
this works just fine – the first time. Problem is, I want to do this
sort of thing multiple times, as is the nature with unit tests.

Unfortunately, I then get the error:
E00012: You have submitted a duplicate of Subscription 215771. A
duplicate subscription will not be created.

I suppose I can ‘cancel’ any subscription that has been successfully
created, but I’d prefer a better way to work this. Any suggestions?

I know this is more of an Authorize.net question, but their developer
support is pretty slow, so I thought I’d ask here for any experience
from this camp.

Cheers,
Jake

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs