<?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 Error on Getting Transaction detail using PHP sdk in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Error-on-Getting-Transaction-detail-using-PHP-sdk/m-p/68582#M41760</link>
    <description>&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;During integration I need to get the transaction information to check if it is settled or not to update payment information in our end. I am using PHP SDK for the same but API is returning null.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Below is my code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$merchantAuthentication = new AnetAPI\MerchantAuthenticationType();&lt;BR /&gt;$merchantAuthentication-&amp;gt;setName('YOUR_LOGIN');&lt;BR /&gt;$merchantAuthentication-&amp;gt;setTransactionKey('KEY');&lt;BR /&gt;$refId = 'ref' . time();&lt;BR /&gt;$request = new AnetAPI\GetTransactionDetailsRequest();&lt;/P&gt;&lt;P&gt;$request-&amp;gt;setMerchantAuthentication($merchantAuthentication);&lt;BR /&gt;$request-&amp;gt;setRefId($refId);&lt;BR /&gt;$request-&amp;gt;setTransId('40035349370');&lt;/P&gt;&lt;P&gt;$controller = new AnetController\GetTransactionDetailsController($request);&lt;BR /&gt;$response = $controller-&amp;gt;executeWithApiResponse( \net\authorize\api\constants\ANetEnvironment::SANDBOX);&lt;BR /&gt;if (($response != null) &amp;amp;&amp;amp; ($response-&amp;gt;getMessages()-&amp;gt;getResultCode() == "Ok"))&lt;BR /&gt;{&lt;BR /&gt;echo "SUCCESS: Transaction Status:" . $response-&amp;gt;getTransaction()-&amp;gt;getTransactionStatus() . "\n";&lt;BR /&gt;echo " Auth Amount:" . $response-&amp;gt;getTransaction()-&amp;gt;getAuthAmount() . "\n";&lt;BR /&gt;echo " Trans ID:" . $response-&amp;gt;getTransaction()-&amp;gt;getTransId() . "\n";&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;echo "ERROR : Invalid response\n";&lt;BR /&gt;$errorMessages = $response-&amp;gt;getMessages()-&amp;gt;getMessage();&lt;BR /&gt;echo "Response : " . $errorMessages[0]-&amp;gt;getCode() . " " .$errorMessages[0]-&amp;gt;getText() . "\n";&lt;BR /&gt;}&lt;BR /&gt;print_r($response);die('Test');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please suggest. I also tried using "composer update". When I pass wrong transaction id it is returning error as below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR : Invalid response Response : E00040 The record cannot be found. net\authorize\api\contract\v1\GetTransactionDetailsResponse Object ( [transaction:net\authorize\api\contract\v1\GetTransactionDetailsResponse:private] =&amp;gt; [clientId:net\authorize\api\contract\v1\GetTransactionDetailsResponse:private] =&amp;gt; [transrefId:net\authorize\api\contract\v1\GetTransactionDetailsResponse:private] =&amp;gt; [refId:net\authorize\api\contract\v1\ANetApiResponseType:private] =&amp;gt; ref1564492259 [messages:net\authorize\api\contract\v1\ANetApiResponseType:private] =&amp;gt; net\authorize\api\contract\v1\MessagesType Object ( [resultCode:net\authorize\api\contract\v1\MessagesType:private] =&amp;gt; Error [message:net\authorize\api\contract\v1\MessagesType:private] =&amp;gt; Array ( [0] =&amp;gt; net\authorize\api\contract\v1\MessagesType\MessageAType Object ( [code:net\authorize\api\contract\v1\MessagesType\MessageAType:private] =&amp;gt; E00040 [text:net\authorize\api\contract\v1\MessagesType\MessageAType:private] =&amp;gt; The record cannot be found. ) ) ) [sessionToken:net\authorize\api\contract\v1\ANetApiResponseType:private] =&amp;gt; ) traaa&lt;/P&gt;</description>
    <pubDate>Tue, 30 Jul 2019 05:28:25 GMT</pubDate>
    <dc:creator>ashwinikumarve</dc:creator>
    <dc:date>2019-07-30T05:28:25Z</dc:date>
    <item>
      <title>Error on Getting Transaction detail using PHP sdk</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Error-on-Getting-Transaction-detail-using-PHP-sdk/m-p/68582#M41760</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;During integration I need to get the transaction information to check if it is settled or not to update payment information in our end. I am using PHP SDK for the same but API is returning null.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Below is my code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$merchantAuthentication = new AnetAPI\MerchantAuthenticationType();&lt;BR /&gt;$merchantAuthentication-&amp;gt;setName('YOUR_LOGIN');&lt;BR /&gt;$merchantAuthentication-&amp;gt;setTransactionKey('KEY');&lt;BR /&gt;$refId = 'ref' . time();&lt;BR /&gt;$request = new AnetAPI\GetTransactionDetailsRequest();&lt;/P&gt;&lt;P&gt;$request-&amp;gt;setMerchantAuthentication($merchantAuthentication);&lt;BR /&gt;$request-&amp;gt;setRefId($refId);&lt;BR /&gt;$request-&amp;gt;setTransId('40035349370');&lt;/P&gt;&lt;P&gt;$controller = new AnetController\GetTransactionDetailsController($request);&lt;BR /&gt;$response = $controller-&amp;gt;executeWithApiResponse( \net\authorize\api\constants\ANetEnvironment::SANDBOX);&lt;BR /&gt;if (($response != null) &amp;amp;&amp;amp; ($response-&amp;gt;getMessages()-&amp;gt;getResultCode() == "Ok"))&lt;BR /&gt;{&lt;BR /&gt;echo "SUCCESS: Transaction Status:" . $response-&amp;gt;getTransaction()-&amp;gt;getTransactionStatus() . "\n";&lt;BR /&gt;echo " Auth Amount:" . $response-&amp;gt;getTransaction()-&amp;gt;getAuthAmount() . "\n";&lt;BR /&gt;echo " Trans ID:" . $response-&amp;gt;getTransaction()-&amp;gt;getTransId() . "\n";&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;echo "ERROR : Invalid response\n";&lt;BR /&gt;$errorMessages = $response-&amp;gt;getMessages()-&amp;gt;getMessage();&lt;BR /&gt;echo "Response : " . $errorMessages[0]-&amp;gt;getCode() . " " .$errorMessages[0]-&amp;gt;getText() . "\n";&lt;BR /&gt;}&lt;BR /&gt;print_r($response);die('Test');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please suggest. I also tried using "composer update". When I pass wrong transaction id it is returning error as below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR : Invalid response Response : E00040 The record cannot be found. net\authorize\api\contract\v1\GetTransactionDetailsResponse Object ( [transaction:net\authorize\api\contract\v1\GetTransactionDetailsResponse:private] =&amp;gt; [clientId:net\authorize\api\contract\v1\GetTransactionDetailsResponse:private] =&amp;gt; [transrefId:net\authorize\api\contract\v1\GetTransactionDetailsResponse:private] =&amp;gt; [refId:net\authorize\api\contract\v1\ANetApiResponseType:private] =&amp;gt; ref1564492259 [messages:net\authorize\api\contract\v1\ANetApiResponseType:private] =&amp;gt; net\authorize\api\contract\v1\MessagesType Object ( [resultCode:net\authorize\api\contract\v1\MessagesType:private] =&amp;gt; Error [message:net\authorize\api\contract\v1\MessagesType:private] =&amp;gt; Array ( [0] =&amp;gt; net\authorize\api\contract\v1\MessagesType\MessageAType Object ( [code:net\authorize\api\contract\v1\MessagesType\MessageAType:private] =&amp;gt; E00040 [text:net\authorize\api\contract\v1\MessagesType\MessageAType:private] =&amp;gt; The record cannot be found. ) ) ) [sessionToken:net\authorize\api\contract\v1\ANetApiResponseType:private] =&amp;gt; ) traaa&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2019 05:28:25 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Error-on-Getting-Transaction-detail-using-PHP-sdk/m-p/68582#M41760</guid>
      <dc:creator>ashwinikumarve</dc:creator>
      <dc:date>2019-07-30T05:28:25Z</dc:date>
    </item>
  </channel>
</rss>

