<?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 How to send billing info? (Using DPM, C#, and ASP.Net) in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-to-send-billing-info-Using-DPM-C-and-ASP-Net/m-p/53451#M28567</link>
    <description>&lt;P&gt;Hello, I have tried many attempts at trying to send data from my form that includes billing info like first name, last name, address, etc.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to add something like this but any of my attempts haven't worked:&lt;/P&gt;&lt;PRE&gt;x_first_name = FirstName.Text;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my C# code for my form's submit button:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; protected void Button1_Click(object sender, EventArgs e)
    {

        String ApiLoginID = "HIDDEN_FOR_PRIVACY";
        String ApiTransactionKey = "HIDDEN_FOR_PRIVACY";
        String cardNumber1 = TextBoxCardNum.Text;
        String expirationDate1 = TextBoxExp.Text;
        String cardCode1 = TextBoxCCV.Text;
        String status = LblStatus.Text;
        
        Console.WriteLine("Charge Credit Card Sample");


        ApiOperationBase&amp;lt;ANetApiRequest, ANetApiResponse&amp;gt;.RunEnvironment = AuthorizeNet.Environment.SANDBOX;

        // define the merchant information (authentication / transaction id)
        ApiOperationBase&amp;lt;ANetApiRequest, ANetApiResponse&amp;gt;.MerchantAuthentication = new merchantAuthenticationType()
        {
            name = ApiLoginID,
            ItemElementName = ItemChoiceType.transactionKey,
            Item = ApiTransactionKey,
        };


        var creditCard = new creditCardType
        {
            cardNumber = cardNumber1,
            expirationDate = expirationDate1,
            cardCode = cardCode1
        };


        //standard api call to retrieve response
        var paymentType = new paymentType { Item = creditCard };

        var transactionRequest = new transactionRequestType
        {
            transactionType = transactionTypeEnum.authCaptureTransaction.ToString(),    // charge the card
            amount = 175.00m,
            payment = paymentType,
        };

        transactionRequest = FirstName.Text;

        var request = new createTransactionRequest { transactionRequest = transactionRequest };

        // instantiate the contoller that will call the service
        var controller = new createTransactionController(request);
        controller.Execute();

        // get the response from the service (errors contained if any)
        var response = controller.GetApiResponse();

        if (response.messages.resultCode == messageTypeEnum.Ok)
        {
            if (response.transactionResponse != null)
            {
                status = "Success, Auth Code : " + response.transactionResponse.authCode;
            }
        }
        else
        {
            Console.WriteLine("Error: " + response.messages.message[0].code + "  " + response.messages.message[0].text);
            if (response.transactionResponse != null)
            {
                status = "Transaction Error : " + response.transactionResponse.errors[0].errorCode + " " + response.transactionResponse.errors[0].errorText;
            }
        }
        
    }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 06 Jan 2016 19:09:47 GMT</pubDate>
    <dc:creator>rockon77</dc:creator>
    <dc:date>2016-01-06T19:09:47Z</dc:date>
    <item>
      <title>How to send billing info? (Using DPM, C#, and ASP.Net)</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-to-send-billing-info-Using-DPM-C-and-ASP-Net/m-p/53451#M28567</link>
      <description>&lt;P&gt;Hello, I have tried many attempts at trying to send data from my form that includes billing info like first name, last name, address, etc.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to add something like this but any of my attempts haven't worked:&lt;/P&gt;&lt;PRE&gt;x_first_name = FirstName.Text;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my C# code for my form's submit button:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; protected void Button1_Click(object sender, EventArgs e)
    {

        String ApiLoginID = "HIDDEN_FOR_PRIVACY";
        String ApiTransactionKey = "HIDDEN_FOR_PRIVACY";
        String cardNumber1 = TextBoxCardNum.Text;
        String expirationDate1 = TextBoxExp.Text;
        String cardCode1 = TextBoxCCV.Text;
        String status = LblStatus.Text;
        
        Console.WriteLine("Charge Credit Card Sample");


        ApiOperationBase&amp;lt;ANetApiRequest, ANetApiResponse&amp;gt;.RunEnvironment = AuthorizeNet.Environment.SANDBOX;

        // define the merchant information (authentication / transaction id)
        ApiOperationBase&amp;lt;ANetApiRequest, ANetApiResponse&amp;gt;.MerchantAuthentication = new merchantAuthenticationType()
        {
            name = ApiLoginID,
            ItemElementName = ItemChoiceType.transactionKey,
            Item = ApiTransactionKey,
        };


        var creditCard = new creditCardType
        {
            cardNumber = cardNumber1,
            expirationDate = expirationDate1,
            cardCode = cardCode1
        };


        //standard api call to retrieve response
        var paymentType = new paymentType { Item = creditCard };

        var transactionRequest = new transactionRequestType
        {
            transactionType = transactionTypeEnum.authCaptureTransaction.ToString(),    // charge the card
            amount = 175.00m,
            payment = paymentType,
        };

        transactionRequest = FirstName.Text;

        var request = new createTransactionRequest { transactionRequest = transactionRequest };

        // instantiate the contoller that will call the service
        var controller = new createTransactionController(request);
        controller.Execute();

        // get the response from the service (errors contained if any)
        var response = controller.GetApiResponse();

        if (response.messages.resultCode == messageTypeEnum.Ok)
        {
            if (response.transactionResponse != null)
            {
                status = "Success, Auth Code : " + response.transactionResponse.authCode;
            }
        }
        else
        {
            Console.WriteLine("Error: " + response.messages.message[0].code + "  " + response.messages.message[0].text);
            if (response.transactionResponse != null)
            {
                status = "Transaction Error : " + response.transactionResponse.errors[0].errorCode + " " + response.transactionResponse.errors[0].errorText;
            }
        }
        
    }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2016 19:09:47 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-to-send-billing-info-Using-DPM-C-and-ASP-Net/m-p/53451#M28567</guid>
      <dc:creator>rockon77</dc:creator>
      <dc:date>2016-01-06T19:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to send billing info? (Using DPM, C#, and ASP.Net)</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-to-send-billing-info-Using-DPM-C-and-ASP-Net/m-p/53454#M28569</link>
      <description>&lt;P&gt;1)If the form post back to your server, you are not using DPM, but AIM.&lt;/P&gt;&lt;P&gt;2)&lt;A href="https://github.com/AuthorizeNet/sdk-dotnet/blob/9ede631d820841ba6f5c0f6ef26147c7080be242/AuthorizeNETtest/Api/Controllers/Test/CreateTransactionTest.cs" target="_blank"&gt;https://github.com/AuthorizeNet/sdk-dotnet/blob/9ede631d820841ba6f5c0f6ef26147c7080be242/AuthorizeNETtest/Api/Controllers/Test/CreateTransactionTest.cs&lt;/A&gt;&lt;/P&gt;&lt;P&gt;is the billTo&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2016 20:09:49 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-to-send-billing-info-Using-DPM-C-and-ASP-Net/m-p/53454#M28569</guid>
      <dc:creator>RaynorC1emen7</dc:creator>
      <dc:date>2016-01-06T20:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to send billing info? (Using DPM, C#, and ASP.Net)</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-to-send-billing-info-Using-DPM-C-and-ASP-Net/m-p/53456#M28571</link>
      <description>&lt;P&gt;Thank you for your response. Are you saying the code I posted is actually AIM? I got it from the Hello World sample and just made a few edits.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Okay I see the billTo section. I guess I'd have to create a customer profile in order to send the user's billing address to Authorize.net?&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2016 20:21:31 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-to-send-billing-info-Using-DPM-C-and-ASP-Net/m-p/53456#M28571</guid>
      <dc:creator>rockon77</dc:creator>
      <dc:date>2016-01-06T20:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to send billing info? (Using DPM, C#, and ASP.Net)</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-to-send-billing-info-Using-DPM-C-and-ASP-Net/m-p/53457#M28572</link>
      <description>&lt;P&gt;Thank you for your response. Are you saying the code I posted is actually AIM? I got it from the Hello World sample and just made a few edits.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, the API use AIM. If you want to use DPM. Read the SIM doc&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.authorize.net/content/dam/authorize/documents/SIM_guide.pdf" target="_blank"&gt;http://www.authorize.net/content/dam/authorize/documents/SIM_guide.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Okay I see the billTo section. I guess I'd have to create a customer profile in order to send the user's billing address to Authorize.net?&lt;/P&gt;&lt;DIV&gt;Don't need customer profile for that. Just the customerAddressType&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Wed, 06 Jan 2016 20:39:38 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-to-send-billing-info-Using-DPM-C-and-ASP-Net/m-p/53457#M28572</guid>
      <dc:creator>RaynorC1emen7</dc:creator>
      <dc:date>2016-01-06T20:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to send billing info? (Using DPM, C#, and ASP.Net)</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-to-send-billing-info-Using-DPM-C-and-ASP-Net/m-p/53458#M28573</link>
      <description>&lt;P&gt;Great, thank you so much!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2016 21:04:34 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-to-send-billing-info-Using-DPM-C-and-ASP-Net/m-p/53458#M28573</guid>
      <dc:creator>rockon77</dc:creator>
      <dc:date>2016-01-06T21:04:34Z</dc:date>
    </item>
  </channel>
</rss>

