Hi,
I tried to use the Java SDK but failed.
What have I done so far?
1. Created a Sandbox account, and got login ID and transaction Key.
2. Used the following snippet:
String apiLoginID = "xxx"; // the login ID I got by creating the Sandbox String transactionKey = "xxx"; // the transaction key I got by creating the Sandbox Merchant merchant = Merchant.createMerchant(Environment.SANDBOX, apiLoginID, transactionKey); CreditCard creditCard = CreditCard.createCreditCard(); creditCard.setCreditCardNumber("4012888818888"); creditCard.setExpirationMonth("12"); creditCard.setExpirationYear("2016"); Transaction transaction = merchant.createAIMTransaction( TransactionType.AUTH_ONLY, new BigDecimal(33.3)); transaction.setCreditCard(creditCard); Result<Transaction> result = (Result<Transaction>)merchant.postTransaction(transaction);
The result is an error: RRC_3_22 and the text is: Not Found.
What am I doing wrong?
P.S.,
I noticed that the transaction created by merchant.createAIMTransaction(...) has no transaction ID (i.e., it is an empty string). Might that be a problem when posting it via merchant.postTransaction(...)?
If so, what do I need to do to get a valid transction ID when creating a transaction?
โ12-12-2014 01:21 AM
โ12-12-2014 04:17 AM
โ12-12-2014 04:31 AM
Look like the branch got removed.
Do what the other person do and debug it to see what URL it posting to.
The url for sandbox should be https:/test.authorize.net
Also have you try getting to that url from a browser windows?
โ12-12-2014 05:47 AM - edited โ12-12-2014 05:54 AM
OK, I've found the fix in github.
As a workaround, I've used:
Environment.createEnvironment("https://test.authorize.net", "https://apitest.authorize.net", "https://test.authorize.net")
Instead of:
Environment.SANDBOX
This made the test pass.
Thanks for the tip, RaynorC1emen7.
โ12-13-2014 11:48 PM