cancel
Showing results for 
Search instead for 
Did you mean: 

RefID not being returned in get transaction detail

I am trying to get the refId from the transaction details related to a webhook response to a Hosted Accept page (the payment page works, get a token, getting the webhook response with no problems) and the refId (our order number) that is sent to the transaction is not getting returned in the refId from the get trans detail.

 

The code I use to set the refId is on getting the payment page:

 

GetHostedPaymentPageRequest apiRequest = new GetHostedPaymentPageRequest();
apiRequest.setTransactionRequest(txnRequest);
apiRequest.setHostedPaymentSettings(alist);
apiRequest.setRefId(refId);

GetHostedPaymentPageController controller = new GetHostedPaymentPageController(apiRequest);
controller.execute();

GetHostedPaymentPageResponse response = new GetHostedPaymentPageResponse();
response = controller.getApiResponse();

 

The getting and using of the page works fine, but when I get the transaction deatils from the transactionId passed back in the webhook, it returns null for the refId.

 

The code I am using to get the transaction data works with no problem and is below:

 

public static GetTransactionDetailsResponse getAnetTransaction(String transactionId)
{
ApiOperationBase.setEnvironment(getEnvMode());
MerchantAuthenticationType merchantAuthenticationType = new MerchantAuthenticationType() ;
merchantAuthenticationType.setName(CAPCP_PMT_VENDOR_ID_1);
merchantAuthenticationType.setTransactionKey(CAPCP_PMT_VENDOR_ID_2);
ApiOperationBase.setMerchantAuthentication(merchantAuthenticationType);

GetTransactionDetailsRequest getRequest = new GetTransactionDetailsRequest();
getRequest.setMerchantAuthentication(merchantAuthenticationType);
getRequest.setTransId(transactionId);

GetTransactionDetailsController controller = new GetTransactionDetailsController(getRequest);
controller.execute();
GetTransactionDetailsResponse getResponse = controller.getApiResponse();

if (getResponse != null)
{
if (getResponse.getMessages().getResultCode() == MessageTypeEnum.OK)
{
System.out.println(new Date().toString() + " - >>>> getAnetTransaction: Got ANET transaction data for OrderNo: " + getResponse.getRefId());
}
else
{
System.out.println(new Date().toString() + " - >>>> getAnetTransaction: Failed to get transaction details: transactionId: " + transactionId
+ " ResultCode: "+ getResponse.getMessages().getResultCode());
}
}
return getResponse;
}

 

Can someone let me know if I am missing something or this is the incorrect way to link a webhook to the order that is processed?

 

I have not been able to find anything else on how to link a payment result to the initiating order that is linked to the webhook trans ID as the trans id does not seem to be returned with the page initialization.

 

Thanks for any help,

Ed

synconnv1
Contributor
16 REPLIES 16

"RefID not being returned in get transaction detail" still doesn't work!

 

This bug was first reported on 01-28-2018 09:43 AM, here we are over 13 months later, and it hasn't been fix.

 

Authorize has given developers barely 2 months to deal with the MD5 Hash Removal when it has taken them (Authorize) over 13 months to not fix a bug...

arey
Member

"RefID not being returned in get transaction detail" still doesn't work!

 

This bug was first reported on 01-28-2018 09:43 AM, here we are over 13 months later, and it hasn't been fix.

 

Authorize has given developers barely 2 months to deal with the MD5 Hash Removal when it has taken them (Authorize) over 13 months to not fix a bug...

arey
Member

"RefID not being returned in get transaction detail" still doesn't work!

 

This bug was first reported on 01-28-2018 09:43 AM, here we are over 13 months later, and it hasn't been fix.

 

Authorize has given developers barely 2 months to deal with the MD5 Hash Removal when it has taken them (Authorize) over 13 months to not fix a bug

arey
Member

Hi All , 

 

This should be fixed now . 

 

Thanks

Anurag





Send feedback at developer_feedback@authorize.net

No, it is not fixed as 2019-08-15 and library version 2.0.1

 

Also when I set the order property of transactionRequest and set the invoiceNumber, then I get error on the payment page: 

Unexpected error. Please try again.

 

poor naming conventions, poor implementaion.

 

Has this been fixed yet?  Posts as of 2019-08-15 indicate not.

 

This is important for us.

 

Thanks

-------------------------------------------------
Ron
Linvio, Inc.
Salesforce.com/Authnet Integration

The transrefid in getTransactionDetailsResponse is returning the value passed in "refId" while submitting/creating the transaction.