I am trying to run a card not present transaction using the C# Autorize.net dll. I have a Card Present sandbox account setup. When I run the following code, authorize.net does not acknoledge the CVV. It will show "Card Code Status : Not Applicable" on the gateway.
//Card Not Present Response.Write ("Card Not Present" + "<BR>"); var amount = 17.0M; var apilogin = "XXXXXXX"; var transkey = "XXXXXXX"; var cc = "4007000000027"; var expm = "01"; var expy = "13"; var request = new CardPresentAuthorizeAndCaptureRequest(amount, cc, expm, expy); // request.AddCardCode("777"); request.AddCustomer("12335","First","Last","1234 Anystreet", "AZ","89131"); var gate = new CardPresentGateway(apilogin, transkey, true); var response = (CardPresentResponse)gate.Send(request); Response.Write(response.ResponseCode); Response.Write(response.Message); Response.Write(response.AuthorizationCode); Response.Write(response.TransactionID);
I realize I am using
CardPresentAuthorizeAndCaptureRequest
for a Card Not Present transaction, but this is the only method that works with a Card Present gateway. It has an override to specify the transaction info, and thats what I'm using. I need to be able to run both cardpresent and cardnotpresent through this gateway. I don't see why the request.AddCardCode method is not working.
Can anyone avise?
Solved! Go to Solution.
12-11-2012 12:42 PM
I try it mulitple way enter it thru as an URL and it is still not getting any card code result(it blank). So it is not an SDKs issues, I guess it just that the test server it not doing the "Triggering Specific Transaction Responses" thing for CP test account.
12-18-2012 02:33 PM
To test the card code response on a test account
12-11-2012 01:10 PM
Thanks but I am already using these card code responses, the gateway does not acknowledge.
12-11-2012 03:15 PM - edited 12-11-2012 03:15 PM
I thought you were using 777 as the card code. I didn't see anything on the source that might be a problem.
It could be a bug, might just need to debug the gate.send to send what is sending out.
and the test mode on your test account is off?
12-11-2012 03:39 PM - edited 12-11-2012 03:50 PM
Sorry for the confusion, yes i tried 900 901, etc, and nothing changed. (i can't change the top post anymore). Also I am out of test mode.
I've seen other sdk code to manualy add x params. if I add x_card_code and set it, will that force it to be sent?
12-18-2012 09:43 AM - edited 12-18-2012 09:55 AM
I try it mulitple way enter it thru as an URL and it is still not getting any card code result(it blank). So it is not an SDKs issues, I guess it just that the test server it not doing the "Triggering Specific Transaction Responses" thing for CP test account.
12-18-2012 02:33 PM
Ah! Thank you for testing this for me! I will try it with a real auth.net account in test mode, and even further with a real card in live mode.
12-19-2012 11:18 AM