<?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: How to pass InvoiceNumber in json format in node js in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-to-pass-InvoiceNumber-in-json-format-in-node-js/m-p/72827#M45020</link>
    <description>&lt;P&gt;type header as Application/jason&lt;/P&gt;&lt;P&gt;jason.stringify place the following code&lt;/P&gt;&lt;PRE&gt;var http = require('http');

var app = http.createServer(function(req,res){    res.setHeader('Content-Type', 'application/json');    res.end(JSON.stringify({ a: 1 }));
});app.listen(3000);

// &amp;gt; {"a":1}&lt;/PRE&gt;</description>
    <pubDate>Wed, 12 Aug 2020 12:18:14 GMT</pubDate>
    <dc:creator>OvidNeil</dc:creator>
    <dc:date>2020-08-12T12:18:14Z</dc:date>
    <item>
      <title>How to pass InvoiceNumber in json format in node js</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-to-pass-InvoiceNumber-in-json-format-in-node-js/m-p/72803#M45000</link>
      <description>&lt;P&gt;Hello All,&lt;BR /&gt;&lt;BR /&gt;I want to pass order details with invoiceNumber in Json format using Node js. I am using&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;createTransactionRequest Method but I can't see order object in json format, it is available in XML format. Below is my code&amp;nbsp; I have trived this way but it's not working for me.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;PRE&gt;"createTransactionRequest": {
"merchantAuthentication": {
"name": apiLoginID,
"transactionKey": transactionKey
},
"refId": "123456",
"transactionRequest": {
"transactionType": "authCaptureTransaction",
"amount": data.amount,
"payment": {
"opaqueData": data.opaqueData
},
"profile": {createProfile: true},
"order":{
"invoiceNumber": "INV-12345",
"description":&amp;nbsp;"Product Description",
},
"customer": {
type: 'individual',
id: order.GP_customer,
"email" : order.email
},&lt;/PRE&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;Can you please help me? how can i pass order in json format?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 04:57:54 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-to-pass-InvoiceNumber-in-json-format-in-node-js/m-p/72803#M45000</guid>
      <dc:creator>Jsgreengalaxy</dc:creator>
      <dc:date>2020-08-10T04:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass InvoiceNumber in json format in node js</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-to-pass-InvoiceNumber-in-json-format-in-node-js/m-p/72821#M45014</link>
      <description>&lt;P&gt;That response is a string too, if you want to send the response prettified, for some awkward reason, you could use something like&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;JSON.stringify(anObject, null, 3)&lt;/P&gt;&lt;P&gt;It's important that you set the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Content-Type&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;header to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;application/json, too.&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="kwd"&gt;var&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; http &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; require&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str"&gt;'http'&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;);&lt;/SPAN&gt;

&lt;SPAN class="kwd"&gt;var&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; app &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; http&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;createServer&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="kwd"&gt;function&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;req&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;res&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;){&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;    res&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;setHeader&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str"&gt;'Content-Type'&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt; &lt;SPAN class="str"&gt;'application/json'&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;);&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;    res&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;end&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;JSON&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;stringify&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;({&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; a&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;:&lt;/SPAN&gt; &lt;SPAN class="lit"&gt;1&lt;/SPAN&gt; &lt;SPAN class="pun"&gt;}));&lt;/SPAN&gt;
&lt;SPAN class="pun"&gt;});&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;app&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;listen&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="lit"&gt;3000&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;);&lt;/SPAN&gt;

&lt;SPAN class="com"&gt;// &amp;gt; {"a":1}&lt;/SPAN&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 11 Aug 2020 15:01:43 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-to-pass-InvoiceNumber-in-json-format-in-node-js/m-p/72821#M45014</guid>
      <dc:creator>Ryan4</dc:creator>
      <dc:date>2020-08-11T15:01:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass InvoiceNumber in json format in node js</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-to-pass-InvoiceNumber-in-json-format-in-node-js/m-p/72826#M45019</link>
      <description>&lt;P&gt;jason.stringify use the following&lt;/P&gt;&lt;PRE&gt;var http = require('http');

var app = http.createServer(function(req,res){    res.setHeader('Content-Type', 'application/json');    res.end(JSON.stringify({ a: 1 }));
});app.listen(3000);

// &amp;gt; {"a":1}&lt;/PRE&gt;&lt;P&gt;code&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2020 12:14:01 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-to-pass-InvoiceNumber-in-json-format-in-node-js/m-p/72826#M45019</guid>
      <dc:creator>OvidNeil</dc:creator>
      <dc:date>2020-08-12T12:14:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass InvoiceNumber in json format in node js</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-to-pass-InvoiceNumber-in-json-format-in-node-js/m-p/72827#M45020</link>
      <description>&lt;P&gt;type header as Application/jason&lt;/P&gt;&lt;P&gt;jason.stringify place the following code&lt;/P&gt;&lt;PRE&gt;var http = require('http');

var app = http.createServer(function(req,res){    res.setHeader('Content-Type', 'application/json');    res.end(JSON.stringify({ a: 1 }));
});app.listen(3000);

// &amp;gt; {"a":1}&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Aug 2020 12:18:14 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-to-pass-InvoiceNumber-in-json-format-in-node-js/m-p/72827#M45020</guid>
      <dc:creator>OvidNeil</dc:creator>
      <dc:date>2020-08-12T12:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass InvoiceNumber in json format in node js</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-to-pass-InvoiceNumber-in-json-format-in-node-js/m-p/72829#M45022</link>
      <description>&lt;P&gt;jason.stringify set the header as application/jason&lt;/P&gt;&lt;P&gt;place the following code&lt;/P&gt;&lt;PRE&gt;var http = require('http');

var app = http.createServer(function(req,res){    res.setHeader('Content-Type', 'application/json');    res.end(JSON.stringify({ a: 1 }));
});app.listen(3000);

// &amp;gt; {"a":1}&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Aug 2020 12:35:15 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-to-pass-InvoiceNumber-in-json-format-in-node-js/m-p/72829#M45022</guid>
      <dc:creator>OvidNeil</dc:creator>
      <dc:date>2020-08-12T12:35:15Z</dc:date>
    </item>
  </channel>
</rss>

