Reply
Contributor
Posts: 25
Registered: ‎11-24-2011

How we can pass the Merchant Id and Transaction Key to Hosted API using CIM?

  1. We are in the process of Implementing test Hosted API using CIM POC.

For Implementing Authorize.Net CIM Hosted API, How we can pass the Merchant Id and Transaction Key to Hosted API?

Contributor
Posts: 25
Registered: ‎11-24-2011

Re: How we can pass the Merchant Id and Transaction Key to Hosted API using CIM?

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

Re: How we can pass the Merchant Id and Transaction Key to Hosted API using CIM?

You don't pass the id and key. You generate(web service method GetHostedProfilePage)
the token with id, key and the customer id and use that token for the hosted cim api.

Contributor
Posts: 25
Registered: ‎11-24-2011

Re: How we can pass the Merchant Id and Transaction Key to Hosted API using CIM?

Thanks for the Reply.

 

 

Can you please provide us some sample code? When I am trying to call the method. Not getting the result.

 

 

Posts: 1,609
Topics: 15
Kudos: 201
Solutions: 121
Registered: ‎06-23-2011

Re: How we can pass the Merchant Id and Transaction Key to Hosted API using CIM?

http://www.authorize.net/support/CIM_XML_guide.pdf

See the section on hosted CIM.

 

http://developer.authorize.net/downloads/samplecode/

See the hosted popup links for CIM.

Contributor
Posts: 25
Registered: ‎11-24-2011

Re: How we can pass the Merchant Id and Transaction Key to Hosted API using CIM?

Thanks for your Reply...

 

As per the CIM documentation/Sample Code  , for implementing the Hosted API CIM we need to have token as shown below:

<input type="hidden" name="Token"
value="pfGaUNntoTxZYeqqYDjGCQ4qyCHcsXGXLJ2i7MPCEiH6CH5n5qKqcl8EBiTClxu
01BSeH5eZg7LVUVVzw5kJKVMitQ3pyMB5UZCduMWd6Ku9aT2gyFm69EKMGfyWPmI4p+Bb4
TJf2F07rInSrn2MWlM6f2xd7aRu1XBn0WXoPxK1j9FMGX2CNCoCBp3cOXB7"
/>

 

AS per your reply, token number is consists of ID and KEY, How can I replace this  token number with my ID and Tranasactions jey? What type of encryption they doing?

 

And one more thing, I have downloaded the sample Hosted API CIM application from Authorize.net, When I try to run that application I am getting "The page has timed out. Please go back to the beginning and try again." Please suggest.

 

Thanks in advance....

 

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

Re: How we can pass the Merchant Id and Transaction Key to Hosted API using CIM?

It the getHostedProfilePageRequest on the xml documentation.

Highlighted
Posts: 1,609
Topics: 15
Kudos: 201
Solutions: 121
Registered: ‎06-23-2011

Re: How we can pass the Merchant Id and Transaction Key to Hosted API using CIM?

In the documentation, under header Input Parameters for getHostedProfilePageRequest:

 

<?xml version="1.0" encoding="utf-8"?> 
<getHostedProfilePageRequest 
xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"> 
  <merchantAuthentication> 
    <name>YourUserLogin</name> 
    <transactionKey>YourTranKey</transactionKey> 
  </merchantAuthentication> 
  <customerProfileId>YourProfileID</customerProfileId> 
  <hostedProfileSettings> 
    <setting> 
      <settingName>hostedProfileReturnUrl</settingName> 
      <settingValue>https://blah.com/blah/</settingValue> 
    </setting> 
    <setting> 
      <settingName>hostedProfileReturnUrlText</settingName> 
      <settingValue>Continue to blah.</settingValue> 
    </setting> 
    <setting> 
      <settingName>hostedProfilePageBorderVisible</settingName> 
      <settingValue>true</settingValue> 
    </setting> 
  </hostedProfileSettings> 
</getHostedProfilePageRequest>

 Under heading Output for updateCustomerProfileResponse:

 

<?xml version="1.0" encoding="utf-8"?>
<getHostedProfilePageResponse 
xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"> 
  <messages> 
    <resultCode>Ok</resultCode> 
    <message> 
      <code>I00001</code> 
      <text>Successful.</text> 
    </message> 
  </messages>
  <token>+ZeWDaUOPoQPRGTHcKd7DYbMfcAFDrhO8GPOFNt+ACzJnvkz+aWO0SYSAA9x602jAI 
KKfUHUt2ybwQRaG8LzHluuR5dRgsuh+kjarKvD0hpieGjLHmnz0LHmFv1Xe9P3zpmawqBCSB/ 
d4jcSg9dAxecNBUzMwIuYzY+vGUGLUXgr9QPaRh93HqWZrV4Mbwop</token>
</getHostedProfilePageResponse>

 The token in the example was hard-coded, meaning it's from probably months ago and has obviously expired by now, since tokens only last for 15 minutes.