Reply
Highlighted
Member
Posts: 4
Registered: ‎09-30-2013

C# The merchant login ID or password is invalid or the account is inactive

Hi.  I am using the following C# code against a live account which is in test mode and I continue to receive the "The merchant login ID or password is invalid or the account is inactive." message.  Could someone please explain what changes I need to make in order for this to work?  Thank you!

 

NameValueCollection collection = new NameValueCollection();
collection.Add("x_login", EncryptionUtility.DecryptData(authorize.ApiLoginId));
collection.Add("x_tran_key", EncryptionUtility.DecryptData(authorize.TransKey));
collection.Add("x_delim_data", "TRUE");
collection.Add("x_delim_char", "|");
collection.Add("x_relay_response", "FALSE");
collection.Add("x_type", "AUTH_CAPTURE");
collection.Add("x_method", "CC");
collection.Add("x_card_num", txtCardNumber.Text.Trim());
collection.Add("x_exp_date", expiration);
collection.Add("x_amount", "150.00");
collection.Add("x_description", desc);
collection.Add("x_first_name", txtFirstName.Text.Trim());
collection.Add("x_last_name", txtLastName.Text.Trim());
collection.Add("x_address", txtAddress1.Text.Trim());
collection.Add("x_state", cmbState.Text);
collection.Add("x_zip", txtZipCode.Text.Trim());
collection.Add("x_test_request", "FALSE");
var request = new AuthorizationRequest(collection);
var gate = new Gateway(collection.Get("x_login"), collection.Get("x_tran_key"), false);
var response = gate.Send(request);

 

 

Highlighted
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: C# The merchant login ID or password is invalid or the account is inactive

I would try putting in the apiLoginID and transactionKey directly first to make sure they are correct. Then check to see if the decryptdata method is working or not.

Highlighted
Member
Posts: 4
Registered: ‎09-30-2013

Re: C# The merchant login ID or password is invalid or the account is inactive

The problem was related to the apiLoginId and transactionKey.  I apologize for not checking this prior to posting.  Thank you very much for your assistance!