<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Get Transaction Details returning null customer profile in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/C-API-getTransactionDetailsController-returning-null-customer/m-p/67107#M40579</link>
    <description>&lt;P&gt;This does appear to be the case and I somehow missed that there is an API function to create a customer profile from an existing&amp;nbsp;transaction (createCustomerProfileFromTransactionRequest) that appears to return the existing IDs if they were actually created within the transaction (or in a previous transaction).&amp;nbsp; This should let me do what I need to.&lt;/P&gt;</description>
    <pubDate>Fri, 22 Mar 2019 17:48:45 GMT</pubDate>
    <dc:creator>jwilson2000</dc:creator>
    <dc:date>2019-03-22T17:48:45Z</dc:date>
    <item>
      <title>C# API getTransactionDetailsController returning null customer profile</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/C-API-getTransactionDetailsController-returning-null-customer/m-p/67091#M40564</link>
      <description>&lt;P&gt;Am trying to add a subscription to a previously created transaction using the C# API.&amp;nbsp; The customer profile was created as part of the transaction.&amp;nbsp; Confirmed that the transaction and customer profile were created&amp;nbsp;as expected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Before I can make an API call to create a subscription from a customer profile, I need to retrieve the customer profile ID and the payment profile ID from the transaction detail. However, when I call getTransactionDetailsController&amp;nbsp;with the transaction ID, it returns a null profile object.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm new to the Auth.Net so I think I'm missing something simple.&amp;nbsp; Here's the code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;static void GetTransactionCustomerProfileID(string transactionID, 
                                            out string customerProfileID, 
                                            out string customerPaymentProfileID)
{
    customerProfileID = null;
    customerPaymentProfileID = null;

    ApiOperationBase&amp;lt;ANetApiRequest, ANetApiResponse&amp;gt;.RunEnvironment = AuthorizeNet.Environment.SANDBOX;
    ApiOperationBase&amp;lt;ANetApiRequest, ANetApiResponse&amp;gt;.MerchantAuthentication = new merchantAuthenticationType()
    {
        name = ApiLoginID,
        ItemElementName = ItemChoiceType.transactionKey,
        Item = ApiTransactionKey,
    };

    var request = new getTransactionDetailsRequest();
    request.transId = transactionID;

    // 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 &amp;amp;&amp;amp; response.messages.resultCode == messageTypeEnum.Ok)
    {
        if (response.transaction != null)
        {
            Console.WriteLine("Transaction Id: {0}", response.transaction.transId);
            Console.WriteLine("Transaction type: {0}", response.transaction.transactionType);
            Console.WriteLine("Transaction status: {0}", response.transaction.transactionStatus);
            Console.WriteLine("Transaction auth amount: {0}", response.transaction.authAmount);
            Console.WriteLine("Transaction settle amount: {0}", response.transaction.settleAmount);
            // ====================  profile is NULL! ============================= 
            customerProfileID = response.transaction.profile.customerProfileId;  // profile is NULL! 
            customerPaymentProfileID = response.transaction.profile.customerPaymentProfileId;
        }
    }
    else if (response != null)
    {
        Console.WriteLine("Error: " + response.messages.message[0].code + "  " +
                          response.messages.message[0].text);
    }

return;
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2019 20:47:42 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/C-API-getTransactionDetailsController-returning-null-customer/m-p/67091#M40564</guid>
      <dc:creator>jwilson2000</dc:creator>
      <dc:date>2019-03-21T20:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: Get Transaction Details returning null customer profile</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/C-API-getTransactionDetailsController-returning-null-customer/m-p/67105#M40577</link>
      <description>&lt;P&gt;The customer profile details of the transaction do not appear in the virtual terminal's transaction detail screen or if I retrieve the details through the API Live console in the API documentation for Get Transaction Details.&amp;nbsp; I don't think my problem is specifically related the C# API.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When a new charge transaction is created with the flag set to create customer profile record, does it not tie that new record to the transaction that caused it to be created?&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2019 17:24:38 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/C-API-getTransactionDetailsController-returning-null-customer/m-p/67105#M40577</guid>
      <dc:creator>jwilson2000</dc:creator>
      <dc:date>2019-03-22T17:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: Get Transaction Details returning null customer profile</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/C-API-getTransactionDetailsController-returning-null-customer/m-p/67106#M40578</link>
      <description>&lt;P&gt;After some more experimentation, it looks like the profile fields are only populated on a transaction when the transaction is initially created from a customer profile and not when the transaction creates the customer profile.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone confirm?&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2019 17:35:14 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/C-API-getTransactionDetailsController-returning-null-customer/m-p/67106#M40578</guid>
      <dc:creator>jwilson2000</dc:creator>
      <dc:date>2019-03-22T17:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: Get Transaction Details returning null customer profile</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/C-API-getTransactionDetailsController-returning-null-customer/m-p/67107#M40579</link>
      <description>&lt;P&gt;This does appear to be the case and I somehow missed that there is an API function to create a customer profile from an existing&amp;nbsp;transaction (createCustomerProfileFromTransactionRequest) that appears to return the existing IDs if they were actually created within the transaction (or in a previous transaction).&amp;nbsp; This should let me do what I need to.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2019 17:48:45 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/C-API-getTransactionDetailsController-returning-null-customer/m-p/67107#M40579</guid>
      <dc:creator>jwilson2000</dc:creator>
      <dc:date>2019-03-22T17:48:45Z</dc:date>
    </item>
  </channel>
</rss>

