<?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: Online payment page in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Online-payment-page/m-p/72217#M44579</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The button text is arbitrary and can say anything&amp;nbsp; you would like. The button style can be modified with CSS just like any other on page UI elements.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, a simple Accept.js with the hosted form:&lt;/P&gt;&lt;PRE&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;title&amp;gt;Sample form&amp;lt;/title&amp;gt;
    &amp;lt;style&amp;gt;

.myButton {
    background-color:#44c767;
    border-radius:28px;
    border:1px solid #18ab29;
    display:inline-block;
    cursor:pointer;
    color:#ffffff;
    font-family:Arial;
    font-size:17px;
    padding:16px 31px;
    text-decoration:none;
    text-shadow:0px 1px 0px #2f6627;
}
.myButton:hover {
    background-color:#5cbf2a;
}
.myButton:active {
    position:relative;
    top:1px;
}

    &amp;lt;/style&amp;gt;
&amp;lt;/head&amp;gt;

&amp;lt;body&amp;gt;

&amp;lt;script type="text/javascript"
    src="https://jstest.authorize.net/v3/AcceptUI.js"
    charset="utf-8"&amp;gt;
&amp;lt;/script&amp;gt;

&amp;lt;form id="paymentForm"
    method="POST"
    action="https://YourServer/PathToExistingPaymentProcessingScript"&amp;gt;
    &amp;lt;input type="hidden" name="dataValue" id="dataValue" /&amp;gt;
    &amp;lt;input type="hidden" name="dataDescriptor" id="dataDescriptor" /&amp;gt;
    &amp;lt;button type="button"
        class="AcceptUI myButton"
        data-billingAddressOptions='{"show":true, "required":false}' 
        data-apiLoginID="YOUR API LOGIN ID" 
        data-clientKey="YOUR PUBLIC CLIENT KEY"
        data-acceptUIFormBtnTxt="Submit" 
        data-acceptUIFormHeaderTxt="Card Information" 
        data-responseHandler="responseHandler"&amp;gt;Buy Now&amp;lt;/button&amp;gt;
&amp;lt;/form&amp;gt;

&amp;lt;script type="text/javascript"&amp;gt;

function responseHandler(response) {
    if (response.messages.resultCode === "Error") {
        var i = 0;
        while (i &amp;lt; response.messages.message.length) {
            console.log(
                response.messages.message[i].code + ": " +
                response.messages.message[i].text
            );
            i = i + 1;
        }
    } else {
        paymentFormUpdate(response.opaqueData);
    }
}


function paymentFormUpdate(opaqueData) {
    document.getElementById("dataDescriptor").value = opaqueData.dataDescriptor;
    document.getElementById("dataValue").value = opaqueData.dataValue;

    // If using your own form to collect the sensitive data from the customer,
    // blank out the fields before submitting them to your server.
    // document.getElementById("cardNumber").value = "";
    // document.getElementById("expMonth").value = "";
    // document.getElementById("expYear").value = "";
    // document.getElementById("cardCode").value = "";

    document.getElementById("paymentForm").submit();
}
&amp;lt;/script&amp;gt;

&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 16 Jun 2020 12:14:02 GMT</pubDate>
    <dc:creator>NexusSoftware</dc:creator>
    <dc:date>2020-06-16T12:14:02Z</dc:date>
    <item>
      <title>Online payment page</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Online-payment-page/m-p/72206#M44572</link>
      <description>&lt;P&gt;Hello, everyone. I need some help in getting a Pay Online type of button added to my website. Using the forum, I found a simple method to do so, but I am not 100% sure if I have done it correctly. Here is the code I am using:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;title&amp;gt;Payment form&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;

&amp;lt;body&amp;gt;

&amp;lt;script type="text/javascript" src="https://jstest.authorize.net/v3/AcceptUI.js" charset="utf-8"&amp;gt;
&amp;lt;/script&amp;gt;

&amp;lt;form id="paymentForm" method="POST" action="https://YourServer/PathToExistingPaymentProcessingScript"&amp;gt;
    &amp;lt;input type="hidden" name="dataValue" id="dataValue"&amp;gt;
    &amp;lt;input type="hidden" name="dataDescriptor" id="dataDescriptor"&amp;gt;
    &amp;lt;button type="button" class="AcceptUI" data-billingaddressoptions='{"show":true, "required":false}' data-apiloginid="XXXXXXXXX" data-clientkey="XXXXXXXXXXXXXXXX" data-acceptuiformbtntxt="Submit" data-acceptuiformheadertxt="Card Information" data-responsehandler="responseHandler"&amp;gt;Pay Online
    &amp;lt;/button&amp;gt;
&amp;lt;/form&amp;gt;

&amp;lt;script type="text/javascript"&amp;gt;

function responseHandler(response) {
    if (response.messages.resultCode === "Error") {
        var i = 0;
        while (i &amp;lt; response.messages.message.length) {
            console.log(
                response.messages.message[i].code + ": " +
                response.messages.message[i].text
            );
            i = i + 1;
        }
    } else {
        paymentFormUpdate(response.opaqueData);
    }
}


function paymentFormUpdate(opaqueData) {
    document.getElementById("dataDescriptor").value = opaqueData.dataDescriptor;
    document.getElementById("dataValue").value = opaqueData.dataValue;

    // If using your own form to collect the sensitive data from the customer,
    // blank out the fields before submitting them to your server.
    // document.getElementById("cardNumber").value = "";
    // document.getElementById("expMonth").value = "";
    // document.getElementById("expYear").value = "";
    // document.getElementById("cardCode").value = "";

    document.getElementById("paymentForm").submit();
}
&amp;lt;/script&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;What I am hoping to do is use Hosted Access so that when the customer clicks on the Pay Online button, it redirects them to the virtual payment form on Authorize.net.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does this look correct, or am I way off base? Also, how can edit the button itself? It is tiny and just a beige square with the words "Pay Online" in it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance!!&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jun 2020 19:53:03 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Online-payment-page/m-p/72206#M44572</guid>
      <dc:creator>solid</dc:creator>
      <dc:date>2020-06-15T19:53:03Z</dc:date>
    </item>
    <item>
      <title>Re: Online payment page</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Online-payment-page/m-p/72217#M44579</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The button text is arbitrary and can say anything&amp;nbsp; you would like. The button style can be modified with CSS just like any other on page UI elements.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, a simple Accept.js with the hosted form:&lt;/P&gt;&lt;PRE&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;title&amp;gt;Sample form&amp;lt;/title&amp;gt;
    &amp;lt;style&amp;gt;

.myButton {
    background-color:#44c767;
    border-radius:28px;
    border:1px solid #18ab29;
    display:inline-block;
    cursor:pointer;
    color:#ffffff;
    font-family:Arial;
    font-size:17px;
    padding:16px 31px;
    text-decoration:none;
    text-shadow:0px 1px 0px #2f6627;
}
.myButton:hover {
    background-color:#5cbf2a;
}
.myButton:active {
    position:relative;
    top:1px;
}

    &amp;lt;/style&amp;gt;
&amp;lt;/head&amp;gt;

&amp;lt;body&amp;gt;

&amp;lt;script type="text/javascript"
    src="https://jstest.authorize.net/v3/AcceptUI.js"
    charset="utf-8"&amp;gt;
&amp;lt;/script&amp;gt;

&amp;lt;form id="paymentForm"
    method="POST"
    action="https://YourServer/PathToExistingPaymentProcessingScript"&amp;gt;
    &amp;lt;input type="hidden" name="dataValue" id="dataValue" /&amp;gt;
    &amp;lt;input type="hidden" name="dataDescriptor" id="dataDescriptor" /&amp;gt;
    &amp;lt;button type="button"
        class="AcceptUI myButton"
        data-billingAddressOptions='{"show":true, "required":false}' 
        data-apiLoginID="YOUR API LOGIN ID" 
        data-clientKey="YOUR PUBLIC CLIENT KEY"
        data-acceptUIFormBtnTxt="Submit" 
        data-acceptUIFormHeaderTxt="Card Information" 
        data-responseHandler="responseHandler"&amp;gt;Buy Now&amp;lt;/button&amp;gt;
&amp;lt;/form&amp;gt;

&amp;lt;script type="text/javascript"&amp;gt;

function responseHandler(response) {
    if (response.messages.resultCode === "Error") {
        var i = 0;
        while (i &amp;lt; response.messages.message.length) {
            console.log(
                response.messages.message[i].code + ": " +
                response.messages.message[i].text
            );
            i = i + 1;
        }
    } else {
        paymentFormUpdate(response.opaqueData);
    }
}


function paymentFormUpdate(opaqueData) {
    document.getElementById("dataDescriptor").value = opaqueData.dataDescriptor;
    document.getElementById("dataValue").value = opaqueData.dataValue;

    // If using your own form to collect the sensitive data from the customer,
    // blank out the fields before submitting them to your server.
    // document.getElementById("cardNumber").value = "";
    // document.getElementById("expMonth").value = "";
    // document.getElementById("expYear").value = "";
    // document.getElementById("cardCode").value = "";

    document.getElementById("paymentForm").submit();
}
&amp;lt;/script&amp;gt;

&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2020 12:14:02 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Online-payment-page/m-p/72217#M44579</guid>
      <dc:creator>NexusSoftware</dc:creator>
      <dc:date>2020-06-16T12:14:02Z</dc:date>
    </item>
  </channel>
</rss>

