11-19-2013 01:03 PM
Can someone explain part of the iframe process when using the CIM API like I'm 5 :smileyhappy:?
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.
Any samples/scenarios or insight at all would be appreciated!
11-21-2013 09:25 AM
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.
11-26-2013 11:14 AM
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.
11-08-2014 01:29 AM
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.