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.
Solved! Go to Solution.
01-11-2012 01:47 PM
Try, not sure if it will work. And yes, same for linked credit.
voidTransaction.setMerchantDefinedField("x_ref_trans_id", "yourtransactionID");
01-11-2012 02:23 PM
Are you running in test mode or live mode?
01-11-2012 01:57 PM
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.
01-11-2012 02:03 PM
For CP it x_ref_trans_id, so it might not work with the SDK
01-11-2012 02:07 PM
How do I set that field? Would the same be true for a linked credit?
Thanks!
01-11-2012 02:13 PM
Try, not sure if it will work. And yes, same for linked credit.
voidTransaction.setMerchantDefinedField("x_ref_trans_id", "yourtransactionID");
01-11-2012 02:23 PM
Thanks very much. It works fine for a void-- can't test an unlinked credit without a Production account.
I appreciate your help!
01-11-2012 02:30 PM