<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: GetHostedProfilePage API call - How To Use It? in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/GetHostedProfilePage-API-call-How-To-Use-It/m-p/18118#M10076</link>
    <description>&lt;P&gt;Got it. Thanks, guys. For the PHP users, here is what you do when you download the xml_php folder from the link provided by the CIM sdk:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.) Edit index.php and add this at the bottom:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;form method=post action=get_token.php&amp;gt;
&amp;lt;b&amp;gt;Get Hosted Profile Page Id Token:&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;
customerProfileId &amp;lt;input type=text name=customerProfileId value='&amp;lt;?php echo $customerProfileId; ?&amp;gt;'&amp;gt;&amp;lt;br&amp;gt;
&amp;lt;input type=submit name=submit value=submit&amp;gt;
&amp;lt;/form&amp;gt;
&amp;lt;hr&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;2.) Create a new page called 'get_token.php'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3.) Add this php code to it:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;html&amp;gt;&lt;BR /&gt;&amp;lt;body&amp;gt;&lt;BR /&gt;&amp;lt;?php&lt;BR /&gt;&lt;BR /&gt;/*&lt;BR /&gt;D I S C L A I M E R&amp;nbsp; &lt;BR /&gt;WARNING: ANY USE BY YOU OF THE SAMPLE CODE PROVIDED IS AT YOUR OWN RISK. &lt;BR /&gt;Authorize.Net provphpides this code "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.&lt;BR /&gt;Authorize.Net owns and retains all right, title and interest in and to the Automated Recurring Billing intellectual property.&lt;BR /&gt;*/&lt;BR /&gt;&lt;BR /&gt;include_once ("vars.php");&lt;BR /&gt;include_once ("util.php");&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;//build xml to post&lt;BR /&gt;$content =&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "&amp;lt;?xml version=\"1.0\" encoding=\"utf-8\"?&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;getHostedProfilePageRequest xmlns=\"AnetApi/xml/v1/schema/AnetApiSchema.xsd\"&amp;gt;"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp; MerchantAuthenticationBlock().&lt;BR /&gt;"&amp;lt;customerProfileId&amp;gt;" . $_POST["customerProfileId"] . "&amp;lt;/customerProfileId&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/getHostedProfilePageRequest&amp;gt;";&lt;BR /&gt;&lt;BR /&gt;$response = send_xml_request($content);&lt;BR /&gt;$parsedresponse = parse_api_response($response);&lt;BR /&gt;if ("Ok" == $parsedresponse-&amp;gt;messages-&amp;gt;resultCode) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $token=$parsedresponse-&amp;gt;token;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; echo "&amp;lt;P&amp;gt;The Token Is: $token";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;echo "&amp;lt;br&amp;gt;&amp;lt;a href=index.php?customerProfileId="&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; . urlencode($_POST["customerProfileId"])&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; . "&amp;gt;Continue&amp;lt;/a&amp;gt;&amp;lt;br&amp;gt;";&lt;BR /&gt;?&amp;gt;&lt;BR /&gt;&amp;lt;/body&amp;gt;&lt;BR /&gt;&amp;lt;/html&amp;gt;﻿&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;This code will print out your token. So just comment out the 'echo' parts if you use it live for the hosted pop up solution. Just reference the $token variable created on line 29.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps.&lt;/P&gt;</description>
    <pubDate>Thu, 20 Oct 2011 08:59:20 GMT</pubDate>
    <dc:creator>jbh1977</dc:creator>
    <dc:date>2011-10-20T08:59:20Z</dc:date>
    <item>
      <title>GetHostedProfilePage API call - How To Use It?</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/GetHostedProfilePage-API-call-How-To-Use-It/m-p/18022#M10031</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've searched this board and google to no avail. I don't see how I am able to get a token via:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;GetHostedProfilePage API call﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I can use the hosted profile modification popups when using CIM. I know how to create a profile and delete one, but not modify one and I was hoping this pop up solution would come in handy. It says to:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"Put this hidden &amp;lt;form&amp;gt; anywhere on your page with the token from the GetHostedProfilePage API call.&lt;BR /&gt;﻿"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;But is there even any documentation to explain how to do this? I just want to use this method but I don't see the point of it if there is no explanation on how to use it. I just can't afford to lose more time trying to figure this out so I had to ask. I am sure others here would appreciate the answer as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your time and for CIM, it is a remarkable service you offer and I do appreciate it even if it doesn't sound like it ;)&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2011 22:47:41 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/GetHostedProfilePage-API-call-How-To-Use-It/m-p/18022#M10031</guid>
      <dc:creator>jbh1977</dc:creator>
      <dc:date>2011-10-14T22:47:41Z</dc:date>
    </item>
    <item>
      <title>Re: GetHostedProfilePage API call - How To Use It?</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/GetHostedProfilePage-API-call-How-To-Use-It/m-p/18030#M10035</link>
      <description>&lt;P&gt;This is what I use to get the token using vb.net:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dim token As String&lt;/P&gt;&lt;P&gt;token = AuthNetClass.EditCustomerPaymentProfile(AuthNetProfileID)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Public Shared Function EditCustomerPaymentProfile(ByVal profile_id As Long) As String&lt;BR /&gt;&amp;nbsp;Dim hostedprofilesetting As New SettingType&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Dim hostedpage As GetHostedProfilePageResponseType =SoapAPIUtilities.Service.GetHostedProfilePage(SoapAPIUtilities.MerchantAuthentication, profile_id, Nothing)&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dim page_token As String&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;page_token = hostedpage.token&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Return page_token&amp;nbsp;&lt;BR /&gt;End Function&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I also downloaded and copied into my project the supplied popup forms from the download section under CIM, CIM hosted popup for managing payment/shipping.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Once you get the token you will need to pass it to the page somehow. This is where I felt the documentation fell short. I'm using a 3rd party popup control and embedding the whole authnet profile edit form inside it.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;What I did was create a dummypage called managecard.html and pass the token value as a querystring in the page url, so you would endup with a url like ManageCards.html?+tok (tok being the token variable)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Then in my managecards.html markup I had a javascript function that grabbed only the querystring token id and opened the authorize.net supplied popup form when the managecards page loaded:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; function getQuerystring() {&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;var urlen = window.location.search.length;&lt;/P&gt;&lt;P&gt;document.formAuthorizeNetPopup.Token.value = window.location.search.slice(1, urlen);&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AuthorizeNetPopup.openManagePopup(); }&lt;BR /&gt;&lt;BR /&gt;&amp;lt;body onload="getQuerystring()"&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;form method="post" action="&lt;A target="_blank" href="https://authorize.net/hosted/profile/manage"&gt;https://authorize.net/hosted/profile/manage&lt;/A&gt;" id="formAuthorizeNetPopup" name="formAuthorizeNetPopup" target="iframeAuthorizeNet" style="display:none;"&amp;gt;&amp;nbsp; &amp;lt;input type="hidden" name="Token" value="" /&amp;gt;&amp;lt;/form&amp;gt;&lt;BR /&gt;&lt;BR /&gt;Hopefully some of that information will help.&lt;BR /&gt;Nic﻿&lt;/P&gt;</description>
      <pubDate>Sun, 16 Oct 2011 15:40:01 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/GetHostedProfilePage-API-call-How-To-Use-It/m-p/18030#M10035</guid>
      <dc:creator>nic73</dc:creator>
      <dc:date>2011-10-16T15:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: GetHostedProfilePage API call - How To Use It?</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/GetHostedProfilePage-API-call-How-To-Use-It/m-p/18090#M10062</link>
      <description>&lt;P&gt;What file do you have that hosts the function GetHostedProfilePage?&lt;BR /&gt;&lt;BR /&gt;Thanks for the reply. Although I use PHP I am sure I can figure it out IF I can find the page WITH the function. My PHP SDK does NOT seem to have a file with it available. It's driving me nuts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't understand why this is so hard to find an answer to. It's as if people in charge are avoiding the topic as nobody else seems to have had this resolved.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2011 17:43:19 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/GetHostedProfilePage-API-call-How-To-Use-It/m-p/18090#M10062</guid>
      <dc:creator>jbh1977</dc:creator>
      <dc:date>2011-10-19T17:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: GetHostedProfilePage API call - How To Use It?</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/GetHostedProfilePage-API-call-How-To-Use-It/m-p/18094#M10064</link>
      <description>&lt;P&gt;&lt;A target="_blank" href="http://developer.authorize.net/downloads/samplecode/"&gt;http://developer.authorize.net/downloads/samplecode/&lt;/A&gt;﻿&lt;/P&gt;&lt;P&gt;Under the "Customer Information Manager (CIM)﻿" section&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2011 17:57:18 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/GetHostedProfilePage-API-call-How-To-Use-It/m-p/18094#M10064</guid>
      <dc:creator>RaynorC1emen7</dc:creator>
      <dc:date>2011-10-19T17:57:18Z</dc:date>
    </item>
    <item>
      <title>Re: GetHostedProfilePage API call - How To Use It?</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/GetHostedProfilePage-API-call-How-To-Use-It/m-p/18096#M10065</link>
      <description>&lt;P&gt;Thanks, but I must ask:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This standalone code will call the GetHostedProfilePage function?&lt;/P&gt;&lt;P&gt;Or is this to be in conjunction of the hosted pop up solution I downloaded earlier ? (That requies the token)&lt;BR /&gt;&lt;BR /&gt;That's why I am baffled. What page is physically hosting this file to create that token so I can put it into the hidden field in the forms that come with the Hosted popup solution?&lt;BR /&gt;&lt;BR /&gt;I only ask because I can't find it in this download that you suggested or any other. Knowing that page will help tremendously.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2011 18:04:30 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/GetHostedProfilePage-API-call-How-To-Use-It/m-p/18096#M10065</guid>
      <dc:creator>jbh1977</dc:creator>
      <dc:date>2011-10-19T18:04:30Z</dc:date>
    </item>
    <item>
      <title>Re: GetHostedProfilePage API call - How To Use It?</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/GetHostedProfilePage-API-call-How-To-Use-It/m-p/18098#M10066</link>
      <description>&lt;P&gt;I don't think is support in the current SDKs yet.&lt;/P&gt;&lt;P&gt;Is a web service method at&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="https://api.authorize.net/soap/v1/Service.asmx"&gt;https://api.authorize.net/soap/v1/Service.asmx&lt;/A&gt;﻿&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="https://apitest.authorize.net/soap/v1/Service.asmx"&gt;https://apitest.authorize.net/soap/v1/Service.asmx&lt;/A&gt;﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is sample/documentation in the CIM pdf file under "Section 3 Executing an API Call"&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2011 18:30:00 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/GetHostedProfilePage-API-call-How-To-Use-It/m-p/18098#M10066</guid>
      <dc:creator>RaynorC1emen7</dc:creator>
      <dc:date>2011-10-19T18:30:00Z</dc:date>
    </item>
    <item>
      <title>Re: GetHostedProfilePage API call - How To Use It?</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/GetHostedProfilePage-API-call-How-To-Use-It/m-p/18100#M10067</link>
      <description>&lt;P&gt;Ok, I see what you are saying. I complete mis-understood that it was a webservice instead of a function. I was using the pattern of noticing all the existing functions in the SDK.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the time. It is appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;- Joel&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2011 19:07:33 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/GetHostedProfilePage-API-call-How-To-Use-It/m-p/18100#M10067</guid>
      <dc:creator>jbh1977</dc:creator>
      <dc:date>2011-10-19T19:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: GetHostedProfilePage API call - How To Use It?</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/GetHostedProfilePage-API-call-How-To-Use-It/m-p/18118#M10076</link>
      <description>&lt;P&gt;Got it. Thanks, guys. For the PHP users, here is what you do when you download the xml_php folder from the link provided by the CIM sdk:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.) Edit index.php and add this at the bottom:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;form method=post action=get_token.php&amp;gt;
&amp;lt;b&amp;gt;Get Hosted Profile Page Id Token:&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;
customerProfileId &amp;lt;input type=text name=customerProfileId value='&amp;lt;?php echo $customerProfileId; ?&amp;gt;'&amp;gt;&amp;lt;br&amp;gt;
&amp;lt;input type=submit name=submit value=submit&amp;gt;
&amp;lt;/form&amp;gt;
&amp;lt;hr&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;2.) Create a new page called 'get_token.php'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3.) Add this php code to it:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;html&amp;gt;&lt;BR /&gt;&amp;lt;body&amp;gt;&lt;BR /&gt;&amp;lt;?php&lt;BR /&gt;&lt;BR /&gt;/*&lt;BR /&gt;D I S C L A I M E R&amp;nbsp; &lt;BR /&gt;WARNING: ANY USE BY YOU OF THE SAMPLE CODE PROVIDED IS AT YOUR OWN RISK. &lt;BR /&gt;Authorize.Net provphpides this code "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.&lt;BR /&gt;Authorize.Net owns and retains all right, title and interest in and to the Automated Recurring Billing intellectual property.&lt;BR /&gt;*/&lt;BR /&gt;&lt;BR /&gt;include_once ("vars.php");&lt;BR /&gt;include_once ("util.php");&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;//build xml to post&lt;BR /&gt;$content =&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "&amp;lt;?xml version=\"1.0\" encoding=\"utf-8\"?&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;getHostedProfilePageRequest xmlns=\"AnetApi/xml/v1/schema/AnetApiSchema.xsd\"&amp;gt;"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp; MerchantAuthenticationBlock().&lt;BR /&gt;"&amp;lt;customerProfileId&amp;gt;" . $_POST["customerProfileId"] . "&amp;lt;/customerProfileId&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/getHostedProfilePageRequest&amp;gt;";&lt;BR /&gt;&lt;BR /&gt;$response = send_xml_request($content);&lt;BR /&gt;$parsedresponse = parse_api_response($response);&lt;BR /&gt;if ("Ok" == $parsedresponse-&amp;gt;messages-&amp;gt;resultCode) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $token=$parsedresponse-&amp;gt;token;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; echo "&amp;lt;P&amp;gt;The Token Is: $token";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;echo "&amp;lt;br&amp;gt;&amp;lt;a href=index.php?customerProfileId="&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; . urlencode($_POST["customerProfileId"])&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; . "&amp;gt;Continue&amp;lt;/a&amp;gt;&amp;lt;br&amp;gt;";&lt;BR /&gt;?&amp;gt;&lt;BR /&gt;&amp;lt;/body&amp;gt;&lt;BR /&gt;&amp;lt;/html&amp;gt;﻿&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;This code will print out your token. So just comment out the 'echo' parts if you use it live for the hosted pop up solution. Just reference the $token variable created on line 29.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2011 08:59:20 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/GetHostedProfilePage-API-call-How-To-Use-It/m-p/18118#M10076</guid>
      <dc:creator>jbh1977</dc:creator>
      <dc:date>2011-10-20T08:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: GetHostedProfilePage API call - How To Use It?</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/GetHostedProfilePage-API-call-How-To-Use-It/m-p/34273#M18754</link>
      <description>&lt;P&gt;This REALLY should be in the SDK itself. Instructions on how to do that yourself:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For users of the PHP SDK, add the following to AuthorizeNet.php:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;require dirname(__FILE__) . '/lib/AuthorizeNetToken.php';&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then create a new file called '/lib/AuthorizeNetToken.php' and paste in the following contents:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;?php

// This is an added class by leiavoia

class AuthorizeNetToken extends AuthorizeNetRequest {

	const LIVE_URL = "&lt;A href="https://api.authorize.net/xml/v1/request.api" target="_blank"&gt;https://api.authorize.net/xml/v1/request.api&lt;/A&gt;";
	const SANDBOX_URL = "&lt;A href="https://apitest.authorize.net/xml/v1/request.api" target="_blank"&gt;https://apitest.authorize.net/xml/v1/request.api&lt;/A&gt;";

	private $_xml;
	public function GetTokenResponse( $customer_profile_id ) {
		$this-&amp;gt;_constructXml("getHostedProfilePageRequest");
		$this-&amp;gt;_xml-&amp;gt;addChild("customerProfileId", $customer_profile_id);
		return $this-&amp;gt;_sendRequest();
		}

	protected function _setPostString() {
		$this-&amp;gt;_post_string = $this-&amp;gt;_xml-&amp;gt;asXML();
		}

	protected function _getPostUrl() {
		return ($this-&amp;gt;_sandbox ? self::SANDBOX_URL : self::LIVE_URL);
		}

	protected function _handleResponse($response) {
		return new AuthorizeNetToken_Response($response);
		}

	private function _constructXml($request_type) {
		$string = '&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&amp;lt;'.$request_type.' xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"&amp;gt;&amp;lt;/'.$request_type.'&amp;gt;';
		$this-&amp;gt;_xml = @new SimpleXMLElement($string);
		$merchant = $this-&amp;gt;_xml-&amp;gt;addChild('merchantAuthentication');
		$merchant-&amp;gt;addChild('name',$this-&amp;gt;_api_login);
		$merchant-&amp;gt;addChild('transactionKey',$this-&amp;gt;_transaction_key);
		}

	private function _addObject($destination, $object) {
		$array = (array)$object;
		foreach ($array as $key =&amp;gt; $value) {
			if ($value &amp;amp;&amp;amp; !is_object($value)) {
				if (is_array($value) &amp;amp;&amp;amp; count($value)) {
					foreach ($value as $index =&amp;gt; $item) {
						$items = $destination-&amp;gt;addChild($key);
						$this-&amp;gt;_addObject($items, $item);
						}
					} 
				else {
					$destination-&amp;gt;addChild($key,$value);
					}
				} 
			elseif (is_object($value) &amp;amp;&amp;amp; self::_notEmpty($value)) {
				$dest = $destination-&amp;gt;addChild($key);
				$this-&amp;gt;_addObject($dest, $value);
				}
			}
		}

	private static function _notEmpty($object) {
		$array = (array)$object;
		foreach ($array as $key =&amp;gt; $value) {
			if ($value &amp;amp;&amp;amp; !is_object($value)) {
				return true;
				} 
			elseif (is_object($value)) {
				if (self::_notEmpty($value)) {
					return true;
					}
				}
			}
		return false;
		}

	};

class AuthorizeNetToken_Response extends AuthorizeNetXMLResponse {
	public function GetToken() {
		return $this-&amp;gt;_getElementContents("token");
		}
	};&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use it like so:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;define('AUTHORIZENET_API_LOGIN_ID', 'YOUR API LOGIN');
define('AUTHORIZENET_TRANSACTION_KEY','YOUR TRANSACTION KEY');
$API = new AuthorizeNetToken;
$response = $API-&amp;gt;GetTokenResponse(18588389);
print "token = " . $response-&amp;gt;GetToken();&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2013 22:41:32 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/GetHostedProfilePage-API-call-How-To-Use-It/m-p/34273#M18754</guid>
      <dc:creator>leiavoia</dc:creator>
      <dc:date>2013-05-16T22:41:32Z</dc:date>
    </item>
    <item>
      <title>Re: GetHostedProfilePage API call - How To Use It?</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/GetHostedProfilePage-API-call-How-To-Use-It/m-p/49148#M24757</link>
      <description>Are there any Classic ASP coders that can share code to retrieve the token? TIA</description>
      <pubDate>Sat, 13 Dec 2014 18:57:19 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/GetHostedProfilePage-API-call-How-To-Use-It/m-p/49148#M24757</guid>
      <dc:creator>steve-davis</dc:creator>
      <dc:date>2014-12-13T18:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: GetHostedProfilePage API call - How To Use It?</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/GetHostedProfilePage-API-call-How-To-Use-It/m-p/49166#M24770</link>
      <description>&lt;P&gt;If there's any Classic ASP coders out there still struggling with this, I finally figured out how to get the token.&amp;nbsp; If there's any interest, I could post it and see if there's a better method but at least it works.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Dec 2014 03:58:27 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/GetHostedProfilePage-API-call-How-To-Use-It/m-p/49166#M24770</guid>
      <dc:creator>steve-davis</dc:creator>
      <dc:date>2014-12-17T03:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: GetHostedProfilePage API call - How To Use It?</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/GetHostedProfilePage-API-call-How-To-Use-It/m-p/81235#M51214</link>
      <description>&lt;P&gt;Please explain how to get token and send me code&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 10:43:19 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/GetHostedProfilePage-API-call-How-To-Use-It/m-p/81235#M51214</guid>
      <dc:creator>balamurugan</dc:creator>
      <dc:date>2022-02-14T10:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: GetHostedProfilePage API call - How To Use It?</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/GetHostedProfilePage-API-call-How-To-Use-It/m-p/81236#M51215</link>
      <description>&lt;P&gt;How to get token please send me code&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 10:47:00 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/GetHostedProfilePage-API-call-How-To-Use-It/m-p/81236#M51215</guid>
      <dc:creator>balamurugan</dc:creator>
      <dc:date>2022-02-14T10:47:00Z</dc:date>
    </item>
  </channel>
</rss>

