<?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 AcceptCore.js:3 Library is not coming from Accept CDN - Accept.js not working with Salesforce in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/AcceptCore-js-3-Library-is-not-coming-from-Accept-CDN-Accept-js/m-p/60622#M35142</link>
    <description>&lt;P&gt;Dear&amp;nbsp;&lt;a href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/20843"&gt;@Aaron&lt;/a&gt;&amp;nbsp;and All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are trying to implement Accept.js to create a payment terminal in the back end of Salesforce under the new Lightning user interface. The Lightning UI implements a Content Security Policy that does not allow 3rd party Javascript files to be loaded from an external site. There is some documentation on this &lt;A href="https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/csp_trusted_sites.htm" target="_blank"&gt;here&lt;/A&gt;. The&amp;nbsp;Lightning UI will only load JS files that come from a Salesforce server (this is a 'Static Resource' in Salesforce' parliance).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, we tried&amp;nbsp;copying the Accept.js into a local file that could be loaded from Salesforce' servers. In this case, we get the following errors from Accept.js:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When loading the library:&lt;/P&gt;&lt;P&gt;AcceptCore.js:3 Library is not coming from Accept CDN.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And when trying to call&amp;nbsp;Accept.dispatchData():&lt;/P&gt;&lt;P&gt;0:{code: "E_WC_01", text: "Please include Accept.js library from cdn."}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, we are stuck between a rock and a hard place. Even if Salesforce&amp;nbsp;ever allows 3rd party JS libraries, it will be a while before that happens. Is there any other version of Accept.js that can work under a restrictive Content Security Policy, or when not loaded directly from Authorize.net? (Accept Hosted does not work in Salesforce' back end either).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What can we do to find a way to get Accept.js working under these circumstances?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and Best Regards,&lt;BR /&gt;Josh&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 27 Nov 2017 15:05:07 GMT</pubDate>
    <dc:creator>BSYFDev1</dc:creator>
    <dc:date>2017-11-27T15:05:07Z</dc:date>
    <item>
      <title>AcceptCore.js:3 Library is not coming from Accept CDN - Accept.js not working with Salesforce</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/AcceptCore-js-3-Library-is-not-coming-from-Accept-CDN-Accept-js/m-p/60622#M35142</link>
      <description>&lt;P&gt;Dear&amp;nbsp;&lt;a href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/20843"&gt;@Aaron&lt;/a&gt;&amp;nbsp;and All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are trying to implement Accept.js to create a payment terminal in the back end of Salesforce under the new Lightning user interface. The Lightning UI implements a Content Security Policy that does not allow 3rd party Javascript files to be loaded from an external site. There is some documentation on this &lt;A href="https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/csp_trusted_sites.htm" target="_blank"&gt;here&lt;/A&gt;. The&amp;nbsp;Lightning UI will only load JS files that come from a Salesforce server (this is a 'Static Resource' in Salesforce' parliance).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, we tried&amp;nbsp;copying the Accept.js into a local file that could be loaded from Salesforce' servers. In this case, we get the following errors from Accept.js:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When loading the library:&lt;/P&gt;&lt;P&gt;AcceptCore.js:3 Library is not coming from Accept CDN.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And when trying to call&amp;nbsp;Accept.dispatchData():&lt;/P&gt;&lt;P&gt;0:{code: "E_WC_01", text: "Please include Accept.js library from cdn."}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, we are stuck between a rock and a hard place. Even if Salesforce&amp;nbsp;ever allows 3rd party JS libraries, it will be a while before that happens. Is there any other version of Accept.js that can work under a restrictive Content Security Policy, or when not loaded directly from Authorize.net? (Accept Hosted does not work in Salesforce' back end either).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What can we do to find a way to get Accept.js working under these circumstances?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and Best Regards,&lt;BR /&gt;Josh&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2017 15:05:07 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/AcceptCore-js-3-Library-is-not-coming-from-Accept-CDN-Accept-js/m-p/60622#M35142</guid>
      <dc:creator>BSYFDev1</dc:creator>
      <dc:date>2017-11-27T15:05:07Z</dc:date>
    </item>
    <item>
      <title>Re: AcceptCore.js:3 Library is not coming from Accept CDN - Accept.js not working with Salesforce</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/AcceptCore-js-3-Library-is-not-coming-from-Accept-CDN-Accept-js/m-p/60651#M35171</link>
      <description>&lt;P&gt;Even if you re-wrote Accept.js to use&amp;nbsp;a local copy of AcceptCore.js, Authorize.net's API should reject the request when the scripts are not being loaded from thier server.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One way on Salesforce is to use Apex classes and do direct payments:&lt;/P&gt;&lt;P&gt;&lt;A href="https://c.na50.visual.force.com/apex/DoPayment" target="_blank"&gt;https://c.na50.visual.force.com/apex/DoPayment&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2017 19:51:49 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/AcceptCore-js-3-Library-is-not-coming-from-Accept-CDN-Accept-js/m-p/60651#M35171</guid>
      <dc:creator>NexusSoftware</dc:creator>
      <dc:date>2017-11-28T19:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: AcceptCore.js:3 Library is not coming from Accept CDN - Accept.js not working with Salesforce</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/AcceptCore-js-3-Library-is-not-coming-from-Accept-CDN-Accept-js/m-p/60657#M35177</link>
      <description>&lt;P&gt;Thanks. We're not too interested in rewriting Accept.js. But we would like to do everything client-side, so that the credit card numbers don't touch our servers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That link looks like it goes to an internal web page, it's not accessible.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2017 22:50:49 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/AcceptCore-js-3-Library-is-not-coming-from-Accept-CDN-Accept-js/m-p/60657#M35177</guid>
      <dc:creator>BSYFDev1</dc:creator>
      <dc:date>2017-11-28T22:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: AcceptCore.js:3 Library is not coming from Accept CDN - Accept.js not working with Salesforce</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/AcceptCore-js-3-Library-is-not-coming-from-Accept-CDN-Accept-js/m-p/60660#M35180</link>
      <description>&lt;P&gt;That link should be &lt;A href="https://nexweb-developer-edition.na50.force.com/" target="_blank"&gt;https://nexweb-developer-edition.na50.force.com&lt;/A&gt;, it posts to the sandbox.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another option would to create&amp;nbsp;a payment processing microservice outside of SalesForce and update any necessary records at&amp;nbsp;SalesForce via their API.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2017 23:45:10 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/AcceptCore-js-3-Library-is-not-coming-from-Accept-CDN-Accept-js/m-p/60660#M35180</guid>
      <dc:creator>NexusSoftware</dc:creator>
      <dc:date>2017-11-28T23:45:10Z</dc:date>
    </item>
  </channel>
</rss>

