<?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: accept hosted - Response of  payment checkout from iFrame . in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/accept-hosted-Response-of-payment-checkout-from-iFrame/m-p/58870#M33479</link>
    <description>&lt;P&gt;With the following you could put the parsed response into a variable named transResponse:&lt;/P&gt;&lt;PRE&gt;&amp;lt;script&amp;gt;
    window.CommunicationHandler = {};
    function parseQueryString(str) {
        var vars = [];
        var arr = str.split('&amp;amp;');
        var pair;
        for (var i = 0; i &amp;lt; arr.length; i++) {
            pair = arr[i].split('=');
            vars[pair[0]] = unescape(pair[1]);
        }
        return vars;
    }
    window.CommunicationHandler.onReceiveCommunication = function (argument) {
        params = parseQueryString(argument.qstr)
        parentFrame = argument.parent.split('/')[4];
          switch (params['action']) {
            case "transactResponse":
                var transResponse = JSON.parse(params['response']);
                $('#demo').html(transResponse.transId); // Transaction Id is here
               
        }

    }

&amp;lt;/script&amp;gt;
&lt;BR /&gt;&amp;lt;div id="demo"&amp;gt;&amp;lt;/div&amp;gt;&lt;/PRE&gt;&lt;P&gt;An example of the accessible results is :&lt;/P&gt;&lt;PRE&gt;{"accountType":"Visa","accountNumber":"XXXX0027","transId":"40005451341","responseCode":"1","authorization":"D908O8","billTo":{"phoneNumber":"1231231234","firstName":"Ellen","lastName":"Johnson","company":"Souveniropolis","address":"14 Main Street","city":"Pecan Springs","state":"TX","zip":"44628","country":"USA"},"shipTo":{},"orderDescription":"Product Description","taxAmount":"4.26","shippingAmount":"4.26","dutyAmount":"8.55","customerId":"99999456654","totalAmount":"0.50","poNumber":"456654","orderInvoiceNumber":"INV-12345","dateTime":"7/19/2017 3:43:19 PM"}"&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 19 Jul 2017 15:58:20 GMT</pubDate>
    <dc:creator>NexusSoftware</dc:creator>
    <dc:date>2017-07-19T15:58:20Z</dc:date>
    <item>
      <title>accept hosted - Response of  payment checkout from iFrame .</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/accept-hosted-Response-of-payment-checkout-from-iFrame/m-p/58864#M33473</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;Is there any way by which I can get particular token value in hosted payment form checkout response from iFrame.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone share full response with all possibilities which we are getting after payment submission from the accept hosted form from iFrame.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in Adanace .&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2017 12:19:40 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/accept-hosted-Response-of-payment-checkout-from-iFrame/m-p/58864#M33473</guid>
      <dc:creator>raviparmarce88</dc:creator>
      <dc:date>2017-07-19T12:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: accept hosted - Response of  payment checkout from iFrame .</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/accept-hosted-Response-of-payment-checkout-from-iFrame/m-p/58870#M33479</link>
      <description>&lt;P&gt;With the following you could put the parsed response into a variable named transResponse:&lt;/P&gt;&lt;PRE&gt;&amp;lt;script&amp;gt;
    window.CommunicationHandler = {};
    function parseQueryString(str) {
        var vars = [];
        var arr = str.split('&amp;amp;');
        var pair;
        for (var i = 0; i &amp;lt; arr.length; i++) {
            pair = arr[i].split('=');
            vars[pair[0]] = unescape(pair[1]);
        }
        return vars;
    }
    window.CommunicationHandler.onReceiveCommunication = function (argument) {
        params = parseQueryString(argument.qstr)
        parentFrame = argument.parent.split('/')[4];
          switch (params['action']) {
            case "transactResponse":
                var transResponse = JSON.parse(params['response']);
                $('#demo').html(transResponse.transId); // Transaction Id is here
               
        }

    }

&amp;lt;/script&amp;gt;
&lt;BR /&gt;&amp;lt;div id="demo"&amp;gt;&amp;lt;/div&amp;gt;&lt;/PRE&gt;&lt;P&gt;An example of the accessible results is :&lt;/P&gt;&lt;PRE&gt;{"accountType":"Visa","accountNumber":"XXXX0027","transId":"40005451341","responseCode":"1","authorization":"D908O8","billTo":{"phoneNumber":"1231231234","firstName":"Ellen","lastName":"Johnson","company":"Souveniropolis","address":"14 Main Street","city":"Pecan Springs","state":"TX","zip":"44628","country":"USA"},"shipTo":{},"orderDescription":"Product Description","taxAmount":"4.26","shippingAmount":"4.26","dutyAmount":"8.55","customerId":"99999456654","totalAmount":"0.50","poNumber":"456654","orderInvoiceNumber":"INV-12345","dateTime":"7/19/2017 3:43:19 PM"}"&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2017 15:58:20 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/accept-hosted-Response-of-payment-checkout-from-iFrame/m-p/58870#M33479</guid>
      <dc:creator>NexusSoftware</dc:creator>
      <dc:date>2017-07-19T15:58:20Z</dc:date>
    </item>
  </channel>
</rss>

