cancel
Showing results for 
Search instead for 
Did you mean: 

how to get transaction Id via Java AIM

I am using Java and AIM integration method. 

 

After submit  AUTH ONLY transaction successfully, I couldn't get transaction ID ( I try to use transaction.getTransactionId()) which always return "".  Can somebody help me?

 

the code looks like below.

 

 

order = getOrder(myOrder);
CreditCard creditCard = getCreditCard(myCreditCard);

// create transaction
Transaction transaction = merchant.createAIMTransaction(TransactionType.AUTH_ONLY,
order.getTotalAmount());
// create customer
Customer customer = Customer.createCustomer();
customer.setFirstName(myCustomer.getFirstName());
customer.setLastName(myyCustomer.getLastName());
customer.setAddress(myOrder.getBillingStreetAddress());
customer.setCity(myOrder.getBillingCity());
customer.setState(myOrder.getBillingState());
customer.setZipPostalCode(myOrder.getBillingPostcode());

transaction.setCustomer(customer);
transaction.setOrder(order);
transaction.setCreditCard(creditCard);

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

String transactionId = transaction.getTransactionId()

 

loryhoush1
Member
2 REPLIES 2

BTW, I have changed my account to LIVE mode by Account ->Settings ->Test Mode, and x_rest_request= FALSE 

 

the whole request MAP looks like below:

 

 

{x_country=, x_delim_data=TRUE, x_fax=, x_tax_exempt=FALSE, x_city=Foster City, x_cust_id=, x_relay_response=FALSE, x_company=, x_version=3.1, x_address=sss, x_amount=21493.17, x_po_num=, x_last_name= , x_type=AUTH_ONLY, x_zip=94404, x_encap_char=, x_customer_ip=, x_tran_key=xxxxx, x_description=ORDER_DESCRIPTION, x_allow_partial_Auth=FALSE, x_phone=, x_state=CA, x_login=xxxxx, x_first_name= , x_test_request=FALSE, x_invoice_num=, x_delim_char=|, x_email=, x_line_item=30<|>African+Black+Soap<|>ORDER_ITEM_DESCRIPTION<|>2010.00<|>20079.90<|>FALSE}

 

loryhoush1
Member

Have figured how to get transaction ID