<?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 Cannot get Accept.js to work with my own form in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Cannot-get-Accept-js-to-work-with-my-own-form/m-p/88473#M55759</link>
    <description>&lt;P&gt;I am trying to use Accept.js with own form on our website.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I call&lt;STRONG&gt;&lt;EM&gt; Accept.dispatchData(secureData, responseHandler);&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt; and that appears to work correctly, if I enter all the form values corectly, it does not return any error. If I enter say the credit number incorrectly it detects that returns the corresponding error code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;E_WC_05&lt;/TD&gt;&lt;TD&gt;Please provide valid credit card number.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;However, if all my values are correct, my form just posts back and does nothing else.&amp;nbsp; The next line in sequence that should have been executed is as under:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;paymentFormUpdate(response.opaqueData);&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;It does not get executed. The&lt;EM&gt;&lt;STRONG&gt;paymentFormUpdate &lt;/STRONG&gt;&lt;/EM&gt;function has been taken from the sample code and has not been changed, except changing the field name to match the variable names that I have . I am listing it below for reference.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;f&lt;/STRONG&gt;&lt;STRONG&gt;unction paymentFormUpdate(opaqueData) {&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;document.getElementById("dataDescriptor").value = opaqueData.dataDescriptor;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;document.getElementById("dataValue").value = opaqueData.dataValue;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;// If using your own form to collect the sensitive data from the customer,&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;// blank out the fields before submitting them to your &lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;document.getElementById("txtAmountPaid").value = "";&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;document.getElementById("txtTotalCharge").value = "";&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;document.getElementById("txtCreditCardNumber").value = "";&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;document.getElementById("txtpMonth").value = "";&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;document.getElementById("txtYear").value = "";&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;document.getElementById("txtSecurityCode").value = "";&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;//document.getElementById("accountNumber").value = "";&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;//document.getElementById("routingNumber").value = "";&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;///document.getElementById("nameOnAccount").value = "";&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;//document.getElementById("accountType").value = "";&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;document.getElementById("paymentForm").submit();&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;When truing to debug the program, it does not appears to be going into the&lt;EM&gt;&lt;STRONG&gt;paymentFormUpdate&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt; function, makes me suspicious there is no value in &lt;STRONG&gt;&lt;EM&gt;opaqueData&lt;/EM&gt;.&amp;nbsp;&lt;/STRONG&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Also, when there are no errors in the call to&lt;STRONG&gt;&lt;EM&gt;Accept.dispatchData(secureData, responseHandler);&amp;nbsp;&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;it does not return&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;I_WC_01&lt;/TD&gt;&lt;TD&gt;Successful.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;even when there are no errors.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am up against a deadline and have tried my luck everywhere, in vain.&amp;nbsp; Will really appreciate any help from aynone who might have experienced anything similar.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jan 2024 07:38:40 GMT</pubDate>
    <dc:creator>vineet1905</dc:creator>
    <dc:date>2024-01-03T07:38:40Z</dc:date>
    <item>
      <title>Cannot get Accept.js to work with my own form</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Cannot-get-Accept-js-to-work-with-my-own-form/m-p/88473#M55759</link>
      <description>&lt;P&gt;I am trying to use Accept.js with own form on our website.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I call&lt;STRONG&gt;&lt;EM&gt; Accept.dispatchData(secureData, responseHandler);&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt; and that appears to work correctly, if I enter all the form values corectly, it does not return any error. If I enter say the credit number incorrectly it detects that returns the corresponding error code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;E_WC_05&lt;/TD&gt;&lt;TD&gt;Please provide valid credit card number.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;However, if all my values are correct, my form just posts back and does nothing else.&amp;nbsp; The next line in sequence that should have been executed is as under:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;paymentFormUpdate(response.opaqueData);&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;It does not get executed. The&lt;EM&gt;&lt;STRONG&gt;paymentFormUpdate &lt;/STRONG&gt;&lt;/EM&gt;function has been taken from the sample code and has not been changed, except changing the field name to match the variable names that I have . I am listing it below for reference.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;f&lt;/STRONG&gt;&lt;STRONG&gt;unction paymentFormUpdate(opaqueData) {&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;document.getElementById("dataDescriptor").value = opaqueData.dataDescriptor;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;document.getElementById("dataValue").value = opaqueData.dataValue;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;// If using your own form to collect the sensitive data from the customer,&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;// blank out the fields before submitting them to your &lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;document.getElementById("txtAmountPaid").value = "";&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;document.getElementById("txtTotalCharge").value = "";&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;document.getElementById("txtCreditCardNumber").value = "";&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;document.getElementById("txtpMonth").value = "";&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;document.getElementById("txtYear").value = "";&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;document.getElementById("txtSecurityCode").value = "";&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;//document.getElementById("accountNumber").value = "";&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;//document.getElementById("routingNumber").value = "";&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;///document.getElementById("nameOnAccount").value = "";&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;//document.getElementById("accountType").value = "";&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;document.getElementById("paymentForm").submit();&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;When truing to debug the program, it does not appears to be going into the&lt;EM&gt;&lt;STRONG&gt;paymentFormUpdate&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt; function, makes me suspicious there is no value in &lt;STRONG&gt;&lt;EM&gt;opaqueData&lt;/EM&gt;.&amp;nbsp;&lt;/STRONG&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Also, when there are no errors in the call to&lt;STRONG&gt;&lt;EM&gt;Accept.dispatchData(secureData, responseHandler);&amp;nbsp;&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;it does not return&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;I_WC_01&lt;/TD&gt;&lt;TD&gt;Successful.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;even when there are no errors.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am up against a deadline and have tried my luck everywhere, in vain.&amp;nbsp; Will really appreciate any help from aynone who might have experienced anything similar.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2024 07:38:40 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Cannot-get-Accept-js-to-work-with-my-own-form/m-p/88473#M55759</guid>
      <dc:creator>vineet1905</dc:creator>
      <dc:date>2024-01-03T07:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot get Accept.js to work with my own form</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Cannot-get-Accept-js-to-work-with-my-own-form/m-p/88776#M55950</link>
      <description>&lt;P&gt;Have you checked your API login key and public client key? &amp;nbsp;If these keys are missing or incorrect then you will not receive the opagueData values. &amp;nbsp;Rather, you might see this error, E_WC_21: User authentication failed due to invalid authentication values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Feb 2024 17:17:29 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Cannot-get-Accept-js-to-work-with-my-own-form/m-p/88776#M55950</guid>
      <dc:creator>Burke</dc:creator>
      <dc:date>2024-02-10T17:17:29Z</dc:date>
    </item>
  </channel>
</rss>

