<?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: Multiple requests in the same POST? in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Multiple-requests-in-the-same-POST/m-p/27864#M14713</link>
    <description>&lt;P&gt;You are correct. &amp;nbsp;CreatePaymentProfileRequest is, in fact, capable of doing the whole thing at once. &amp;nbsp;What threw me off was the C# code I had been looking at in the SDK has that process broken up into three requests. &amp;nbsp;My OP failed to mention that I am developing in C#.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After tracing the code some more I believe I have found the syntax that will allow me to build this in C# and still use the helper classes. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From CustomerGateway.cs in the C# SDK\CIM:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;var req = new createCustomerPaymentProfileRequest();
            
req.customerProfileId = profileID;
req.paymentProfile = new customerPaymentProfileType();
req.paymentProfile.payment = new paymentType();

var card = new creditCardType();
if (!String.IsNullOrEmpty(cardCode)) card.cardCode = cardCode;
card.cardNumber = cardNumber;
card.expirationDate = sExpDate;
req.paymentProfile.payment.Item = card;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks a lot for the help and fast response!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 11 Jul 2012 19:41:16 GMT</pubDate>
    <dc:creator>crmGuy</dc:creator>
    <dc:date>2012-07-11T19:41:16Z</dc:date>
    <item>
      <title>Multiple requests in the same POST?</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Multiple-requests-in-the-same-POST/m-p/27854#M14708</link>
      <description>&lt;P&gt;Hi all!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just recently started developing against the CIM integration method and have done some research through the forums, documentation and SDK. &amp;nbsp;I've also already gotten some simple requests working with my project. &amp;nbsp;The SDK makes things really easy. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm wondering, though, if it is possible to bundle requests into a single POST. &amp;nbsp;The way the SDK classes are broken up, it seems like they are designed for a typical online shopping cart where a user goes through the following process:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;creates an acount - create a customer request&lt;/LI&gt;&lt;LI&gt;registers a card - add a payment profile request&lt;/LI&gt;&lt;LI&gt;specify their address - add shipping address request&lt;/LI&gt;&lt;LI&gt;creates a purchase transaction - create AuthandCapture transaction request&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;That is 4 seperate POSTs to anet. &amp;nbsp;That makes sense for a typical web user interface because people expect the internet to 'think' when they're setting up their shopping cart. &amp;nbsp;My process is a little different where all required information will be present when the user initiates the request. &amp;nbsp;I would like to handle the creation of customer, payment profile, and shipping address all in one POST. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The systems I am using have a firm plugin lifetime of two minutes and other processes unrelated to the POST / response need to happen within that timeframe. &amp;nbsp;Making 3 POST requests concurrently is not only a waste of time and resources in my case, but I've worked with other APIs that can take up to 30 seconds on similar live account creations. &amp;nbsp;(Rediculous I know, but it's true) &amp;nbsp;I would really like to bundle several of these requests into one POST. &amp;nbsp;Does anyone know if this is possible?&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2012 18:53:49 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Multiple-requests-in-the-same-POST/m-p/27854#M14708</guid>
      <dc:creator>crmGuy</dc:creator>
      <dc:date>2012-07-11T18:53:49Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple requests in the same POST?</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Multiple-requests-in-the-same-POST/m-p/27858#M14710</link>
      <description>&lt;P&gt;CreateCustomerProfile can do #1,#2, and #3&lt;/P&gt;&lt;P&gt;Then, CreateCustomerProfileTransaction for #4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;documentation is &lt;A target="_self" href="http://developer.authorize.net/api/cim/"&gt;here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2012 19:22:08 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Multiple-requests-in-the-same-POST/m-p/27858#M14710</guid>
      <dc:creator>RaynorC1emen7</dc:creator>
      <dc:date>2012-07-11T19:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple requests in the same POST?</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Multiple-requests-in-the-same-POST/m-p/27864#M14713</link>
      <description>&lt;P&gt;You are correct. &amp;nbsp;CreatePaymentProfileRequest is, in fact, capable of doing the whole thing at once. &amp;nbsp;What threw me off was the C# code I had been looking at in the SDK has that process broken up into three requests. &amp;nbsp;My OP failed to mention that I am developing in C#.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After tracing the code some more I believe I have found the syntax that will allow me to build this in C# and still use the helper classes. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From CustomerGateway.cs in the C# SDK\CIM:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;var req = new createCustomerPaymentProfileRequest();
            
req.customerProfileId = profileID;
req.paymentProfile = new customerPaymentProfileType();
req.paymentProfile.payment = new paymentType();

var card = new creditCardType();
if (!String.IsNullOrEmpty(cardCode)) card.cardCode = cardCode;
card.cardNumber = cardNumber;
card.expirationDate = sExpDate;
req.paymentProfile.payment.Item = card;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks a lot for the help and fast response!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2012 19:41:16 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Multiple-requests-in-the-same-POST/m-p/27864#M14713</guid>
      <dc:creator>crmGuy</dc:creator>
      <dc:date>2012-07-11T19:41:16Z</dc:date>
    </item>
  </channel>
</rss>

