cancel
Showing results for 
Search instead for 
Did you mean: 

CIM iFrame and getHostedProfilePageRequest

Can someone explain part of the iframe process when using the CIM API like I'm 5 :smileyhappy:?

 

Product: CIM

Language: ColdFusion (not terribly relevant to the question)

 

Here's where I'm at: I have succesfully created a customer profile and added a payment profile to said customer profile.
 I have gotten to the point where I can submit the customer's profile ID in a "getHostedProfilePageRequest" call and receive a valid token. I then use the button/hidden form field method to post this token to the iframe (by name) using the following URL as the action attribute of the form tag "https://test.authorize.net/profile/manage". This causes the iframe to populate with the standard "edit profile"/"add payment method" form. When I'm done and have clicked the "save" button for any changes I've made, I'm taken right back to the standard "edit profile"/"add payment method" form.

 

My question: how do I get the iframe to go away/close when payment information is done being manipulated? after searching these forums, I have seen mention of "hostedProfileReturnUrl" and "hostedProfileReturnUrlText" to create a button that closes out the AuthNet page, but the documentation (straight XML) says NOT to pass these when working with an iframe. I have also seen mention of the "hostedProfileIFrameCommunicatorUrl" being something of importance when dealing with the iframe setup.

 

How do I use it? I gather that there should be some form of JavaScript in whatever URL I pass there, but what JS? What should it do and how?

 

Any samples/scenarios or insight at all would be appreciated!

5 REPLIES 5

I have spent some time looking through the community in the time since I posted the first message and still haven't come up with something stating specifics on how to implement the "hostedProfileIFrameCommunicatorUrl" parameter and how the page it references should work.

 

Anyone? Thanks!

 

Hi,

 

Our CIM Hosted Popup sample code has a working example of the iFrameCommunicator that shows how to send a signal to your code when the save has completed.

 

Thanks,

Joy

Hi I am also trying to close popup after saving or close action. but it did not work. As you suggest i check my iframe communicator url (https://test.com:8443/ecommerce/control/hostedProfileResponse) give in the xml file called during open ifram.  Also the domain of the (https://test.com:8443/ecommerce/control/callCim) are same but i frame does't close on the action. I check in the browser console it gives issue Uncaught SecurityError: Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Blocked a frame with origin "https://test.com:8443" from accessing a frame with origin "https://test.authorize.net". Protocols, domains, and ports must match.  Can you please suggest me waht i am doing wrong. Thanks in advance.

anchit
Member

This example does not show how/where to set the hostedProfileIFrameCommunicatorUrl.

 

Please reply ASAP with instructions as we have a go-live this Thursday.