I'm using CIM through the Java SDK, and I'm having a problem getting the CCV to be validated when I attempt to create a customer profile.
I have gone through testing in the various environments, but I'm now at the point where I am using live mode on the production servers with valid credit card information. With the valid credit card information I'm trying to submit an invalid CCV to get a rejection, but my customer profiles keep getting accepted.
I ended up examining the XML by doing result.getTarget().getCurrentRequest().dump(), and it looks like the CCV isn't getting included in the outgoing request XML. Any ideas why this would be happening? I've replaced personal information from the XML below, but I didn't remove anything. I assume there is supposed to be a <cardCode> element inside <creditCard>? I've verified by stepping through in my debugger that the card code is being set on the CreditCard Java object.
I'm using the API from anet-java-sdk-1.4.6.jar. Let me know if you would like any more info. Thanks!
123 Main St </address>
New York </city>
Solved! Go to Solution.
Ooops, sorry, should have checked that first :)
For future reference, I ended up adding the following inside net.authorize.cim.Transaction.addPayment, right after it adds the credit card expiration date:
Element card_code_el = document.createElement(AuthNetField.ELEMENT_CARD_CODE.getFieldName());
Thanks so much for your help and prompt response!
Hey you two,
Thanks for pointing out this bug and for posting your solution, jonathanmgrimm. I've forwarded the bug on to our developers so that they can include a fix for it in an upcoming release.
Developer Community Manager