public CreditCardRefundException(string errorCode, string message, CardConnectRefundResponse data)
 {
     ApiError = new ApiError()
     {
         Data      = data,
         ErrorCode = errorCode,
         Message   = message
     };
     Response = data;
 }
        public static PaymentTransaction Map(Payment payment, CardConnectRefundResponse response)
        {
            var t = new PaymentTransaction()
            {
                Amount        = payment.Amount,
                DateExecuted  = DateTime.Now,
                ResultCode    = response.respstat,
                ResultMessage = response.resptext,
                Succeeded     = response.WasSuccessful(),
                Type          = "CreditCardRefund",
                xp            = new
                {
                    CardConnectResponse = response
                }
            };

            return(t);
        }
Exemple #3
0
 public static bool WasSuccessful(this CardConnectRefundResponse attempt)
 {
     return(attempt.respstat == "A");
 }
 public CreditCardRefundException(ApiError error, CardConnectRefundResponse response)
 {
     ApiError = error;
     Response = response;
 }