Reply
Highlighted
Member
Posts: 2
Registered: ‎02-18-2012

What if my server goes down after sending request to Authorize.Net

Hi,
          I am using AIM for the integration.

 

Please help to handle this case in my application.

 

  1. My server sent a purchase(AUTH_CAPTURE) transaction request to Authorize.Net
  2. Before receiving the response, my server goes down.
  3. But the transaction has been completed and success in Authorize.Net

Is there a way to get this transaction details through API ?

 

Highlighted
Posts: 1,609
Topics: 15
Kudos: 201
Solutions: 121
Registered: ‎06-23-2011

Re: What if my server goes down after sending request to Authorize.Net

The Transaction Details API might help:

http://developer.authorize.net/api/transaction_details/

Highlighted
Member
Posts: 2
Registered: ‎02-18-2012

Re: What if my server goes down after sending request to Authorize.Net

Thanks TJPridge for the information.

 

Since I don't have the transaction ID,  I should do the following to find the transaction

 

  • Need to get the transactions list
  • Iterate the transactions to find the transaction

 

Please correct me if I am wrong / provide better solution.

 

Highlighted
Posts: 1,609
Topics: 15
Kudos: 201
Solutions: 121
Registered: ‎06-23-2011

Re: What if my server goes down after sending request to Authorize.Net

You would use GetSettledBatchList and GetTransactionList, and/or GetUnsettledTransactionList to get a list of transactions, which you would then iterate through with GetTransactionDetails to pick up anything that isn't in your database. So yes.

Highlighted
Contributor
Posts: 14
Registered: ‎02-16-2012

Re: What if my server goes down after sending request to Authorize.Net

[ Edited ]

hi TjPride. I try use GetSettledBatchList and GetTransactionList , and/or GetUnsettledTransactionList

but fail.

  java code:

public static void GetAuthroizeMessage(String apiLogID, String transactionKey)
	{
		 Merchant merchant = Merchant
								.createMerchant(Environment.SANDBOX, apiLogID, transactionKey);

		Transaction transaction = merchant
									.createReportingTransaction(TransactionType.GET_TRANSACTION_DETAILS);

		ReportingDetails reportingDetails = ReportingDetails.createReportingDetails();
		reportingDetails.setBatchIncludeStatistics(true);
		transaction.setReportingDetails(reportingDetails);
		Result<Transaction> result = (Result<Transaction>) merchant.postTransaction(transaction);
		
		System.out.println("Result Code:" + result.getResultCode() != null ?
											result.getResultCode() : " No result code");
		if(result.isOk()){
			for (TransactionDetails transactionDetail : 
							result.getReportingDetails().getTransactionDetailList()) 
			{
				System.out.println("AccountNumber: "
										+transactionDetail.getAccountNumber());
				System.out.println("AuthCode: "
										+transactionDetail.getAuthCode());
				System.out.println("Firstname: "
										+transactionDetail.getFirstName());
				System.out.println("LastName : "
										+transactionDetail.getLastName());
				System.out.println("InvoiceNumber: "
										+transactionDetail.getInvoiceNumber());
				System.out.println("transID: "
										+transactionDetail.getTransId());
				System.out.println("BatchID: "
										+transactionDetail.getBatch().getBatchId());
				System.out.println(" AuthAmount: "
										+transactionDetail.getAuthAmount().doubleValue());
				System.out.println("Customer Email: "
										+transactionDetail.getCustomer().getEmail());
				System.out.println("Customer FaxNumber: "
										+transactionDetail.getCustomer().getFaxNumber());
				System.out.println("Customer BillTo: "
										+ transactionDetail.getCustomer().getBillTo());
				System.out.println("SettlementState: "
										+transactionDetail.getBatch().getSettlementState());
			}
		}
		
	}

 

 anybody know. how can get all TransactionDetail.

thanks