<?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: Communicating Responses in DPM in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Communicating-Responses-in-DPM/m-p/46699#M23608</link>
    <description>&lt;P&gt;Okay, that's handy to know! &amp;nbsp;Thanks. &amp;nbsp; So I tried switching to the Quick Start for AIM code,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;class Program
{
     static void Main(string[] args)
     {
          // Step 1 - Create the request
          var request = new AuthorizationRequest("4111111111111111", "1216", 10.00M, "Test 
Transaction");

          // Step 2 - Create the gateway, sending in your credentials
          var gate = new Gateway("YOUR_API_LOGIN_ID", "YOUR_TRANSACTION_KEY");

          // Step 3 - Send the request to the gateway
          var response = gate.Send(request);

          Console.WriteLine("{0}: {1}", response.ResponseCode, response.Message);
          Console.Read();
     }
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;But the response is still empty, and approved is false. &amp;nbsp;Now, the test transaction actually went through and I received an email. &amp;nbsp;But yet that darn response object is still empty. &amp;nbsp;Suggestions?&lt;/P&gt;</description>
    <pubDate>Wed, 27 Aug 2014 18:06:04 GMT</pubDate>
    <dc:creator>kallinan</dc:creator>
    <dc:date>2014-08-27T18:06:04Z</dc:date>
    <item>
      <title>Communicating Responses in DPM</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Communicating-Responses-in-DPM/m-p/46679#M23598</link>
      <description>&lt;P&gt;So I'm using DPM in an ASP.NET Web Forms C# website. &amp;nbsp;I can successfully make a transaction from payment.aspx, pass in a x_relay_url (response.aspx) and can see the response printed. &amp;nbsp;However the response object is available in response.aspx, but I don't know how to access it in the original payment.aspx.cs file. &amp;nbsp;Therefore I can't see how I'm supposed to redirect or otherwise make decisions based on transaction approval.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code snippet from payment.aspx. &amp;nbsp;I can get a WebResponse object, but not &amp;nbsp;a SIMResponse object.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;        HttpWebRequest webRequest = (HttpWebRequest)HttpWebRequest.Create("&lt;A href="https://secure.authorize.net/gateway/transact.dll&amp;quot;);" target="_blank"&gt;https://secure.authorize.net/gateway/transact.dll");&lt;/A&gt;  // note this authorize.net's test site
        webRequest.Method = "POST";
        webRequest.CookieContainer = new System.Net.CookieContainer();
        webRequest.ContentLength = vPostData.Length;
        webRequest.ContentType = "application/x-www-form-urlencoded";
        Stream webRequestStream = webRequest.GetRequestStream();
        webRequestStream.Write(vPostData, 0, vPostData.Length);
        webRequestStream.Close();

        WebResponse webResponse = webRequest.GetResponse();&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can get a populated SIMResponse in my response URL with:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;        response = new SIMResponse(Request.Form);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But performing this in the payment.aspx.cs file results in an unpopulated SIMResponse object. &amp;nbsp;Any help or direction would be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Aug 2014 08:26:14 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Communicating-Responses-in-DPM/m-p/46679#M23598</guid>
      <dc:creator>kallinan</dc:creator>
      <dc:date>2014-08-27T08:26:14Z</dc:date>
    </item>
    <item>
      <title>Re: Communicating Responses in DPM</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Communicating-Responses-in-DPM/m-p/46685#M23601</link>
      <description>&lt;P&gt;If you are doing a webrequest in code, you are doing AIM, not DPM, the point of using DPM is not having the customer credit card info touch your server.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DPM is similar to SIM, download the sample code for C# SIM under "DOWNLOADS"&lt;/P&gt;</description>
      <pubDate>Wed, 27 Aug 2014 11:21:57 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Communicating-Responses-in-DPM/m-p/46685#M23601</guid>
      <dc:creator>RaynorC1emen7</dc:creator>
      <dc:date>2014-08-27T11:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: Communicating Responses in DPM</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Communicating-Responses-in-DPM/m-p/46699#M23608</link>
      <description>&lt;P&gt;Okay, that's handy to know! &amp;nbsp;Thanks. &amp;nbsp; So I tried switching to the Quick Start for AIM code,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;class Program
{
     static void Main(string[] args)
     {
          // Step 1 - Create the request
          var request = new AuthorizationRequest("4111111111111111", "1216", 10.00M, "Test 
Transaction");

          // Step 2 - Create the gateway, sending in your credentials
          var gate = new Gateway("YOUR_API_LOGIN_ID", "YOUR_TRANSACTION_KEY");

          // Step 3 - Send the request to the gateway
          var response = gate.Send(request);

          Console.WriteLine("{0}: {1}", response.ResponseCode, response.Message);
          Console.Read();
     }
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;But the response is still empty, and approved is false. &amp;nbsp;Now, the test transaction actually went through and I received an email. &amp;nbsp;But yet that darn response object is still empty. &amp;nbsp;Suggestions?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Aug 2014 18:06:04 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Communicating-Responses-in-DPM/m-p/46699#M23608</guid>
      <dc:creator>kallinan</dc:creator>
      <dc:date>2014-08-27T18:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: Communicating Responses in DPM</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Communicating-Responses-in-DPM/m-p/46701#M23609</link>
      <description>&lt;PRE&gt;Console.WriteLine("{0}: {1}", response.ResponseCode, response.Message);
          Console.Read();&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You mean the console show blank?&lt;/P&gt;&lt;P&gt;or where are you checking the response?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Aug 2014 18:24:20 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Communicating-Responses-in-DPM/m-p/46701#M23609</guid>
      <dc:creator>RaynorC1emen7</dc:creator>
      <dc:date>2014-08-27T18:24:20Z</dc:date>
    </item>
    <item>
      <title>Re: Communicating Responses in DPM</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Communicating-Responses-in-DPM/m-p/46703#M23610</link>
      <description>&lt;P&gt;So I modified this code to run in C# code behind the ASPX page:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;    protected var responseStr;    &lt;BR /&gt;&lt;BR /&gt;    static void Submit_Click(Object sender, EventArgs e)
    {
          // Step 1 - Create the request
          var request = new AuthorizationRequest("4111111111111111", "1216", 10.00M, "Test Transaction");

          // Step 2 - Create the gateway, sending in your credentials
          var gate = new Gateway("YOUR_API_LOGIN_ID", "YOUR_TRANSACTION_KEY");

          // Step 3 - Send the request to the gateway
          var response = gate.Send(request);&lt;BR /&gt;          responseStr = "Approved: " + response.Approved;&lt;BR /&gt;          responseStr = "TransactionID: " + response.TransactionID;
     }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And on the ASPX page itself, I of course have:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;%= responseStr =%&amp;gt;

&amp;lt;asp:Button 
    runat="server" 
    id="Submit" 
    Text="Place Order" 
    OnClick="Submit_Click" /&amp;gt; &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Aug 2014 20:09:31 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Communicating-Responses-in-DPM/m-p/46703#M23610</guid>
      <dc:creator>kallinan</dc:creator>
      <dc:date>2014-08-27T20:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: Communicating Responses in DPM</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Communicating-Responses-in-DPM/m-p/46707#M23612</link>
      <description>&lt;P&gt;When you debug it and breakpoint after the gate.Send&lt;/P&gt;&lt;P&gt;Is response null? blank?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Aug 2014 20:54:22 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Communicating-Responses-in-DPM/m-p/46707#M23612</guid>
      <dc:creator>RaynorC1emen7</dc:creator>
      <dc:date>2014-08-27T20:54:22Z</dc:date>
    </item>
  </channel>
</rss>

