cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

CIM Hosted Page

Here we going to save customer profile using Customer Information Manager [CIM] . But we want to know whether there is any  hosting page at your side. so please clarify us regarding hosting page to save customer profile.
 
If there is any hosting page at your side. so please tell us how to implement to save customer profile? 
 
If there is no hosting page  please give some alternate solution to save customer profile

 

KSGRao
Contributor
26 REPLIES 26

added services reference in visual studio but, not about create object for CustomerProfileAPI 

So you are not using the sample code? then just use whatever name you create the service reference with.

Thanks for the giving reply, here we are not implementing through soap but we are decided to go with xml.

 

But as you said that using โ€œgetHostedProfilePageRequestโ€

We can access the authorize.net but we are unable to understand how to send the request of getHostedProfilePageRequest using xml through coding. So please let us know the solution.

There is an example on page 66 on the CIM_XML_guide.pdf

We already referred your โ€œCIM_XML_guide.pdfโ€ page 66, we are unable to understated how to implement the code in c# (code behind) for xml which was shown in page no 66,

 

Below is Aspx code snippet were we have implemented

 

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CIMSample.aspx.cs" Inherits="CIMSample" %>

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

    <title></title>

 

</head>

<body>

    <form method="post" action="https://test.authorize.net/profile/manage" id="formAuthorizeNetPage"

    style="display: none;">

    <input type="hidden" name="Token" value="pfGaUNntoTxZYeqqYDjGCQ4qyCHcsXGXLJ2i7MPCEiH6CH5n5qKqcl8EBiTClxu01B

SeH5eZg7LVUVVzw5kJKVMitQ3pyMB5UZCduMWd6Ku9aT2gyFm69EKMGfyWPmI4p+Bb4TJf2F0

7rInSrn2MWlM6f2xd7aRu1XBn0WXoPxK1j9FMGX2CNCoCBp3cOXB7" />

    </form>

    <button type="button" onclick="document.getElementById(

'formAuthorizeNetPage').submit();">

        Manage my payment and shipping information</button>

 

</body>

</html>

 

But I havenโ€™t implemented any code for code behind file that is .cs file in c# and as we are a beginner we are not able to understand to send the xml request to your api and also we are unable to find the โ€œgetHostedProfilePageRequestโ€.

 

How to work with the hosted page for creating customer profile.

In the code behind, use HttpWebRequest to send the xml to 

read the respone to get the token and put it on the input name="Token" value.

Thanks for the giving reply

 

Code behind the code looks like as below:

string url;

url = @"https://api.authorize.net/xml/v1/request.api";

WebRequest webRequest = WebRequest.Create(url);

HttpWebResponse httpWebResponse = webRequest.GetResponse() as HttpWebResponse;

Stream dataStream = httpWebResponse.GetResponseStream();

StreamReader streamReader = new StreamReader(dataStream);

String responseFromServer = streamReader.ReadToEnd();

 

It is response we getting unable to find the token

 

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

<ErrorResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">

  <messages>

    <resultCode>Error</resultCode>

    <message>

      <code>E00002</code>

      <text>The content-type specified is not supported.</text>

    </message>

  </messages>

</ErrorResponse>

 

Please solved problem as soon as possible.

Thanks for the giving reply,

 

Input XML:

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

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

<merchantAuthentication>

<name>*****</name>

<transactionKey>******</transactionKey>

</merchantAuthentication>

<hostedProfileSettings>

<setting>

<settingName>hostedProfileReturnUrl</settingName>

<settingValue>https://www.google.co.in/</settingValue>

</setting>

<setting>

<settingName>hostedProfileReturnUrlText</settingName>

<settingValue>Continue to xtg.</settingValue>

</setting>

<setting>

<settingName>hostedProfilePageBorderVisible</settingName>

<settingValue>true</settingValue>

</setting>

</hostedProfileSettings>

</getHostedProfilePageRequest>

 

Output XML:

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

<ErrorResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">

  <messages>

    <resultCode>Error</resultCode>

    <message>

      <code>E00003</code>

      <text>The element 'getHostedProfilePageRequest' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has invalid child element 'hostedProfileSettings' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'. List of possible elements expected: 'refId, customerProfileId' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'.</text>

    </message>

  </messages>

</ErrorResponse>

The XML guide said customerProfileId is required.