Reply
Highlighted
Member
Posts: 7
Registered: ‎01-05-2017

Refund without credit card information

Hello, 

 

I have been tasked make a feature that will refund a processed credit card transaction.

 

Our back-end does not save credit card information, so I would like to know if there is any other way to issue refunds.

 

I do not have access yet to the account manager page yet , so I was wondering if this solution might work : 

 

I log in using my credentials ( when I recieve them from the lead ), find the invoice that I want to refund the transaction , retrieve the credit card information ( since authorize . net ) does store the information, and use this information for refunding. 

 

Any help or insight will be greatly welcomed! 

Highlighted
Posts: 2,765
Topics: 57
Kudos: 247
Blog Posts: 67
Registered: ‎12-05-2011

Re: Refund without credit card information

Hello @raheela

 

You have two options:

 

Within 120 days, you can use Refund Transaction if you have the original transaction id.

 

If you do not have the transaction id, or the transaction occured more than 120 days ago, you must obtain the card details from the customer AND apply for Expanded Credit Capabilities.

 

Richard

Highlighted
Member
Posts: 7
Registered: ‎01-05-2017

Re: Refund without credit card information

Richard, 

 

The API has card number required. However, we do not store the card number inside the data base. WIll I still be able to use that API endpoint without the credit card number and expiration date? I have all the other required information available. 

Highlighted
Posts: 2,765
Topics: 57
Kudos: 247
Blog Posts: 67
Registered: ‎12-05-2011

Re: Refund without credit card information

Hello @raheela

 

A card number is required, OR you can send the previous transaction id and masked expiration.  Simply obtain the payment object using getTransactionDetails.

 

Richard

Highlighted
Member
Posts: 7
Registered: ‎01-05-2017

Re: Refund without credit card information

Thank you for the information!!! Will try it out right now. 

Highlighted
Member
Posts: 7
Registered: ‎01-05-2017

Re: Refund without credit card information

@RichardH

 

It turns out we do not use the SDK for authorize.net. Instead, we use AIM. I found the documentation for AIM so I was able to figure out how the refund might happen. 

 

However, I can't figure out how I will get the transaction details without having access to the functionality the SDK offers.

 

Which url should I use to get the transaction details?

 

 

Highlighted
Posts: 2,765
Topics: 57
Kudos: 247
Blog Posts: 67
Registered: ‎12-05-2011

Re: Refund without credit card information

@raheela

 

Get Transaction Details is available in our API Reference.  The API Endpoints are listed under authentication.

 

Richard

Highlighted
Member
Posts: 7
Registered: ‎01-05-2017

Re: Refund without credit card information

@RichardH

 

First, I want to thank you for all your help so far. 

 

I went ahead and installed AuthorizeNet via the NuGet Package manager console. 

 

I followed the sample code and made my class that looks like this : 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AuthorizeNet.Api.Contracts.V1;
using AuthorizeNet.Api.Controllers;
using AuthorizeNet.Api.Controllers.Bases;

namespace Test
{
    public class TransactionDetails
    {
        public static ANetApiResponse Run(string ApiLoginId, string ApiTransactionKey, string transactionId)
        {
            ApiOperationBase<ANetApiRequest, ANetApiResponse>.MerchantAuthentication = new merchantAuthenticationType()
            {
                name = ApiLoginId,
                ItemElementName = ItemChoiceType.transactionKey,
                Item = ApiTransactionKey
            };

            ApiOperationBase<ANetApiRequest, ANetApiResponse>.RunEnvironment = AuthorizeNet.Environment.SANDBOX;

            var request = new getTransactionDetailsRequest();

            request.transId = transactionId;

            var controller = new getTransactionDetailsController( request );
            controller.Execute();

            var response = controller.GetApiResponse();

            if (response != null && response.messages.resultCode == messageTypeEnum.Ok)
            {
                if (response.transaction == null)
                    return response;

                System.Diagnostics.Debug.WriteLine("Test");
                System.Diagnostics.Debug.WriteLine("payment card", response.transaction.payment.Item);
            } else if (response != null)
            {
                System.Diagnostics.Debug.WriteLine("Error occured", response.messages.message[0].code);
            }

            return response;
        }
    }
}

 

I call the Run method like so  ( from another method that belongs to another class ) 

TransactionDetails.Run(apiKeyValue, apiTransValue, transactionId);

The code Builds without any errors. 

 

However, when I try to test this out by triggering these events to fire, the method that calls the TransactionDetails Run method never runs, and instead I receive a 500 server error. When I comment out the line of code that calls this method, everything works fine. 

 

Do you have any idea what might be the problem? 

 

 

Highlighted
All Star
Posts: 699
Registered: ‎11-03-2016

Re: Refund without credit card information

Hi @raheela,

 

Do you know if the 500 error is being returned by Authorize.Net, or is that generated on your server. Can you see the actual API request that the method builds? It should look something like this:

 

<getTransactionDetailsRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
      <merchantAuthentication>
        <name>API_LOGIN_ID</name>
        <transactionKey>API_TRANSACTION_KEY</transactionKey>
      </merchantAuthentication>
      <transId>12345</transId>
</getTransactionDetailsRequest>

If the 500 is generated by Authorize.Net, and we can see the actual API request, we can determine what might be going wrong.

Highlighted
Member
Posts: 7
Registered: ‎01-05-2017

Re: Refund without credit card information

Got the error. 

 

I'm getting the error message that a strongly named assembly is required. 

 

I downloaded the package from NuGet. It's strange that I would get this error. Can you enlighthen me on how I could fix this without downloading the source code and manually signing the key?