-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathRetrieveTransaction.cs
36 lines (31 loc) · 1.12 KB
/
RetrieveTransaction.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System;
using System.Collections.Generic;
using System.Globalization;
using CyberSource.Api;
using CyberSource.Model;
using Cybersource_rest_samples_dotnet.Samples.Payments;
namespace Cybersource_rest_samples_dotnet.Samples.TransactionDetails
{
public class RetrieveTransaction
{
public static TssV2TransactionsGet200Response Run()
{
string id = SimpleAuthorizationInternet.Run().Id;
System.Threading.Thread.Sleep(10000);
try
{
var configDictionary = new Configuration().GetConfiguration();
var clientConfig = new CyberSource.Client.Configuration(merchConfigDictObj: configDictionary);
var apiInstance = new TransactionDetailsApi(clientConfig);
TssV2TransactionsGet200Response result = apiInstance.GetTransaction(id);
Console.WriteLine(result);
return result;
}
catch (Exception e)
{
Console.WriteLine("Exception on calling the API : " + e.Message);
return null;
}
}
}
}