<?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 New to integration - PHP cURL question in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/New-to-integration-PHP-cURL-question/m-p/46501#M23513</link>
    <description>&lt;P&gt;I am learning about working with integrating Authorize.net into my php application.&amp;nbsp;Apparently I need to request and recieve a Token inorder to load a customer profile. I am not completely confident I have the right direction. Here's a cURL request I am trying:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*************&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$Authorization = "PaymentProfileId=" . $someknownprofileid;&lt;BR /&gt;$URLBase = "&lt;A href="https://secure.authorize.net/profile/editPayment&amp;quot;;" target="_blank"&gt;https://secure.authorize.net/profile/editPayment";&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;function curl_request($url, $postdata) //single custom cURL request.&lt;BR /&gt;{&lt;BR /&gt;$ch = curl_init();&lt;BR /&gt;curl_setopt_array($ch, array(&lt;BR /&gt;CURLOPT_URL =&amp;gt; $url . "?" . $postdata,&lt;BR /&gt;CURLOPT_RETURNTRANSFER =&amp;gt; true&lt;BR /&gt;));&lt;BR /&gt;&lt;BR /&gt;$response = curl_exec($ch);&lt;BR /&gt;if (!curl_exec($ch)) {&lt;BR /&gt;// if curl_exec() returned false and thus failed&lt;BR /&gt;echo '&amp;lt;br&amp;gt;An error has occurred: ' . curl_error($ch). '&amp;lt;br&amp;gt;';&lt;BR /&gt;}&lt;BR /&gt;else {&lt;BR /&gt;echo '&amp;lt;br&amp;gt;everything was successful&amp;lt;br&amp;gt;';&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;echo "&amp;lt;br&amp;gt;cURL Get Info returns : &amp;lt;br&amp;gt;";&lt;BR /&gt;print_r(curl_getinfo($ch));&lt;BR /&gt;&lt;BR /&gt;curl_close($ch);&lt;BR /&gt;&lt;BR /&gt;return $response;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;$data = curl_request($URLBase, $Authorization); //return cURL request to $data&lt;/P&gt;&lt;P&gt;//Display request result&lt;BR /&gt;echo "&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;cURL request returns : &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;";&lt;BR /&gt;var_dump($data);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;***********&lt;/P&gt;&lt;P&gt;&amp;nbsp;This returns a 'Missing or Invalid Token' message. Since I am requesting for a token, I'm not sure how to proceed. Is this refering to the ProfileId I am passing? Am I not passing it correctly? Is this cURL soution the wrong way to go about this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for any assistance!&lt;/P&gt;</description>
    <pubDate>Thu, 21 Aug 2014 20:08:12 GMT</pubDate>
    <dc:creator>toddmfletcher</dc:creator>
    <dc:date>2014-08-21T20:08:12Z</dc:date>
    <item>
      <title>New to integration - PHP cURL question</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/New-to-integration-PHP-cURL-question/m-p/46501#M23513</link>
      <description>&lt;P&gt;I am learning about working with integrating Authorize.net into my php application.&amp;nbsp;Apparently I need to request and recieve a Token inorder to load a customer profile. I am not completely confident I have the right direction. Here's a cURL request I am trying:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*************&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$Authorization = "PaymentProfileId=" . $someknownprofileid;&lt;BR /&gt;$URLBase = "&lt;A href="https://secure.authorize.net/profile/editPayment&amp;quot;;" target="_blank"&gt;https://secure.authorize.net/profile/editPayment";&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;function curl_request($url, $postdata) //single custom cURL request.&lt;BR /&gt;{&lt;BR /&gt;$ch = curl_init();&lt;BR /&gt;curl_setopt_array($ch, array(&lt;BR /&gt;CURLOPT_URL =&amp;gt; $url . "?" . $postdata,&lt;BR /&gt;CURLOPT_RETURNTRANSFER =&amp;gt; true&lt;BR /&gt;));&lt;BR /&gt;&lt;BR /&gt;$response = curl_exec($ch);&lt;BR /&gt;if (!curl_exec($ch)) {&lt;BR /&gt;// if curl_exec() returned false and thus failed&lt;BR /&gt;echo '&amp;lt;br&amp;gt;An error has occurred: ' . curl_error($ch). '&amp;lt;br&amp;gt;';&lt;BR /&gt;}&lt;BR /&gt;else {&lt;BR /&gt;echo '&amp;lt;br&amp;gt;everything was successful&amp;lt;br&amp;gt;';&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;echo "&amp;lt;br&amp;gt;cURL Get Info returns : &amp;lt;br&amp;gt;";&lt;BR /&gt;print_r(curl_getinfo($ch));&lt;BR /&gt;&lt;BR /&gt;curl_close($ch);&lt;BR /&gt;&lt;BR /&gt;return $response;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;$data = curl_request($URLBase, $Authorization); //return cURL request to $data&lt;/P&gt;&lt;P&gt;//Display request result&lt;BR /&gt;echo "&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;cURL request returns : &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;";&lt;BR /&gt;var_dump($data);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;***********&lt;/P&gt;&lt;P&gt;&amp;nbsp;This returns a 'Missing or Invalid Token' message. Since I am requesting for a token, I'm not sure how to proceed. Is this refering to the ProfileId I am passing? Am I not passing it correctly? Is this cURL soution the wrong way to go about this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for any assistance!&lt;/P&gt;</description>
      <pubDate>Thu, 21 Aug 2014 20:08:12 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/New-to-integration-PHP-cURL-question/m-p/46501#M23513</guid>
      <dc:creator>toddmfletcher</dc:creator>
      <dc:date>2014-08-21T20:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: New to integration - PHP cURL question</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/New-to-integration-PHP-cURL-question/m-p/46503#M23514</link>
      <description>&lt;P&gt;Is in the doc&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="http://developer.authorize.net/api/cim/"&gt;http://developer.authorize.net/api/cim/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;getHostedProfilePage&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And they have sample php code under the downloads. although there isn't one for getting the token&lt;/P&gt;</description>
      <pubDate>Thu, 21 Aug 2014 20:18:22 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/New-to-integration-PHP-cURL-question/m-p/46503#M23514</guid>
      <dc:creator>RaynorC1emen7</dc:creator>
      <dc:date>2014-08-21T20:18:22Z</dc:date>
    </item>
  </channel>
</rss>

