<?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 Populating XML Template in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Populating-XML-Template/m-p/57628#M32329</link>
    <description>&lt;P&gt;&lt;a href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/20843"&gt;@Aaron&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When you helped me earlier, you included this...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;//modify the template to add apropriate values
$xml-&amp;gt;merchantAuthentication-&amp;gt;addChild('name',$loginId);
$xml-&amp;gt;merchantAuthentication-&amp;gt;addChild('transactionKey',$transactionKey);
//add the payment information from the information that was posted to this script
$xml-&amp;gt;creditCard-&amp;gt;addChild('cardNumber',$cardNumber);
$xml-&amp;gt;creditCard-&amp;gt;addChild('expirationDate',$expirationDate);
$xml-&amp;gt;creditCard-&amp;gt;addChild('cardCode',$cardCode);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Questions:&lt;/P&gt;&lt;P&gt;1.) Why do you have to use "addChild" to populate the XML template?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why can't you just type in values like...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;merchantAuthentication&amp;gt;&lt;BR /&gt;  &amp;lt;name&amp;gt;$loginID&amp;lt;/name&amp;gt;&lt;BR /&gt;  &amp;lt;transactionKey&amp;gt;$transactionKey&amp;lt;/transactionKey&amp;gt;&lt;BR /&gt;&amp;lt;/merchantAuthentication&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;creditCard&amp;gt;&lt;BR /&gt;  &amp;lt;cardNumber&amp;gt;$cardNumber&amp;lt;/cardNumber&amp;gt;&lt;BR /&gt;  and so on...&lt;BR /&gt;&amp;lt;/creditCard&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2.) Where do I find out which "tags" in the XML tree are required?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it just what I infer from your earlier explanation?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sally&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 10 Apr 2017 20:40:44 GMT</pubDate>
    <dc:creator>ssimons</dc:creator>
    <dc:date>2017-04-10T20:40:44Z</dc:date>
    <item>
      <title>Populating XML Template</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Populating-XML-Template/m-p/57628#M32329</link>
      <description>&lt;P&gt;&lt;a href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/20843"&gt;@Aaron&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When you helped me earlier, you included this...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;//modify the template to add apropriate values
$xml-&amp;gt;merchantAuthentication-&amp;gt;addChild('name',$loginId);
$xml-&amp;gt;merchantAuthentication-&amp;gt;addChild('transactionKey',$transactionKey);
//add the payment information from the information that was posted to this script
$xml-&amp;gt;creditCard-&amp;gt;addChild('cardNumber',$cardNumber);
$xml-&amp;gt;creditCard-&amp;gt;addChild('expirationDate',$expirationDate);
$xml-&amp;gt;creditCard-&amp;gt;addChild('cardCode',$cardCode);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Questions:&lt;/P&gt;&lt;P&gt;1.) Why do you have to use "addChild" to populate the XML template?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why can't you just type in values like...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;merchantAuthentication&amp;gt;&lt;BR /&gt;  &amp;lt;name&amp;gt;$loginID&amp;lt;/name&amp;gt;&lt;BR /&gt;  &amp;lt;transactionKey&amp;gt;$transactionKey&amp;lt;/transactionKey&amp;gt;&lt;BR /&gt;&amp;lt;/merchantAuthentication&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;creditCard&amp;gt;&lt;BR /&gt;  &amp;lt;cardNumber&amp;gt;$cardNumber&amp;lt;/cardNumber&amp;gt;&lt;BR /&gt;  and so on...&lt;BR /&gt;&amp;lt;/creditCard&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2.) Where do I find out which "tags" in the XML tree are required?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it just what I infer from your earlier explanation?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sally&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2017 20:40:44 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Populating-XML-Template/m-p/57628#M32329</guid>
      <dc:creator>ssimons</dc:creator>
      <dc:date>2017-04-10T20:40:44Z</dc:date>
    </item>
    <item>
      <title>Re: Populating XML Template</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Populating-XML-Template/m-p/57632#M32333</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/21496"&gt;@ssimons&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Questions:&lt;/P&gt;
&lt;P&gt;1.) Why do you have to use "addChild" to populate the XML template?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why can't you just type in values like...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Whatever works for you. There's no "right" way, just whichever way ends up sending a valid XML request to our server.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/21496"&gt;@ssimons&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2.) Where do I find out which "tags" in the XML tree are required?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Our API reference guide is &lt;A href="http://developer.authorize.net/api/reference/" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2017 23:10:08 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Populating-XML-Template/m-p/57632#M32333</guid>
      <dc:creator>Aaron</dc:creator>
      <dc:date>2017-04-10T23:10:08Z</dc:date>
    </item>
  </channel>
</rss>

