<?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: CIM updateCustomerProfileRequest Form Using PHP Throws Error in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/CIM-updateCustomerProfileRequest-Form-Using-PHP-Throws-Error/m-p/37981#M20805</link>
    <description>&lt;P&gt;4)xml document. chapter 4&amp;nbsp; or page 103.&amp;nbsp; basically everything for hosted form required a token.&lt;/P&gt;&lt;P&gt;5)not sure, maybe it error, couldn't you output the whole response xml?&lt;/P&gt;</description>
    <pubDate>Sun, 22 Dec 2013 21:29:06 GMT</pubDate>
    <dc:creator>RaynorC1emen7</dc:creator>
    <dc:date>2013-12-22T21:29:06Z</dc:date>
    <item>
      <title>CIM updateCustomerProfileRequest Form Using PHP Throws Error</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/CIM-updateCustomerProfileRequest-Form-Using-PHP-Throws-Error/m-p/37979#M20804</link>
      <description>&lt;DIV&gt;Background Info:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;1. We have successfully been able to create the XML post code and form/button to enable the user to create a new profile at&amp;nbsp;&lt;A href="http://auth.net/" target="_blank"&gt;Auth.net&lt;/A&gt;. We are passing the shipping data. We are NOT passing the billing or the credit card information. We expect the user to add their credit card information on the&amp;nbsp;&lt;A href="http://auth.net/" target="_blank"&gt;Auth.net&lt;/A&gt;&amp;nbsp;screen. The client does not want to have anything to do with storing or transmitting credit card data.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Goal: They want everything stored at&amp;nbsp;&lt;A href="http://auth.net/" target="_blank"&gt;Auth.net&lt;/A&gt;&amp;nbsp;so they can use it from there once they are ready to do billing for their products.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;2. We are storing the ProfileId in our database.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;3. We are storing the&amp;nbsp;merchantCustomerId in our database (this value is generated by our database)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;4. Since the customer record should already be in&amp;nbsp;&lt;A href="http://auth.net/" target="_blank"&gt;Auth.net&lt;/A&gt;, I’m assuming I only need a form and a button with hidden fields for the merchantCustomerId and customerProfileId. When the user clicks the button it should open the&amp;nbsp;&lt;A href="http://auth.net/" target="_blank"&gt;Auth.net&lt;/A&gt;&amp;nbsp;page to their profile so they can edit it. On a &amp;nbsp;side note, I experimented with getting another token and passing that too, but it didn’t seem to resolve the problem — I still got the same error. &amp;nbsp;Below is the form that I created for the purpose of allowing the customer to click the button to edit their profile.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;lt;form method="post" action="&lt;A href="https://test.authorize.net/profile/manage" target="_blank"&gt;https://test.authorize.net/profile/manage&lt;/A&gt;" id="updateAuthorizeNetPage" style="display:none;"&amp;gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;lt;input type="hidden" name="merchantCustomerId" value="&amp;lt;?php echo $merchantCustomerId; ?&amp;gt;"/&amp;gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;lt;input type="hidden" name="customerProfileId" value="&amp;lt;?php echo $ProfileId; ?&amp;gt;"/&amp;gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;lt;/form&amp;gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;lt;input name="Payment" type="button" value="Edit Payment Method" onclick= "document.getElementById(\'updateAuthorizeNetPage\').submit();"&amp;gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;You can see from the enclosed screen shot that I have all the prerequisite data&amp;amp;colon;&lt;/DIV&gt;&lt;DIV&gt;merchantCustomerId: 1234&lt;/DIV&gt;&lt;DIV&gt;ProfileId: 23129722&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;IMG width="540" src="cid:C0850268-D040-4654-8464-BCEB84B75131" height="291" alt="" border="0" /&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;When I click the Edit Payment Method button I get an error back from the&amp;nbsp;&lt;A target="_blank" href="http://auth.net/"&gt;Auth.net&lt;/A&gt;&amp;nbsp;test server. See enclosed screen shot:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;IMG width="960" src="cid:DFBA8BD6-1990-4465-A74E-5D4F947D6E56" height="617" alt="" border="0" /&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;5. In an attempt to identify what could possible be wrong with the POST to&amp;nbsp;&lt;A target="_blank" href="http://auth.net/"&gt;Auth.net&lt;/A&gt;&amp;nbsp;I create the following XML call to try to get a response code. The response code comes back empty as you can see from the first screen shot “Update Response Code”. I should be getting at least something back as per the response codes listed in the CIM_SOAP_guide.pdf file on page 95. I know the profile exists because I can use the sample SDK PHP file and delete the profile successfully. Then create a new profile with our working code.&amp;nbsp;Below is the XML code that I used:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;include_once ("auth_cim/vars.php");&lt;/DIV&gt;&lt;DIV&gt;include_once ("auth_cim/util.php");&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;//build xml to post&lt;/DIV&gt;&lt;DIV&gt;$content =&lt;/DIV&gt;&lt;DIV&gt;"&amp;lt;?xml version=\"1.0\" encoding=\"utf-8\"?&amp;gt;" .&lt;/DIV&gt;&lt;DIV&gt;"&amp;lt;updateCustomerProfileRequest xmlns=\"AnetApi/xml/v1/schema/AnetApiSchema.xsd\"&amp;gt;" .&lt;/DIV&gt;&lt;DIV&gt;MerchantAuthenticationBlock().&lt;/DIV&gt;&lt;DIV&gt;"&amp;lt;profile&amp;gt;" .&lt;/DIV&gt;&lt;DIV&gt;"&amp;lt;merchantCustomerId&amp;gt;" . $merchantCustomerId . "&amp;lt;/merchantCustomerId&amp;gt;" .&lt;/DIV&gt;&lt;DIV&gt;"&amp;lt;customerProfileId&amp;gt;" . $ProfileId . "&amp;lt;/customerProfileId&amp;gt;".&lt;/DIV&gt;&lt;DIV&gt;"&amp;lt;/profile&amp;gt;".&lt;/DIV&gt;&lt;DIV&gt;"&amp;lt;/updateCustomerProfileRequest&amp;gt;";&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;$response = send_xml_request($content);&lt;/DIV&gt;&lt;DIV&gt;$parsedresponse = parse_api_response($response);&lt;/DIV&gt;&lt;DIV&gt;if ("Ok" == $parsedresponse-&amp;gt;messages-&amp;gt;resultCode)&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;{&lt;/DIV&gt;&lt;DIV&gt;// UpdateCustomerProfileResult&lt;/DIV&gt;&lt;DIV&gt;$UpdateResponse = htmlspecialchars($parsedresponse-&amp;gt;UpdateCustomerProfileResult);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;// For testing only. Comment out in live version&lt;/DIV&gt;&lt;DIV&gt;echo '&amp;lt;br&amp;gt;Update Response Code: ' . $UpdateResponse;&lt;/DIV&gt;&lt;DIV&gt;}&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;6. Given the information provided here, what is the correct Form and/or XML code that we need to create a button to enable the user to edit their profile at the&amp;nbsp;&lt;A target="_blank" href="http://auth.net/"&gt;Auth.net&lt;/A&gt;&amp;nbsp;web site, then return back to our web site?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thank You&lt;/DIV&gt;</description>
      <pubDate>Sun, 22 Dec 2013 18:38:27 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/CIM-updateCustomerProfileRequest-Form-Using-PHP-Throws-Error/m-p/37979#M20804</guid>
      <dc:creator>t_duell</dc:creator>
      <dc:date>2013-12-22T18:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: CIM updateCustomerProfileRequest Form Using PHP Throws Error</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/CIM-updateCustomerProfileRequest-Form-Using-PHP-Throws-Error/m-p/37981#M20805</link>
      <description>&lt;P&gt;4)xml document. chapter 4&amp;nbsp; or page 103.&amp;nbsp; basically everything for hosted form required a token.&lt;/P&gt;&lt;P&gt;5)not sure, maybe it error, couldn't you output the whole response xml?&lt;/P&gt;</description>
      <pubDate>Sun, 22 Dec 2013 21:29:06 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/CIM-updateCustomerProfileRequest-Form-Using-PHP-Throws-Error/m-p/37981#M20805</guid>
      <dc:creator>RaynorC1emen7</dc:creator>
      <dc:date>2013-12-22T21:29:06Z</dc:date>
    </item>
  </channel>
</rss>

