cancel
Showing results for 
Search instead for 
Did you mean: 

Void not working - AIM Java - Valid referenced transaction ID required

Hi,

 

I am using AIM with Java to integrate, and am getting the following error whenever I try to process a void:

'A valid referenced transaction ID is required.'

 

As far as I can tell, I am submitting this information correctly.

 

        Transaction voidTransaction = merchant.createAIMTransaction(TransactionType.VOID, null);
        voidTransaction.setCreditCard(creditCard);
        voidTransaction.setTransactionId(transactionId);

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

 

The id being submitted is a 10-digit numeric in the form of a String (eg, "2168106867")

I have also tried putting the amount of the prior charge instead of null, with no different result.

 

If it makes any difference, here are the related bits for the setup:

 

        creditCard = CreditCard.createCreditCard();
        creditCard.setCardType(getCardType(cardNum));
        creditCard.setCreditCardNumber(cardNum);
        creditCard.setExpirationMonth(expMonth);
        creditCard.setExpirationYear(expYear);

        Merchant merchant = Merchant.createMerchant(Environment.SANDBOX,
            apiLoginID, transactionKey);
        merchant.setDeviceType(net.authorize.DeviceType.PERSONAL_COMPUTER_BASED_TERMINAL);
        merchant.setMarketType(net.authorize.MarketType.RETAIL);

 

Thanks in advance for any help.

 

 

morgan_code
Member
1 ACCEPTED SOLUTION

Accepted Solutions

Try, not sure if it will work. And yes, same for linked credit.

 

voidTransaction.setMerchantDefinedField("x_ref_trans_id", "yourtransactionID");


View solution in original post

6 REPLIES 6
TJPride
Expert

As far as I can tell, it's live mode, on my developer account.  I get 'real' transaction IDs back, not zeros. It's not working on the client's production account in live mode either.

 

I did try changing the Merchant invocation parameter to Environment.PRODUCTION, but that resulted in '0' being returned for the transaction IDs of the charges.

 

Thanks.

 

 

 

 

RaynorC1emen7
Expert

How do I set that field?  Would the same be true for a linked credit?

 

Thanks!

 

Try, not sure if it will work. And yes, same for linked credit.

 

voidTransaction.setMerchantDefinedField("x_ref_trans_id", "yourtransactionID");


Thanks very much.  It works fine for a void-- can't test an unlinked credit without a Production account.

 

I appreciate your help!