<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: hostedProfileIFrameCommunicatorUrl only returning resizeWindow for iFrame in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/hostedProfileIFrameCommunicatorUrl-only-returning-resizeWindow/m-p/75786#M47293</link>
    <description>&lt;P&gt;HOSTED_PROFILE_RETURN_URL("hostedProfileReturnUrl"),&lt;BR /&gt;HOSTED_PROFILE_RETURN_URL_TEXT("hostedProfileReturnUrlText"),&lt;BR /&gt;HOSTED_PROFILE_HEADING_BG_COLOR("hostedProfileHeadingBgColor"),&lt;BR /&gt;HOSTED_PROFILE_PAGE_BORDER_VISIBLE("hostedProfilePageBorderVisible"),&lt;BR /&gt;HOSTED_PROFILE_IFRAME_COMMUNICATOR_URL("hostedProfileIFrameCommunicatorUrl"),&lt;BR /&gt;HOSTED_PROFILE_VALIDATION_MODE("hostedProfileValidationMode");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://customersurvey.onl/www-postalexperience-com-pos/" target="_self"&gt;postalexperience.com/pos&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 14 Apr 2021 10:09:25 GMT</pubDate>
    <dc:creator>menudwai</dc:creator>
    <dc:date>2021-04-14T10:09:25Z</dc:date>
    <item>
      <title>hostedProfileIFrameCommunicatorUrl only returning resizeWindow for iFrame</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/hostedProfileIFrameCommunicatorUrl-only-returning-resizeWindow/m-p/64713#M38535</link>
      <description>&lt;P&gt;We're implementing the iFrame version of the Accept Customer Hosted Form for Customer Profiles, providing a hostedProfileIFrameCommunicatorUrl to communicate back to our page in order to take action should a form of payment be successfully added. The communicator is firing only for "manage" with "resizeWindow". "resizeWindow" is the only action ever returned when interacting with the form, even when adding a new payment type. I am specifically looking for Changes Saved messages to come back.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I missing a setting somewhere, or does the test API only return the one action?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only messages I see printed to the dev console when interacting with the form, adding payment types, removing, etc.:&lt;/P&gt;&lt;PRE&gt;[action: "resizeWindow", height: "245"]
manage
[action: "resizeWindow", height: "245"]
manage
[action: "resizeWindow", width: "806", height: "245"]
manage
[action: "resizeWindow", width: "806", height: "245"]
manage
[action: "resizeWindow", height: "245"]
manage&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;communicationHandler.html (this is copy/pasted from the sample application IFrameCommunicator.html)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;html xmlns="http://www.w3.org/1999/xhtml"&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;title&amp;gt;IFrame Communicator&amp;lt;/title&amp;gt;

    &amp;lt;!--
     To securely communicate between our Accept Hosted form and your web page,
     we need a communicator page which will be hosted on your site alongside
     your checkout/payment page. You can provide the URL of the communicator
     page in your token request, which will allow Authorize.Net to embed the
     communicator page in the payment form, and send JavaScript messaging through
     your communicator page to a listener script on your main page.
     This page contains a JavaScript that listens for events from the payment
     form and passes them to an event listener in the main page.
   --&amp;gt;


    &amp;lt;script type="text/javascript"&amp;gt;
        function callParentFunction(str) {
            if (str &amp;amp;&amp;amp; str.length &amp;gt; 0 &amp;amp;&amp;amp;     window.parent &amp;amp;&amp;amp; window.parent.parent
                &amp;amp;&amp;amp; window.parent.parent.CommunicationHandler &amp;amp;&amp;amp; window.parent.parent.CommunicationHandler.onReceiveCommunication) {
                var referrer = document.referrer;
                window.parent.parent.CommunicationHandler.onReceiveCommunication({qstr: str, parent: referrer});
            }
        }

        function receiveMessage(event) {
            if (event &amp;amp;&amp;amp; event.data) {
                callParentFunction(event.data);
            }
        }

        if (window.addEventListener) {
            window.addEventListener("message", receiveMessage, false);
        } else if (window.attachEvent) {
            window.attachEvent("onmessage", receiveMessage);
        }

        if (window.location.hash &amp;amp;&amp;amp; window.location.hash.length &amp;gt; 1) {
            callParentFunction(window.location.hash.substring(1));
        }
    &amp;lt;/script&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The call for getHostedProfilePageRequest:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;static retrieveAuthorizeNetToken(authorizeNetId) {

        const { apiLoginKey, transactionKey } = config
        const body = {
            getHostedProfilePageRequest: {
                merchantAuthentication: {
                    name: apiLoginKey,
                    transactionKey
                },
                customerProfileId: authorizeNetId,
                hostedProfileSettings: {
                    setting: [
                        {
                            settingName: 'hostedProfileManageOptions',
                            settingValue: 'showPayment'
                        },
                        {
                            settingName: 'hostedProfilePaymentOptions',
                            settingValue: 'showAll'
                        },
                        {
                            settingName: 'hostedProfileBillingAddressRequired',
                            settingValue: true
                        },
                        {
                            settingName: 'hostedProfileCardCodeRequired',
                            settingValue: true
                        },
                        {
                            settingName: 'hostedProfilePageBorderVisible',
                            settingValue: false
                        },
                        {
                            settingName: 'hostedProfileHeadingBgColor',
                            settingValue: '#3777bc'
                        },
                        {
                            settingName: 'hostedProfileIFrameCommunicatorUrl',
                            settingValue: 'OUR_INTERNAL_URL'
                        }
                    ]
                }

            }
        }

        const requestInstance = axios.create({
            withCredentials: false,
            headers: {
                'Content-Type': 'text/plain; charset=utf-8',
                Accept: 'text/plain'
            }
        })

        return requestInstance.post(`${authorizeNetUrl}/xml/v1/request.api`, body)

    }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where we display the form, automatically submitting with the authorizeNetToken we retrieved:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;div&amp;gt;
    &amp;lt;iframe
        id="load_payment"
        className="embed-responsive-item"
        name="load_payment"
        width="100%"
        height="650px"
        frameBorder="0"
        scrolling="no"
    /&amp;gt;
    &amp;lt;form id="send_hptoken" action="https://test.authorize.net/customer/manage" method="post"
        target="load_payment" ref={this.setIframeFormRef} hidden={true}&amp;gt;
        &amp;lt;input type="hidden" name="token" value={this.props.shop.authorizeNetToken}/&amp;gt;
    &amp;lt;/form&amp;gt;
&amp;lt;/div&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 16:40:58 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/hostedProfileIFrameCommunicatorUrl-only-returning-resizeWindow/m-p/64713#M38535</guid>
      <dc:creator>mwilliams</dc:creator>
      <dc:date>2018-10-09T16:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: hostedProfileIFrameCommunicatorUrl only returning resizeWindow for iFrame</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/hostedProfileIFrameCommunicatorUrl-only-returning-resizeWindow/m-p/75786#M47293</link>
      <description>&lt;P&gt;HOSTED_PROFILE_RETURN_URL("hostedProfileReturnUrl"),&lt;BR /&gt;HOSTED_PROFILE_RETURN_URL_TEXT("hostedProfileReturnUrlText"),&lt;BR /&gt;HOSTED_PROFILE_HEADING_BG_COLOR("hostedProfileHeadingBgColor"),&lt;BR /&gt;HOSTED_PROFILE_PAGE_BORDER_VISIBLE("hostedProfilePageBorderVisible"),&lt;BR /&gt;HOSTED_PROFILE_IFRAME_COMMUNICATOR_URL("hostedProfileIFrameCommunicatorUrl"),&lt;BR /&gt;HOSTED_PROFILE_VALIDATION_MODE("hostedProfileValidationMode");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://customersurvey.onl/www-postalexperience-com-pos/" target="_self"&gt;postalexperience.com/pos&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 10:09:25 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/hostedProfileIFrameCommunicatorUrl-only-returning-resizeWindow/m-p/75786#M47293</guid>
      <dc:creator>menudwai</dc:creator>
      <dc:date>2021-04-14T10:09:25Z</dc:date>
    </item>
  </channel>
</rss>

