Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authorize.NET Pull Sales by Number #273

Open
jmawebtech opened this issue Oct 29, 2019 · 0 comments
Open

Authorize.NET Pull Sales by Number #273

jmawebtech opened this issue Oct 29, 2019 · 0 comments
Labels

Comments

@jmawebtech
Copy link

Hi,

My goal is to pull a transactionDetailsSummaryType using the transactionDetailsType Id. I want to pull orders by number, instead of date. Is this possible? What is the relationship between these two objects? Here is my code:

` public transactionSummaryType GetTransactionByRefId(string refId)
{
var request = new getTransactionListRequest();
request.merchantAuthentication = GetMerchantAuthentication();
request.refId = refId;

        // instantiate the controller that will call the service
        var controller = new getTransactionListController(request);
        controller.Execute();

        // get the response from the service (errors contained if any)
        var response = controller.GetApiResponse();

        if (response == null || response.transactions == null)
            return null;
        else
            return response.transactions.FirstOrDefault();
    }

`

` public transactionDetailsType GetTransactionDetails(string transactionId)
{
var request = new getTransactionDetailsRequest();
request.transId = transactionId;
request.merchantAuthentication = GetMerchantAuthentication();

        // instantiate the controller that will call the service
        var controller = new getTransactionDetailsController(request);
        controller.Execute();

        // get the response from the service (errors contained if any)
        var response = controller.GetApiResponse();

        if (response != null && response.messages.resultCode == messageTypeEnum.Ok)
        {
            return response.transaction;
        }
        else if (response != null)
        {
            Console.WriteLine("Error: " + response.messages.message[0].code + "  " +
                              response.messages.message[0].text);
        }

        return null;
    }

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants