cancel
Showing results for 
Search instead for 
Did you mean: 

Java SDK - AIM transaction returns error 3_22

Hi,

 

I tried to use the Java SDK but failed.

What have I done so far?

1. Created a Sandbox account, and got login ID and transaction Key.

2. Used the following snippet:

String apiLoginID = "xxx"; // the login ID I got by creating the Sandbox
String transactionKey = "xxx"; // the transaction key I got by creating the Sandbox
Merchant merchant = Merchant.createMerchant(Environment.SANDBOX, apiLoginID, transactionKey);

CreditCard creditCard = CreditCard.createCreditCard();
creditCard.setCreditCardNumber("4012888818888");
creditCard.setExpirationMonth("12");
creditCard.setExpirationYear("2016");

Transaction transaction = merchant.createAIMTransaction(
        TransactionType.AUTH_ONLY, new BigDecimal(33.3));

transaction.setCreditCard(creditCard);

Result<Transaction> result = (Result<Transaction>)merchant.postTransaction(transaction);

The result is an error: RRC_3_22 and the text is: Not Found.

 

What am I doing wrong?

 

P.S.,

I noticed that the transaction created by merchant.createAIMTransaction(...) has no transaction ID (i.e., it is an empty string). Might that be a problem when posting it via merchant.postTransaction(...)?

If so, what do I need to do to get a valid transction ID when creating a transaction?

 

ohad
Member
4 REPLIES 4

RaynorC1emen7,
 
Thank you for your kind reply.
However, be sure that I've searched before posting a new thread, and indeed have come across seens this thread you were referring to. The thing is that the link to the "fixed" Environment.java file that appears in the referenced thread yields 404.
So,
1. Can this link be validated and shared?
2. Do you happen to know whether and when Authorize.net are planning on releasing it?
 
Cheers,
Ohad

 

Look like the branch got removed.

Do what the other person do and debug it to see what URL it posting to.

The url for sandbox should be https:/test.authorize.net

Also have you try getting to that url from a browser windows?

OK, I've found the fix in github.

As a workaround, I've used:

Environment.createEnvironment("https://test.authorize.net", "https://apitest.authorize.net", "https://test.authorize.net")

 Instead of:

Environment.SANDBOX

 This made the test pass.

 

Thanks for the tip, RaynorC1emen7.