05-14-2014 03:24 PM - last edited on 05-14-2014 03:43 PM by RichardH
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
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.
Solved! Go to Solution.
05-14-2014 04:44 PM - edited 05-14-2014 04:47 PM
does the setup work with creating transaction? did you encrypt the anetLogin?
05-14-2014 05:16 PM
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?