For Implementing Authorize.Net CIM Hosted API, How we can pass the Merchant Id and Transaction Key to Hosted API?
11-24-2011 10:42 AM
11-24-2011 10:47 AM
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.
11-24-2011 11:37 AM
Thanks for the Reply.
Can you please provide us some sample code? When I am trying to call the method. Not getting the result.
11-24-2011 07:55 PM
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.
11-25-2011 02:50 AM
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....
11-27-2011 12:45 AM
It the getHostedProfilePageRequest on the xml documentation.
11-27-2011 01:04 PM
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.
11-27-2011 08:49 PM