예제 #1
0
 public static bool WasSuccessful(this CardConnectVoidResponse attempt)
 {
     // If the void is successful, the authcode will contain REVERS. If transaction is not found or an error occurs:
     // Identifies if the void was successful.Can one of the following values:
     // REVERS - Successful
     // Null - Unsuccessful.Refer to the respcode and resptext.
     return(attempt.authcode == "REVERS");
 }
 public CreditCardVoidException(string errorCode, string message, CardConnectVoidResponse data)
 {
     ApiError = new ApiError()
     {
         Data      = data,
         ErrorCode = errorCode,
         Message   = message
     };
     Response = data;
 }
예제 #3
0
        private CardConnectVoidResponse MockCardConnectVoidResponse(CardConnectVoidRequest request)
        {
            CardConnectVoidResponse response;

            response = new CardConnectVoidResponse()
            {
                amount   = 100000,
                resptext = "Successful Mocked Response",
                respstat = "A",
                respcode = "0",
            };

            return(response);
        }
예제 #4
0
        public static PaymentTransaction Map(Payment payment, CardConnectVoidResponse response)
        {
            var t = new PaymentTransaction()
            {
                Amount        = payment.Amount,
                DateExecuted  = DateTime.Now,
                ResultCode    = response.authcode,
                ResultMessage = response.resptext,
                Succeeded     = response.WasSuccessful(),
                Type          = "CreditCardVoidAuthorization",
                xp            = new
                {
                    CardConnectResponse = response
                }
            };

            return(t);
        }
 public CreditCardVoidException(ApiError error, CardConnectVoidResponse response)
 {
     ApiError = error;
     Response = response;
 }