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.
Solved! Go to Solution.
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.
05-15-2014 12:53 PM
does it an SDK issue?
05-14-2014 04:37 PM - edited 05-14-2014 04:37 PM
does the setup work with creating transaction? did you encrypt the anetLogin?
Merchant.createMerchant(Environment.SANDBOX,anetLogin,anetKey);
05-14-2014 04:44 PM - edited 05-14-2014 04:47 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?
05-14-2014 05:16 PM
So should I encrypt it? No.
Can you log the xml to see what is getting send?
And what is this?
l8WvUDkZPBu15VPKuEp9KnSytfGEi6KfF27n6L35ptk=
05-14-2014 07:11 PM
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.
05-15-2014 12:53 PM