<?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 Accept Hosted iframe - passing cusomter data in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Accept-Hosted-iframe-passing-cusomter-data/m-p/59447#M34031</link>
    <description>&lt;P&gt;I'm developing a website to use the Accept Hosted iframe method for checkout. When retrieving a token, I'm trying to pass customer data including the billing address (per the instructions here &lt;A href="http://developer.authorize.net/api/reference/#payment-transactions-get-an-accept-payment-page" target="_blank"&gt;http://developer.authorize.net/api/reference/#payment-transactions-get-an-accept-payment-page&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, it seems that this requires the customer to enter their billing address, click submit, and then click another button to submit the token and other information to the iframe. How can I collect the entered billing info, validate it, and submit it to the iframe without needing to click two submit buttons?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Current Steps:&lt;/P&gt;&lt;P&gt;* Enter billing address into form.&lt;/P&gt;&lt;P&gt;* CLICK Submit.&lt;/P&gt;&lt;P&gt;* Validate billing address and generate token for Accept Hosted checkout form.&lt;/P&gt;&lt;P&gt;* CLICK Submit again to post token and billing address to iframe and display checkout form.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Desired Steps:&lt;/P&gt;&lt;P&gt;* Enter billing address into form.&lt;/P&gt;&lt;P&gt;* CLICK Submit.&lt;/P&gt;&lt;P&gt;* Display checkout form in iframe.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for any advice!&lt;/P&gt;</description>
    <pubDate>Fri, 18 Aug 2017 18:13:26 GMT</pubDate>
    <dc:creator>jm_dgsdev</dc:creator>
    <dc:date>2017-08-18T18:13:26Z</dc:date>
    <item>
      <title>Accept Hosted iframe - passing cusomter data</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Accept-Hosted-iframe-passing-cusomter-data/m-p/59447#M34031</link>
      <description>&lt;P&gt;I'm developing a website to use the Accept Hosted iframe method for checkout. When retrieving a token, I'm trying to pass customer data including the billing address (per the instructions here &lt;A href="http://developer.authorize.net/api/reference/#payment-transactions-get-an-accept-payment-page" target="_blank"&gt;http://developer.authorize.net/api/reference/#payment-transactions-get-an-accept-payment-page&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, it seems that this requires the customer to enter their billing address, click submit, and then click another button to submit the token and other information to the iframe. How can I collect the entered billing info, validate it, and submit it to the iframe without needing to click two submit buttons?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Current Steps:&lt;/P&gt;&lt;P&gt;* Enter billing address into form.&lt;/P&gt;&lt;P&gt;* CLICK Submit.&lt;/P&gt;&lt;P&gt;* Validate billing address and generate token for Accept Hosted checkout form.&lt;/P&gt;&lt;P&gt;* CLICK Submit again to post token and billing address to iframe and display checkout form.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Desired Steps:&lt;/P&gt;&lt;P&gt;* Enter billing address into form.&lt;/P&gt;&lt;P&gt;* CLICK Submit.&lt;/P&gt;&lt;P&gt;* Display checkout form in iframe.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for any advice!&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2017 18:13:26 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Accept-Hosted-iframe-passing-cusomter-data/m-p/59447#M34031</guid>
      <dc:creator>jm_dgsdev</dc:creator>
      <dc:date>2017-08-18T18:13:26Z</dc:date>
    </item>
    <item>
      <title>Re: Accept Hosted iframe - passing cusomter data</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Accept-Hosted-iframe-passing-cusomter-data/m-p/59449#M34033</link>
      <description>&lt;P&gt;One way is to check your token input's value with Javascript, because it will need to be populated with a valid token in order to get an Accept Payment form, then auto submit the form, if a token is found:&lt;/P&gt;&lt;PRE&gt;&amp;lt;script&amp;gt;
var token = document.forms["paymentForm"]["token"].value;
if (token &amp;gt; 0) {
document.getElementById("paymentForm").submit();
}
&amp;lt;/script&amp;gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 18 Aug 2017 19:39:24 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Accept-Hosted-iframe-passing-cusomter-data/m-p/59449#M34033</guid>
      <dc:creator>NexusSoftware</dc:creator>
      <dc:date>2017-08-18T19:39:24Z</dc:date>
    </item>
    <item>
      <title>Re: Accept Hosted iframe - passing cusomter data</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Accept-Hosted-iframe-passing-cusomter-data/m-p/59451#M34035</link>
      <description>&lt;P&gt;Thanks for your response.&lt;/P&gt;&lt;P&gt;That's not exactly what I meant, but I am having some success by using AJAX to validate my form.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far, I'm using JavaScript to intercept the form submission. I make an AJAX call to another script that validates the form values, submits them to authorize.net, and returns an Accept Hosted form token. So, when I submit my form with appropriate values, the AJAX call returns a token and I can inject it into the form before submission to the iframe is executed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm considering something further: configure the form to submit to the Accept Hosted "full redirect method", instead of the iframe method. That way it can serve as a fall-back in case the browser doesn't support JavaScript. Then, upon the response from my AJAX call, my JavaScript can generate a completely new form element to submit the token to the iframe, append it to the document, and submit it.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks again for your suggestion.&lt;/P&gt;&lt;P&gt;I'll try to work up an example to post here when I've got it nailed down.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2017 22:11:09 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Accept-Hosted-iframe-passing-cusomter-data/m-p/59451#M34035</guid>
      <dc:creator>jm_dgsdev</dc:creator>
      <dc:date>2017-08-18T22:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: Accept Hosted iframe - passing cusomter data</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Accept-Hosted-iframe-passing-cusomter-data/m-p/59452#M34036</link>
      <description>&lt;P&gt;With Ajax :&lt;/P&gt;&lt;PRE&gt;success: function(data) {&lt;BR /&gt;var obj = $.parseJSON(data);&lt;BR /&gt;$("#token").val(obj['token']);&lt;BR /&gt; if($("#token").val() !=''){&lt;BR /&gt;$("#payform").submit();&lt;BR /&gt;	}&lt;/PRE&gt;</description>
      <pubDate>Fri, 18 Aug 2017 22:21:49 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Accept-Hosted-iframe-passing-cusomter-data/m-p/59452#M34036</guid>
      <dc:creator>NexusSoftware</dc:creator>
      <dc:date>2017-08-18T22:21:49Z</dc:date>
    </item>
  </channel>
</rss>

