I downloaded the current version of sdk and tried to run all the test, but all functional tests seems doesn't work for me. What should I do to make it work?
09-06-2012 10:53 AM
No need for a SSL cert for testing. Were you able to get any debug info at all? Testmode off on the test account?
09-06-2012 12:35 PM - edited 09-06-2012 12:48 PM
I have this testcase snippet
public
void testCreditCardGateway() throws Exception {
Gateway g =
new Gateway();
g.setApiLoginID(
apiLoginId);
g.setTransactionKey(
transactionKey);
g.setEnvironment(Environment.
SANDBOX);
CreditCard card = CreditCard.createCreditCard();
//card.setAvsCode(avsCode);
//card.setCardholderAuthenticationIndicator("5");
//card.setCardholderAuthenticationValue("123");
card.setCardType(CardType.
VISA);
card.setCreditCardNumber(
"4007000000027");
card.setExpirationMonth(
"12");
card.setExpirationYear(
"2015");
MerchantResponse ms = g.authCapture(card, 27.00);
System.
out.println("Credit card AuthCapture");
System.
out.println(inspectMerchantResponse(ms));
}
private
String inspectMerchantResponse(MerchantResponse ms) {
StringBuffer sb =
new StringBuffer();
sb.append(
"MerchantResponse " + ms.toString() + ": ");
sb.append(
"\n- getResponseCode: " + ms.getResponseCode());
sb.append(
"\n- getResponseReason: " + ms.getResponseReason());
sb.append(
"\n- getResponseSubCode: " + ms.getResponseSubCode());
sb.append(
"\n- getResponseNotes: " + ms.getResponseNotes());
sb.append(
"\n- getTransactionId: " + ms.getTransactionId());
return sb.toString();
}
and I got this return
Credit card AuthCapture
MerchantResponse com.univera.authorizenet.paymentgateway.dao.merchant.MerchantResponse@4c4975:
- getResponseCode: ERROR
- getResponseReason: This transaction has been declined.
- getResponseSubCode: DECLINED
- getResponseNotes: This transaction was submitted from a blocked IP address.
- getTransactionId: 0
09-07-2012 10:03 AM
Are you doing custom code? Not sure how it will get a "This transaction was submitted from a blocked IP address." message.
09-07-2012 11:31 AM
No I created a class that invoked the AIM API/SDK, but when I run the test cases I received that response. I am trying to integrate AIM in a Server application.
09-07-2012 01:51 PM