<?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 Is there a javascript example that anyone can share for calling the Cybersource reporting apis? in cybersource APIs</title>
    <link>https://community.developer.cybersource.com/t5/cybersource-APIs/Is-there-a-javascript-example-that-anyone-can-share-for-calling/m-p/88723#M1387</link>
    <description>&lt;P&gt;I have the report download api working in node.js but I need it working client side using javascript.&amp;nbsp; I appears that I need the function buffer() in node.js to create the properly formatted byte array.&amp;nbsp; If you have a javascript example or can point me to how to convert to a byte array in javascript, that would be so helpful.&lt;/P&gt;</description>
    <pubDate>Tue, 30 Jan 2024 16:52:32 GMT</pubDate>
    <dc:creator>jburticus</dc:creator>
    <dc:date>2024-01-30T16:52:32Z</dc:date>
    <item>
      <title>Is there a javascript example that anyone can share for calling the Cybersource reporting apis?</title>
      <link>https://community.developer.cybersource.com/t5/cybersource-APIs/Is-there-a-javascript-example-that-anyone-can-share-for-calling/m-p/88723#M1387</link>
      <description>&lt;P&gt;I have the report download api working in node.js but I need it working client side using javascript.&amp;nbsp; I appears that I need the function buffer() in node.js to create the properly formatted byte array.&amp;nbsp; If you have a javascript example or can point me to how to convert to a byte array in javascript, that would be so helpful.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2024 16:52:32 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/cybersource-APIs/Is-there-a-javascript-example-that-anyone-can-share-for-calling/m-p/88723#M1387</guid>
      <dc:creator>jburticus</dc:creator>
      <dc:date>2024-01-30T16:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a javascript example that anyone can share for calling the Cybersource reporting apis?</title>
      <link>https://community.developer.cybersource.com/t5/cybersource-APIs/Is-there-a-javascript-example-that-anyone-can-share-for-calling/m-p/88760#M1391</link>
      <description>&lt;P&gt;&lt;SPAN&gt;To enable the report download API on the client-side with JavaScript, you can replicate the Node.js &lt;/SPAN&gt;buffer()&lt;SPAN&gt; function using the &lt;/SPAN&gt;ArrayBuffer&lt;SPAN&gt; in JavaScript. Here's a simple example:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;// Node.js buffer function
const nodeBuffer = Buffer.from('YourData', 'utf-8');

// Equivalent ArrayBuffer in JavaScript
const arrayBuffer = new TextEncoder().encode('YourData');

// Converting ArrayBuffer to byte array (Uint8Array)
const byteArray = new Uint8Array(arrayBuffer);

// Now you can use 'byteArray' for further processing&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This example showcases how to create a byte array in JavaScript, similar to the &lt;/SPAN&gt;buffer()&lt;SPAN&gt; function in Node.js. You can adapt this to your specific use case for handling the report download on the client side.&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2024 13:16:59 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/cybersource-APIs/Is-there-a-javascript-example-that-anyone-can-share-for-calling/m-p/88760#M1391</guid>
      <dc:creator>AreejAnjum</dc:creator>
      <dc:date>2024-02-07T13:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a javascript example that anyone can share for calling the Cybersource reporting apis?</title>
      <link>https://community.developer.cybersource.com/t5/cybersource-APIs/Is-there-a-javascript-example-that-anyone-can-share-for-calling/m-p/88762#M1392</link>
      <description>&lt;P&gt;Thanks for the tip. That worked well!&amp;nbsp; Do you have an example of the next step which is to hash the public key using the byte array of the secret key? What crypto call are you using to hash the byte array?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2024 15:54:11 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/cybersource-APIs/Is-there-a-javascript-example-that-anyone-can-share-for-calling/m-p/88762#M1392</guid>
      <dc:creator>jburticus</dc:creator>
      <dc:date>2024-02-08T15:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a javascript example that anyone can share for calling the Cybersource reporting apis?</title>
      <link>https://community.developer.cybersource.com/t5/cybersource-APIs/Is-there-a-javascript-example-that-anyone-can-share-for-calling/m-p/88982#M1445</link>
      <description>&lt;P&gt;Thanks for the tip its working well&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2024 12:26:42 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/cybersource-APIs/Is-there-a-javascript-example-that-anyone-can-share-for-calling/m-p/88982#M1445</guid>
      <dc:creator>hmza312</dc:creator>
      <dc:date>2024-03-08T12:26:42Z</dc:date>
    </item>
  </channel>
</rss>

