Showing results for 
Search instead for 
Did you mean: 

Not Getting Hosted Profile Page response event

I have a Laravel project webpage that includes a hosted payment form and a hosted profile form. Both are using iFrames and they both work in that they generate payments when submitting the payment form and create/remove payment profiles using the profile form. The problem is that I get a "transactResponse" event message from the Payment iFrame Communicator but the Profile iFrame Communicator only seems to give “resizeWindow” event messages. I have attempted to keep both sets of code as mirror images of each other with the only changes being in the settings passed to the token generator.


When the user requests the profile editor the following is loaded:


<div id="iframe_holder" class="center-block" data-mediator="methods-form-loader" style="max-width: 1000px">
    <iframe id="load_methods" class="embed-responsive-item" name="load_methods" scrolling="yes" width="595" height="500"

    <form id="send_hptoken" action="" method="post" target="load_methods">
        <input type="hidden" name="token"
    $(document).ready(function () {
        window.CommunicationHandler = {};

        function parseQueryString(str) {
            var vars = [];
            var arr = str.split('&');
            var pair;
            for (var i = 0; i < arr.length; i++) {
                pair = arr[i].split('=');
                vars[pair[0]] = unescape(pair[1]);
            return vars;

        window.CommunicationHandler.onReceiveCommunication = function (argument) {
            console.log("onReceiveCommunication: " + JSON.stringify(argument));
            var params = parseQueryString(argument.qstr)

            // the following represent actions returned by authnet and should be applied to the page
            switch (params['action']) {
                case "resizeWindow"     :

                case "successfulSave"   :

                case "cancel"           :

                case "transactResponse" :
                    var transResponse = JSON.parse(params['response']);

        //send the token

The list of settings used when creating the token are:

  "hostedProfilePageBorderVisible": "false",
  "hostedProfileIFrameCommunicatorUrl": "https:\/\/...\/billing\/MethodsIFrameCommunicator",
  "hostedProfileHeadingBgColor": "#00ff00",
  "hostedProfileBillingAddressRequired": "true",
  "hostedProfileCardCodeRequired": "true",
  "hostedProfileBillingAddressOptions": "showBillingAddress",
  "hostedProfileManageOptions": "showPayment",
  "hostedProfilePaymentOptions": "showAll",
  "hostedProfileValidationMode": "testMode"

Any help would be appreciated.


Since the profile does not do a transaction there is no transaction response from that one.  There is a success/failure indicator only, listen for successfulSave.


Hope this helps

Administrator Administrator

Thanks for the response but I did monitor the 'successfulSave' and it did not arrive - only a resizeWindow' event seems to be returned. I had removed my temporary console.log() debugging line for that event before posting the code - it never printed. I will remove the 'transactResponse' if my problem can be found.

We are experiencing the same issue.  For customer profile the only messages getting returned are the action "resizeWindow".   I am working on a proof of concept for a major change we want to make and this has me dead in the water that there is no acknowledgement for the successfulSave.

I am glad I am not alone in this. As a work-around, I have the iFrame embedded in a modal dialog and I capture the dialog's 'close' event and then query AuthNet for the profile and associated payment profiles and then update the local record with any changes found. Not elegant and I am sure I am eating some time to process but it does get me past the problem for the time being. I guess I need to work on using web hooks but for now I am under a time crunch.