<?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 How to get a customer's email address and transaction subject from unsettled transactions? in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-to-get-a-customer-s-email-address-and-transaction-subject/m-p/73813#M45768</link>
    <description>&lt;DIV class="votecell post-layout--left"&gt;&lt;DIV class="js-voting-container grid jc-center fd-column ai-stretch gs4 fc-black-200"&gt;I am using the Authorize.net API for PHP with the help of some of the online examples to iterate through all the transactions of today (or last 24 hours). So far I'm only able to obtain the submit time and the transaction amount (aka settle amount). How can I get the email of the customer as well as the transaction subject/description?&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="postcell post-layout--right"&gt;&lt;DIV class="s-prose js-post-body"&gt;&lt;P&gt;Inside the loop where the two spots are marked "/* HERE */" I've tried several ways with no luck. What is the correct syntax?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="hljs-keyword"&gt;require&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;'autoload.php'&lt;/SPAN&gt;;
&lt;SPAN class="hljs-keyword"&gt;require_once&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;'SampleCodeConstants.php'&lt;/SPAN&gt;;
&lt;SPAN class="hljs-keyword"&gt;use&lt;/SPAN&gt; &lt;SPAN class="hljs-title"&gt;net&lt;/SPAN&gt;\&lt;SPAN class="hljs-title"&gt;authorize&lt;/SPAN&gt;\&lt;SPAN class="hljs-title"&gt;api&lt;/SPAN&gt;\&lt;SPAN class="hljs-title"&gt;contract&lt;/SPAN&gt;\&lt;SPAN class="hljs-title"&gt;v1&lt;/SPAN&gt; &lt;SPAN class="hljs-title"&gt;as&lt;/SPAN&gt; &lt;SPAN class="hljs-title"&gt;AnetAPI&lt;/SPAN&gt;;
&lt;SPAN class="hljs-keyword"&gt;use&lt;/SPAN&gt; &lt;SPAN class="hljs-title"&gt;net&lt;/SPAN&gt;\&lt;SPAN class="hljs-title"&gt;authorize&lt;/SPAN&gt;\&lt;SPAN class="hljs-title"&gt;api&lt;/SPAN&gt;\&lt;SPAN class="hljs-title"&gt;controller&lt;/SPAN&gt; &lt;SPAN class="hljs-title"&gt;as&lt;/SPAN&gt; &lt;SPAN class="hljs-title"&gt;AnetController&lt;/SPAN&gt;;

&lt;SPAN class="hljs-comment"&gt;/* Create a merchantAuthenticationType object with authentication details
retrieved from the constants file */&lt;/SPAN&gt;
$merchantAuthentication = &lt;SPAN class="hljs-keyword"&gt;new&lt;/SPAN&gt; AnetAPI\MerchantAuthenticationType();
$merchantAuthentication-&amp;gt;setName(\SampleCodeConstants::MERCHANT_LOGIN_ID);
$merchantAuthentication-&amp;gt;setTransactionKey(\SampleCodeConstants::MERCHANT_TRANSACTION_KEY);

&lt;SPAN class="hljs-comment"&gt;// Set the transaction's refId&lt;/SPAN&gt;
$refId = &lt;SPAN class="hljs-string"&gt;'ref'&lt;/SPAN&gt; . time();

$request = &lt;SPAN class="hljs-keyword"&gt;new&lt;/SPAN&gt; AnetAPI\GetUnsettledTransactionListRequest();
$request-&amp;gt;setMerchantAuthentication($merchantAuthentication);

$controller = &lt;SPAN class="hljs-keyword"&gt;new&lt;/SPAN&gt; AnetController\GetUnsettledTransactionListController($request);
$response = $controller-&amp;gt;executeWithApiResponse( \net\authorize\api\constants\ANetEnvironment::PRODUCTION);

&lt;SPAN class="hljs-keyword"&gt;if&lt;/SPAN&gt; (($response != &lt;SPAN class="hljs-literal"&gt;null&lt;/SPAN&gt;) &amp;amp;&amp;amp; ($response-&amp;gt;getMessages()-&amp;gt;getResultCode() == &lt;SPAN class="hljs-string"&gt;'Ok'&lt;/SPAN&gt;)) {
    &lt;SPAN class="hljs-keyword"&gt;if&lt;/SPAN&gt; (&lt;SPAN class="hljs-literal"&gt;null&lt;/SPAN&gt; != $response-&amp;gt;getTransactions()) {
        &lt;SPAN class="hljs-keyword"&gt;foreach&lt;/SPAN&gt;($response-&amp;gt;getTransactions() &lt;SPAN class="hljs-keyword"&gt;as&lt;/SPAN&gt; $tx) {
            &lt;SPAN class="hljs-keyword"&gt;echo&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;'SUCCESS: TransactionID: '&lt;/SPAN&gt; . $tx-&amp;gt;getTransId() . &lt;SPAN class="hljs-string"&gt;"\n"&lt;/SPAN&gt;;

            $request = &lt;SPAN class="hljs-keyword"&gt;new&lt;/SPAN&gt; AnetAPI\GetTransactionDetailsRequest();
            $request-&amp;gt;setMerchantAuthentication($merchantAuthentication);
            $request-&amp;gt;setTransId($tx-&amp;gt;getTransId());

            $controller = &lt;SPAN class="hljs-keyword"&gt;new&lt;/SPAN&gt; AnetController\GetTransactionDetailsController($request);
            $response = $controller-&amp;gt;executeWithApiResponse( \net\authorize\api\constants\ANetEnvironment::PRODUCTION);

            &lt;SPAN class="hljs-keyword"&gt;echo&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;"Submitted on (Local): "&lt;/SPAN&gt; . date_format($tx-&amp;gt;getSubmitTimeLocal(), &lt;SPAN class="hljs-string"&gt;'Y-m-d H:i:s'&lt;/SPAN&gt;) . &lt;SPAN class="hljs-string"&gt;"\n"&lt;/SPAN&gt;;
            &lt;SPAN class="hljs-keyword"&gt;echo&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;"Settle amount: "&lt;/SPAN&gt; . number_format($tx-&amp;gt;getSettleAmount(), &lt;SPAN class="hljs-number"&gt;2&lt;/SPAN&gt;, &lt;SPAN class="hljs-string"&gt;'.'&lt;/SPAN&gt;, &lt;SPAN class="hljs-string"&gt;''&lt;/SPAN&gt;) . &lt;SPAN class="hljs-string"&gt;"\n"&lt;/SPAN&gt;;
            &lt;SPAN class="hljs-keyword"&gt;echo&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;"Email: "&lt;/SPAN&gt; . &lt;SPAN class="hljs-comment"&gt;/* HERE */&lt;/SPAN&gt; . &lt;SPAN class="hljs-string"&gt;"\n"&lt;/SPAN&gt;;
            &lt;SPAN class="hljs-keyword"&gt;echo&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;"Transaction subject: "&lt;/SPAN&gt; . &lt;SPAN class="hljs-comment"&gt;/* HERE */&lt;/SPAN&gt; . &lt;SPAN class="hljs-string"&gt;"\n"&lt;/SPAN&gt;;
        }
    } &lt;SPAN class="hljs-keyword"&gt;else&lt;/SPAN&gt; {
        &lt;SPAN class="hljs-keyword"&gt;echo&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;'No unsettled transactions for the merchant.'&lt;/SPAN&gt; . &lt;SPAN class="hljs-string"&gt;"\n"&lt;/SPAN&gt;;
    }
} &lt;SPAN class="hljs-keyword"&gt;else&lt;/SPAN&gt; {
    &lt;SPAN class="hljs-keyword"&gt;echo&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;'ERROR :  Invalid response'&lt;/SPAN&gt; . &lt;SPAN class="hljs-string"&gt;"\n"&lt;/SPAN&gt;;
    $errorMessages = $response-&amp;gt;getMessages()-&amp;gt;getMessage();
    &lt;SPAN class="hljs-keyword"&gt;echo&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;'Response : '&lt;/SPAN&gt; . $errorMessages[&lt;SPAN class="hljs-number"&gt;0&lt;/SPAN&gt;]-&amp;gt;getCode() . &lt;SPAN class="hljs-string"&gt;' '&lt;/SPAN&gt; .$errorMessages[&lt;SPAN class="hljs-number"&gt;0&lt;/SPAN&gt;]-&amp;gt;getText() . &lt;SPAN class="hljs-string"&gt;"\n"&lt;/SPAN&gt;;
}

&lt;SPAN class="hljs-keyword"&gt;return&lt;/SPAN&gt; $response;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Sat, 31 Oct 2020 08:43:28 GMT</pubDate>
    <dc:creator>AuthForumUser1</dc:creator>
    <dc:date>2020-10-31T08:43:28Z</dc:date>
    <item>
      <title>How to get a customer's email address and transaction subject from unsettled transactions?</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-to-get-a-customer-s-email-address-and-transaction-subject/m-p/73813#M45768</link>
      <description>&lt;DIV class="votecell post-layout--left"&gt;&lt;DIV class="js-voting-container grid jc-center fd-column ai-stretch gs4 fc-black-200"&gt;I am using the Authorize.net API for PHP with the help of some of the online examples to iterate through all the transactions of today (or last 24 hours). So far I'm only able to obtain the submit time and the transaction amount (aka settle amount). How can I get the email of the customer as well as the transaction subject/description?&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="postcell post-layout--right"&gt;&lt;DIV class="s-prose js-post-body"&gt;&lt;P&gt;Inside the loop where the two spots are marked "/* HERE */" I've tried several ways with no luck. What is the correct syntax?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="hljs-keyword"&gt;require&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;'autoload.php'&lt;/SPAN&gt;;
&lt;SPAN class="hljs-keyword"&gt;require_once&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;'SampleCodeConstants.php'&lt;/SPAN&gt;;
&lt;SPAN class="hljs-keyword"&gt;use&lt;/SPAN&gt; &lt;SPAN class="hljs-title"&gt;net&lt;/SPAN&gt;\&lt;SPAN class="hljs-title"&gt;authorize&lt;/SPAN&gt;\&lt;SPAN class="hljs-title"&gt;api&lt;/SPAN&gt;\&lt;SPAN class="hljs-title"&gt;contract&lt;/SPAN&gt;\&lt;SPAN class="hljs-title"&gt;v1&lt;/SPAN&gt; &lt;SPAN class="hljs-title"&gt;as&lt;/SPAN&gt; &lt;SPAN class="hljs-title"&gt;AnetAPI&lt;/SPAN&gt;;
&lt;SPAN class="hljs-keyword"&gt;use&lt;/SPAN&gt; &lt;SPAN class="hljs-title"&gt;net&lt;/SPAN&gt;\&lt;SPAN class="hljs-title"&gt;authorize&lt;/SPAN&gt;\&lt;SPAN class="hljs-title"&gt;api&lt;/SPAN&gt;\&lt;SPAN class="hljs-title"&gt;controller&lt;/SPAN&gt; &lt;SPAN class="hljs-title"&gt;as&lt;/SPAN&gt; &lt;SPAN class="hljs-title"&gt;AnetController&lt;/SPAN&gt;;

&lt;SPAN class="hljs-comment"&gt;/* Create a merchantAuthenticationType object with authentication details
retrieved from the constants file */&lt;/SPAN&gt;
$merchantAuthentication = &lt;SPAN class="hljs-keyword"&gt;new&lt;/SPAN&gt; AnetAPI\MerchantAuthenticationType();
$merchantAuthentication-&amp;gt;setName(\SampleCodeConstants::MERCHANT_LOGIN_ID);
$merchantAuthentication-&amp;gt;setTransactionKey(\SampleCodeConstants::MERCHANT_TRANSACTION_KEY);

&lt;SPAN class="hljs-comment"&gt;// Set the transaction's refId&lt;/SPAN&gt;
$refId = &lt;SPAN class="hljs-string"&gt;'ref'&lt;/SPAN&gt; . time();

$request = &lt;SPAN class="hljs-keyword"&gt;new&lt;/SPAN&gt; AnetAPI\GetUnsettledTransactionListRequest();
$request-&amp;gt;setMerchantAuthentication($merchantAuthentication);

$controller = &lt;SPAN class="hljs-keyword"&gt;new&lt;/SPAN&gt; AnetController\GetUnsettledTransactionListController($request);
$response = $controller-&amp;gt;executeWithApiResponse( \net\authorize\api\constants\ANetEnvironment::PRODUCTION);

&lt;SPAN class="hljs-keyword"&gt;if&lt;/SPAN&gt; (($response != &lt;SPAN class="hljs-literal"&gt;null&lt;/SPAN&gt;) &amp;amp;&amp;amp; ($response-&amp;gt;getMessages()-&amp;gt;getResultCode() == &lt;SPAN class="hljs-string"&gt;'Ok'&lt;/SPAN&gt;)) {
    &lt;SPAN class="hljs-keyword"&gt;if&lt;/SPAN&gt; (&lt;SPAN class="hljs-literal"&gt;null&lt;/SPAN&gt; != $response-&amp;gt;getTransactions()) {
        &lt;SPAN class="hljs-keyword"&gt;foreach&lt;/SPAN&gt;($response-&amp;gt;getTransactions() &lt;SPAN class="hljs-keyword"&gt;as&lt;/SPAN&gt; $tx) {
            &lt;SPAN class="hljs-keyword"&gt;echo&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;'SUCCESS: TransactionID: '&lt;/SPAN&gt; . $tx-&amp;gt;getTransId() . &lt;SPAN class="hljs-string"&gt;"\n"&lt;/SPAN&gt;;

            $request = &lt;SPAN class="hljs-keyword"&gt;new&lt;/SPAN&gt; AnetAPI\GetTransactionDetailsRequest();
            $request-&amp;gt;setMerchantAuthentication($merchantAuthentication);
            $request-&amp;gt;setTransId($tx-&amp;gt;getTransId());

            $controller = &lt;SPAN class="hljs-keyword"&gt;new&lt;/SPAN&gt; AnetController\GetTransactionDetailsController($request);
            $response = $controller-&amp;gt;executeWithApiResponse( \net\authorize\api\constants\ANetEnvironment::PRODUCTION);

            &lt;SPAN class="hljs-keyword"&gt;echo&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;"Submitted on (Local): "&lt;/SPAN&gt; . date_format($tx-&amp;gt;getSubmitTimeLocal(), &lt;SPAN class="hljs-string"&gt;'Y-m-d H:i:s'&lt;/SPAN&gt;) . &lt;SPAN class="hljs-string"&gt;"\n"&lt;/SPAN&gt;;
            &lt;SPAN class="hljs-keyword"&gt;echo&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;"Settle amount: "&lt;/SPAN&gt; . number_format($tx-&amp;gt;getSettleAmount(), &lt;SPAN class="hljs-number"&gt;2&lt;/SPAN&gt;, &lt;SPAN class="hljs-string"&gt;'.'&lt;/SPAN&gt;, &lt;SPAN class="hljs-string"&gt;''&lt;/SPAN&gt;) . &lt;SPAN class="hljs-string"&gt;"\n"&lt;/SPAN&gt;;
            &lt;SPAN class="hljs-keyword"&gt;echo&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;"Email: "&lt;/SPAN&gt; . &lt;SPAN class="hljs-comment"&gt;/* HERE */&lt;/SPAN&gt; . &lt;SPAN class="hljs-string"&gt;"\n"&lt;/SPAN&gt;;
            &lt;SPAN class="hljs-keyword"&gt;echo&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;"Transaction subject: "&lt;/SPAN&gt; . &lt;SPAN class="hljs-comment"&gt;/* HERE */&lt;/SPAN&gt; . &lt;SPAN class="hljs-string"&gt;"\n"&lt;/SPAN&gt;;
        }
    } &lt;SPAN class="hljs-keyword"&gt;else&lt;/SPAN&gt; {
        &lt;SPAN class="hljs-keyword"&gt;echo&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;'No unsettled transactions for the merchant.'&lt;/SPAN&gt; . &lt;SPAN class="hljs-string"&gt;"\n"&lt;/SPAN&gt;;
    }
} &lt;SPAN class="hljs-keyword"&gt;else&lt;/SPAN&gt; {
    &lt;SPAN class="hljs-keyword"&gt;echo&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;'ERROR :  Invalid response'&lt;/SPAN&gt; . &lt;SPAN class="hljs-string"&gt;"\n"&lt;/SPAN&gt;;
    $errorMessages = $response-&amp;gt;getMessages()-&amp;gt;getMessage();
    &lt;SPAN class="hljs-keyword"&gt;echo&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;'Response : '&lt;/SPAN&gt; . $errorMessages[&lt;SPAN class="hljs-number"&gt;0&lt;/SPAN&gt;]-&amp;gt;getCode() . &lt;SPAN class="hljs-string"&gt;' '&lt;/SPAN&gt; .$errorMessages[&lt;SPAN class="hljs-number"&gt;0&lt;/SPAN&gt;]-&amp;gt;getText() . &lt;SPAN class="hljs-string"&gt;"\n"&lt;/SPAN&gt;;
}

&lt;SPAN class="hljs-keyword"&gt;return&lt;/SPAN&gt; $response;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 31 Oct 2020 08:43:28 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-to-get-a-customer-s-email-address-and-transaction-subject/m-p/73813#M45768</guid>
      <dc:creator>AuthForumUser1</dc:creator>
      <dc:date>2020-10-31T08:43:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a customer's email address and transaction subject from unsettled transactions?</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-to-get-a-customer-s-email-address-and-transaction-subject/m-p/73816#M45771</link>
      <description>&lt;P&gt;&lt;a href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/43148"&gt;@AuthForumUser1&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I think you would run the transId through the getTransactionDetails method call.&lt;/P&gt;</description>
      <pubDate>Sun, 01 Nov 2020 11:12:55 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-to-get-a-customer-s-email-address-and-transaction-subject/m-p/73816#M45771</guid>
      <dc:creator>Renaissance</dc:creator>
      <dc:date>2020-11-01T11:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a customer's email address and transaction subject from unsettled transactions?</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-to-get-a-customer-s-email-address-and-transaction-subject/m-p/73817#M45772</link>
      <description>&lt;P&gt;It would help if I read your code. For email I think you go to either getCustomer or getAddress or maybe getShipping.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Been a while.&lt;/P&gt;</description>
      <pubDate>Sun, 01 Nov 2020 11:15:47 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-to-get-a-customer-s-email-address-and-transaction-subject/m-p/73817#M45772</guid>
      <dc:creator>Renaissance</dc:creator>
      <dc:date>2020-11-01T11:15:47Z</dc:date>
    </item>
  </channel>
</rss>

