I'm using CIM hosted option and am having a couple of issues after running AuthorizeNetPopup.openAddPaymentPopup().
1) When I press 'cancel', the popup doesn't close but whites out. Only the border remains. When I debug in the browser, i get Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://localhost:4286') does not match the recipient window's origin ('null'). Looked at Google but it wasn't enlightening.
2) After entering a payment profile, the result reads 'Your information has been saved'. Is there a way for it to close instead and navigate to another page or notify me of the update? I assume this is what hostedProfileIFrameCommunicatorUrl is for but I haven't gotten it to work yet.
03-21-2014 02:38 PM
03-24-2014 08:46 AM
This error would seem to indicate that the iFrameCommunicator is being loaded, but for some reason it isn't successfully targeting the parent window. If you look at the code in our default iFrameCommunicator, you'll see that it references "parent.parent", this should raise the call past the hosted form and on to the window that is under your control.
The error is stating that it is not successfully targeting anything at all. Are you loading the hosted form in a lightbox, or in a popup window?
03-24-2014 01:16 PM
Hosted in a lightbox. I downloaded the example code and get the same result.
03-25-2014 08:47 AM
In the error message Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https:......') does not match the recipient window's origin ('null'), where does the second url ('null') come from?
03-25-2014 01:16 PM
bump.
The cancel button shows this:
<input type="button" class="CancelButton" id="btnCancelPaymentItem999" value="Cancel" onclick="btnCancelEdit_onclick(g_paymentItemEditInfo, 999)">
I don't see the handler for the onclick event anywhere. Please help!
03-26-2014 08:19 AM
When the save or cancel buttons are pressed, an event is initiated through the iFrameCommunicator. If you look at the iFrameCommunicator code, you can see precisely what function it is calling in your parent page, it is this function that acts as your event handler and can close or update the contents of the popup..
03-26-2014 03:40 PM
I understand what the iframecommunicator does but can't get it to work. I've updated iframecommunicator.html with console.log statements on the first line of each function and they're not appearing the the browser log. I'm not getting any javascript error messages in the browser either. I'm hoping to see the 'cancel' button press event.
I'm not sure how to troubleshoot this. Can you please provide some direction on what to do?
03-27-2014 07:55 AM
bump. Please help.
03-31-2014 01:08 PM
The first step that I would take in debugging the communicator is to make sure is properly loading. You can do this in most browsers through their developer console. The iFrame containing the communicator would be at the bottom of our own content in the Authorize.Net iFrame.
If the communicator is loading, then I really can't think of any reason that your console.log statements wouldn't work.
04-15-2014 01:09 PM