I am using C# .net and setting up an application that processes credit cards over the internet. I would like to switch from Card Present, to Card Not Present (or just standard Gateway as I understand it). This is what authorize.net support recommended in this situation. However I do not understand how to complete a transaction via the standard gateway.
with the Card Present gateway I use:
CardPresentAuthorizeAndCaptureRequest
But I don't see any functions for CardNotPresentAuthorizeAndCaptureRequest.
There is a Capture Request but this asks for an Auth Code which I don't have from user input.
Do I have to first seperately authorize and then capture?
Could somebody help me convert my Card Present Code to standard Gateway request code for a card not present standard gateway request?
CardPresentGateway target = new CardPresentGateway( _apiLogin, _transactionKey, true ); IGatewayRequest request = new CardPresentAuthorizeAndCaptureRequest( amount, cardNumber, cardMonth.ToString(), cardYear.ToString() ); IGatewayResponse actual = target.Send( request ); return new PaymentResponse( actual.ResponseCode, actual.Message );
02-22-2015 07:58 PM
They include a gatewaytest in the SDKs
https://github.com/AuthorizeNet/sdk-dotnet/blob/master/AuthorizeNETtest/GatewayTest.cs
02-23-2015 04:38 AM
This is helpful, so can I just run a CaptureRequest to accomplish this? I'm a bit confused by the auth code, in the SendTest_Capture_Approved() example they set it to
string authCode = SendAuthOnly(amount + 1, false);
I don't understand the logic here, is the amount + 1 becoase the auth code can be any valid value for a capture request? Do I have to run a seperate authorization prior to a capture? I would prefer to do all in one step.
02-23-2015 08:15 AM
string authCode = SendAuthOnly(amount + 1, false);
they doing a test, you will need to pass in your own amount.
if you are doing auth_capture before, use the one that do auth_capture.
02-23-2015 08:58 AM
Our tests increment each test transaction by a dollar just as a simple way to avoid the duplicate transaction filter without sending any additional parameters.
Thanks,
Joy
02-23-2015 03:31 PM