Showing results for 
Search instead for 
Did you mean: 

Problem with CIM hosted form



So far I managed to get CIM working with hosted form. I can add CC and save it, edit and delete. I saw in the popup.js that there is a function called AuthorizeNetPopup.onReceiveCommunication and I wanted to use it because of the params["action"] param which returns successfulSave or cancel. But that function is never fired. I start debugging and everything in my client was OK. All events were wired up. Then I started to debug authorize's profile.js. Then I saw why that function was never fired up. 


,onSuccess: function(apiResp, i) {
if (g_singleItemMode) {
} else {
this.showEditMode(false, i);
setTimeout("reloadCustProf()", 1);
The field g_singleItemMode is always false so it never send message to my client. Can you tell me how can I make the field g_singleItemMode to be TRUE?

In order for these actions to be sent, it's important that you are making use of the "iFrameCommunicator". This communicator is used to relay the actions to your page. You can see an example of this communicator page in the sample code that you referenced. You'll want to make sure that it is being loaded and that it is on precisely the same domain as your main script.

Administrator Administrator

Of course we do. You can see the code bellow. The problem still remains :(


<div id="divAuthorizeNetPopup" style="display:none;" class="AuthorizeNetPopupGrayFrameTheme">
<div class="AuthorizeNetPopupOuter">
<div class="AuthorizeNetPopupTop">
<div class="AuthorizeNetPopupClose">
<a href="javascript&colon;;" onclick="AuthorizeNetPopup.closePopup();" title="Close"> </a>
<div class="AuthorizeNetPopupInner">
<iframe name="iframeAuthorizeNet" id="iframeAuthorizeNet" src="~/Content/authorizenet/IframeCommunicator.html" frameborder="0" scrolling="no"></iframe>
<div class="AuthorizeNetPopupBottom">
<div class="AuthorizeNetPopupLogo" title="Powered by Authorize.Net"></div>
<div class="AuthorizeNetShadow AuthorizeNetShadowT"></div>
<div class="AuthorizeNetShadow AuthorizeNetShadowR"></div>
<div class="AuthorizeNetShadow AuthorizeNetShadowB"></div>
<div class="AuthorizeNetShadow AuthorizeNetShadowL"></div>
<div class="AuthorizeNetShadow AuthorizeNetShadowTR"></div>
<div class="AuthorizeNetShadow AuthorizeNetShadowBR"></div>
<div class="AuthorizeNetShadow AuthorizeNetShadowBL"></div>
<div class="AuthorizeNetShadow AuthorizeNetShadowTL"></div>
<div id="divAuthorizeNetPopupScreen" style="display:none;"></div>

Bump.  I know I am passing values to the GetHostedProfilePage object because I can turn the "hostedProfilePageBorderVisible" feature.  For hostedProfileIFrameCommunicatorUrl I am passing the exact same URL as I am in my web.config file except the hostedProfileIFrameCommunicatorUrl value contains contentx/iFrameCommunicator.html.


I've spent an entire day trying EVERYTHING I can think of.  I cannot get the IFrameCommunicator.html to fire.  EVERYTHING else works fine.


I'm thinking about trying another solution this has me so frustrated.





I recommend that you take a look at the source code of the hosted form to see if the iFrame is loading. If it is loading, then you'll need to take a look at your JavaScript to make sure that it is properly set to receive the signals from the iFrameCommunicator.




What javascript setup I have to do to get this working?


The javascript located in the iframe is loaded and working.



just tell me what is 'g_singleItemMode' and when it is TRUE?

On the

Is probably the one said "CIM - Hosted popup for single payment/shipping"

I have the same problem! The token is set correctly, the javascript is set up as instructed, I see the iframeCommunicator.html loading, but I recieve no hash from the API, so the initial 


Never gets called. This shouldn't require so much code foo. It's rediculous the hoops you have to go through to decipher this process.