Reply
Contributor
Posts: 11
Registered: ‎04-23-2012
Accepted Solution

Getting customer data from Hosted CIM

I'm crawling along trying to figure out how to work with Authorize.net Hosted CIM. I have finally gotten this far:

I used createCustomerProfileRequest to get a new CustomerID. Using that, I sent off a getHostedProfilePageRequest, which gave me back a token. I created a form that included the token, and sent the user to a form to enter his information. Now, assuming that he does fill out the form and return to my site, how do I get the information he entered for my records? I need to know his name and address, etc., but I cannot find a method for doing so. I presume that I can send through charges for him using just his CustomerID number, but I'd really like to have his info (not payment info, just address stuff) in my database. How do I do that?


Accepted Solutions
Solution
Accepted by topic author takabyte
‎08-21-2015 01:58 AM
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: Getting customer data from Hosted CIM

It hard to see but when I copy this line to notepad. It show a space right after "schema/" and before "AnetApiSchema.xsd"

<getCustomerProfileRequest xmlns=\"AnetApi/xml/v1/schema/ AnetApiSchema.xsd\">

 

View solution in original post


All Replies
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: Getting customer data from Hosted CIM

After they return to your site, use GetCustomerProfile to get a list of PaymentProfiles (they could enter more than 1 cc#).

 

Contributor
Posts: 11
Registered: ‎04-23-2012

Re: Getting customer data from Hosted CIM

I tried that, using the code right out of the documentation, and got an error:

[E00045] The root node does not reference a valid XML namespace.

That doesn't tell me much. Here's the full code: (name and key are test only, not production)

 

<?php

 

$content =  "<?xml version=\"1.0\" encoding=\"utf-8\"?>

<getCustomerProfileRequest xmlns=\"AnetApi/xml/v1/schema/ AnetApiSchema.xsd\">

<merchantAuthentication>

<name>53jMYw2ab4c</name>

<transactionKey>6dX9UBP8wv2jT46K</transactionKey>

</merchantAuthentication>

<customerProfileId>7604495</customerProfileId>

</getCustomerProfileRequest>";

 

echo "Raw request: " . htmlspecialchars($content) . "<br><br>";

$response = send_xml_request($content);

echo "Raw response: " . htmlspecialchars($response) . "<br><br>";

$parsedresponse = parse_api_response($response);

if ("Ok" == $parsedresponse->messages->resultCode)

{

 }

?>

Solution
Accepted by topic author takabyte
‎08-21-2015 01:58 AM
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: Getting customer data from Hosted CIM

It hard to see but when I copy this line to notepad. It show a space right after "schema/" and before "AnetApiSchema.xsd"

<getCustomerProfileRequest xmlns=\"AnetApi/xml/v1/schema/ AnetApiSchema.xsd\">