Multiple Authorize.NET API Logins

Delford Chaffin asked on August 29, 2014 01:49

I need to be able to use multiple Authorize.NET accounts based on who is selling a product. Has anyone had any luck doing this and/or does anyone have any examples or guidance on changing the creds during the checkout process?


Recent Answers

Michal Kadák answered on August 29, 2014 08:35


Authorize.NET provider supports different setting only per site, but you can create your own provider. Derive new provider from CMSAuthorizeNetProvider, override InitializePaymentRequest method and use credentials of your choice:

var error = base.InitializePaymentRequest(requestParams); requestParams["x_login"] = "my custom login"; requestParams["x_tran_key"] = "my custom key"; return error;

You can access cart object through ShoppingCartInfoObj property.

0 votesVote for this answer Mark as a Correct answer

Delford Chaffin answered on August 30, 2014 00:30

Thanks, but I think I'm still missing something. I saw the example here as well:

And I followed the guide on implementing this:

... and here is all that is in my class so far:

public override string InitializePaymentRequest(NameValueCollection requestParams)
    string siteName = CMSContext.CurrentSiteName;
    return String.Empty;

When I try to go through the checkout process, I get: The following errors have occurred.(13) The merchant login ID or password is invalid or the account is inactive.

These same API info works with the built-in provider, but not with my override.

0 votesVote for this answer Mark as a Correct answer

Michal Kadák answered on October 4, 2014 16:00


I am sorry for the delay. The code is correct, I've just tried the same thing and it works fine. Please double check the payment settings and the payment option gateway. You can debug the requestParams variable. It should contain your credentials after the base method call.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.