Integration and Testing

Authorize.Net API questions and help with your payment integration.

Reply
Member
Posts: 4
Registered: ‎05-14-2014
Accepted Solution

get transaction error using Java SDK

[ Edited ]

I'm trying to get the transaction detail using Java SDK, but I got this serror:

 

The 'AnetApi/xml/v1/schema/AnetApiSchema.xsd:name' element is invalid - The value 'l8WvUDkZPBu15VPKuEp9KnSytfGEi6KfF27n6L35ptk=' is invalid according to its datatype 'String' - The actual length is greater than the MaxLength value.

 

not sure what is wrong, I got the sdk from maven repository

 

<dependency>
<groupId>net.authorize</groupId>
<artifactId>anet-java-sdk</artifactId>
<version>1.8.0</version>
</dependency>

 

and here is the code I'm using

 

<code>
Merchant merchant = Merchant.createMerchant(Environment.SANDBOX,
anetLogin,anetKey);
 
Transaction transaction = merchant.createReportingTransaction(TransactionType.GET_TRANSACTION_DETAILS);
ReportingDetails reportingDetails = ReportingDetails.createReportingDetails();
reportingDetails.setTransactionId(payment.getPaymentDetail().getTransactionId());
transaction.setReportingDetails(reportingDetails);
Result<Transaction> result = (Result<Transaction>) merchant.postTransaction(transaction);
</code>

 

 

hope someone could help me.


Accepted Solutions
Solution
Accepted by topic author jibarra04
‎08-21-2015 01:58 AM
Member
Posts: 4
Registered: ‎05-14-2014

Re: get transaction error using Java SDK

I was selecting the wrong merchant login from my db, once I get the right the transaction works as expected.

 

Thanks all for you support. 

View solution in original post


All Replies
Member
Posts: 4
Registered: ‎05-14-2014

Re: get transaction error using Java SDK

[ Edited ]

does it an SDK issue?

Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: get transaction error using Java SDK

[ Edited ]

does the setup work with creating transaction? did you encrypt the anetLogin?

Merchant.createMerchant(Environment.SANDBOX,anetLogin,anetKey);
Member
Posts: 4
Registered: ‎05-14-2014

Re: get transaction error using Java SDK

not I didn't encryot the anetLogin or anetKEt, since there is no comment at all in the code sample setions. here is how the configure the merchant

 

  String apiLoginID = "YOUR_API_LOGIN_ID";
  String transactionKey = "YOUR_TRANSACTION_KEY";

  Merchant merchant = Merchant.createMerchant(Environment.SANDBOX,
              apiLoginID, transactionKey);

 nothing about encryptatio is mention.

 

So should I encrypt it?

Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: get transaction error using Java SDK

So should I encrypt it? No.

 

Can you log the xml to see what is getting send?

And what is this?

l8WvUDkZPBu15VPKuEp9KnSytfGEi6KfF27n6L35ptk=

Solution
Accepted by topic author jibarra04
‎08-21-2015 01:58 AM
Member
Posts: 4
Registered: ‎05-14-2014

Re: get transaction error using Java SDK

I was selecting the wrong merchant login from my db, once I get the right the transaction works as expected.

 

Thanks all for you support.