cancel
Showing results for 
Search instead for 
Did you mean: 

Issues with CreditRefund using last 4.

Hi -

 

I am trying to issue a refund, but can't seem to do it using just the last 4 digits of a credit card.  Here is my code.  When I do this, I receive the following output:

 

Payment - 1: (TESTMODE) This transaction has been approved.

Credit - 3: (TESTMODE) The credit card numbe is invalid.

 

Any suggestions?

 

        static void Main(string[] args)
        {
            IGatewayResponse payment = MakePayment();
            MakeCredit(payment);
        }

        private static IGatewayResponse MakePayment()
        {
            //step 1 - create the request 
            var request = new AuthorizationRequest("4111111111111111", "1015", 1.19M,
                                                   "Conf. Room");

            // placefull credentials
            var gate = new Gateway("Shhh", "Shhh", false);

            //step 3 - make some money 
            IGatewayResponse response = gate.Send(request);

            Console.WriteLine("Payment - {0}: {1}", response.ResponseCode, response.Message);
            //Console.Read();
            return response;
        }

        private static void MakeCredit(IGatewayResponse payment)
        {
            //step 1 - create the request 
            var request = new CreditRequest(payment.TransactionID,
                                            payment.Amount,
                                            "1111");
            // placefull credentials
            var gate = new Gateway("Shh", "Shhh", false);

            //step 3 - make some money 
            var response = gate.Send(request);

            Console.WriteLine("Credit - {0}: {1}", response.ResponseCode, response.Message);
            Console.Read();
        }

 

 

Michael4PF
Member
1 ACCEPTED SOLUTION

Accepted Solutions

Testmode don't generate a transactionID, which is why you can't credit it.

View solution in original post

RaynorC1emen7
Expert
2 REPLIES 2

Testmode don't generate a transactionID, which is why you can't credit it.

RaynorC1emen7
Expert

@RaynorC1emen7 
I ran into the same issue with the refund API.

I confirmed we are not in Test Mode. 

This is the partial response from API:

"errors": [
            {
                "errorCode": "6",
                "errorText": "The credit card number is invalid."
            }
        ],
 
 "messages": {
        "resultCode": "Error",
        "message": [
            {
                "code": "E00027",
                "text": "The transaction was unsuccessful."
            }
        ]
    }
 
When provided the full cc number the transaction was approved. Any idea? 

 

rmavcc
Member