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?
Solved! Go to Solution.
05-02-2012 12:12 PM
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\">
05-02-2012 01:56 PM
After they return to your site, use GetCustomerProfile to get a list of PaymentProfiles (they could enter more than 1 cc#).
05-02-2012 12:23 PM
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)
{
}
?>
05-02-2012 01:04 PM
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\">
05-02-2012 01:56 PM