<?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: Use Try It Tab for testing APIs  on sandbox in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Use-Try-It-Tab-for-testing-APIs-on-sandbox/m-p/60990#M35497</link>
    <description>&lt;P&gt;&lt;a href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/22975"&gt;@BaronMatrix1&lt;/a&gt;&amp;nbsp;Was trying to understand as why you would need newEnvironment? You would need either&amp;nbsp;Sandbox or Production. Both of them&lt;A href="https://github.com/AuthorizeNet/sdk-dotnet/blob/master/Authorize.NET/Environment.cs" target="_self"&gt;Environment.cs&lt;/A&gt; are available thru Environment.cs If you are looking for where the sandbox is assigned(&lt;SPAN&gt;AuthorizeNet.Environment.PRODUCTION;)&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;Eg:&amp;nbsp;&lt;A href="https://github.com/AuthorizeNet/sample-code-csharp/blob/master/PaymentTransactions/AuthorizeCreditCard.cs" target="_self"&gt;Line-17-SampleCodeCSharp&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Pls. clarify.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-Bhavana&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Dec 2017 13:13:03 GMT</pubDate>
    <dc:creator>bhav</dc:creator>
    <dc:date>2017-12-27T13:13:03Z</dc:date>
    <item>
      <title>Use Try It Tab for testing APIs  on sandbox</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Use-Try-It-Tab-for-testing-APIs-on-sandbox/m-p/60725#M35238</link>
      <description>&lt;P&gt;You can test APIs from our Try it Tab in API reference on sandbox without signup&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://developer.authorize.net/api/reference/index.html#payment-transactions-charge-a-credit-card" target="_blank"&gt;https://developer.authorize.net/api/reference/index.html#payment-transactions-charge-a-credit-card&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Click on the Try it tab and click send .&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2017 07:01:41 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Use-Try-It-Tab-for-testing-APIs-on-sandbox/m-p/60725#M35238</guid>
      <dc:creator>Anurag</dc:creator>
      <dc:date>2017-12-05T07:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: Use Try It Tab for testing APIs  on sandbox</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Use-Try-It-Tab-for-testing-APIs-on-sandbox/m-p/60984#M35491</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm getting to close to activating an dI'm seeing an issue with the C# Charge A Credit Card" sample code.&lt;/P&gt;&lt;P&gt;WhenI use&amp;nbsp;&lt;/P&gt;&lt;P&gt;ApiOperationBase(ANetApiRequest, ANetApiResponse).RunEnvironment = AuthorizeNet.Environment.SANDBOX;&lt;BR /&gt;&lt;BR /&gt;I see the SANDBOX url of test.authorize.net in the VS 2013 Autos window and the controller response is null. I have successufully used my id and key on the Try It but those use XML and I can't see how to change the URL to&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://apitest.authorize.net/xml/v1/request.api" target="_blank"&gt;https://apitest.authorize.net/xml/v1/request.api&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Dec 2017 23:27:23 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Use-Try-It-Tab-for-testing-APIs-on-sandbox/m-p/60984#M35491</guid>
      <dc:creator>BaronMatrix1</dc:creator>
      <dc:date>2017-12-26T23:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: Use Try It Tab for testing APIs  on sandbox</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Use-Try-It-Tab-for-testing-APIs-on-sandbox/m-p/60986#M35493</link>
      <description>&lt;P&gt;&lt;a href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/22975"&gt;@BaronMatrix1&lt;/a&gt;&amp;nbsp;API Reference try it option is to try on fly. If you want to play around with the API requests, Please refer to Github SampleCode or SDK for APIs here.&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/AuthorizeNet/sdk-dotnet/tree/master/Authorize.NET" target="_self"&gt;DOTNET-SDK&lt;/A&gt;&amp;nbsp;/&amp;nbsp;&lt;A href="https://github.com/AuthorizeNet/sample-code-csharp" target="_self"&gt;DOTNET - SampleCode&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want to change the endpoint, you can do &lt;A href="https://github.com/AuthorizeNet/sdk-dotnet/blob/master/Authorize.NET/Environment.cs" target="_self"&gt;here &lt;/A&gt;in your local repo.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Bhavana&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2017 00:19:11 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Use-Try-It-Tab-for-testing-APIs-on-sandbox/m-p/60986#M35493</guid>
      <dc:creator>bhav</dc:creator>
      <dc:date>2017-12-27T00:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: Use Try It Tab for testing APIs  on sandbox</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Use-Try-It-Tab-for-testing-APIs-on-sandbox/m-p/60988#M35495</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I used the exact code in the Charge a Credit card sample.&lt;BR /&gt;&lt;BR /&gt;How do I inject the new environment class referenced?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;UPDATE:&lt;BR /&gt;&amp;nbsp;realized I just out that anywhere and use it for the .RunEnvironment call.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2017 01:15:17 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Use-Try-It-Tab-for-testing-APIs-on-sandbox/m-p/60988#M35495</guid>
      <dc:creator>BaronMatrix1</dc:creator>
      <dc:date>2017-12-27T01:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: Use Try It Tab for testing APIs  on sandbox</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Use-Try-It-Tab-for-testing-APIs-on-sandbox/m-p/60990#M35497</link>
      <description>&lt;P&gt;&lt;a href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/22975"&gt;@BaronMatrix1&lt;/a&gt;&amp;nbsp;Was trying to understand as why you would need newEnvironment? You would need either&amp;nbsp;Sandbox or Production. Both of them&lt;A href="https://github.com/AuthorizeNet/sdk-dotnet/blob/master/Authorize.NET/Environment.cs" target="_self"&gt;Environment.cs&lt;/A&gt; are available thru Environment.cs If you are looking for where the sandbox is assigned(&lt;SPAN&gt;AuthorizeNet.Environment.PRODUCTION;)&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;Eg:&amp;nbsp;&lt;A href="https://github.com/AuthorizeNet/sample-code-csharp/blob/master/PaymentTransactions/AuthorizeCreditCard.cs" target="_self"&gt;Line-17-SampleCodeCSharp&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Pls. clarify.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-Bhavana&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2017 13:13:03 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Use-Try-It-Tab-for-testing-APIs-on-sandbox/m-p/60990#M35497</guid>
      <dc:creator>bhav</dc:creator>
      <dc:date>2017-12-27T13:13:03Z</dc:date>
    </item>
    <item>
      <title>Re: Use Try It Tab for testing APIs  on sandbox</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Use-Try-It-Tab-for-testing-APIs-on-sandbox/m-p/60992#M35499</link>
      <description>&lt;P&gt;I don't need new Environment. I'm trying to understand why I get NULL back from the controller.GetApiResponse call.&lt;BR /&gt;&lt;BR /&gt;I did notice that setting to Environment.SANDBOX gives a URL of test.authorize.net.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2017 17:20:21 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Use-Try-It-Tab-for-testing-APIs-on-sandbox/m-p/60992#M35499</guid>
      <dc:creator>BaronMatrix1</dc:creator>
      <dc:date>2017-12-27T17:20:21Z</dc:date>
    </item>
    <item>
      <title>Re: Use Try It Tab for testing APIs  on sandbox</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Use-Try-It-Tab-for-testing-APIs-on-sandbox/m-p/61024#M35531</link>
      <description>&lt;P&gt;&lt;a href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/22975"&gt;@BaronMatrix1&lt;/a&gt;&amp;nbsp;Normally, if the endpoint is not reachable you would get that issue. I just downloaded latest from &lt;A href="https://github.com/AuthorizeNet/sample-code-csharp" target="_self"&gt;Sample-Code-Csharp&lt;/A&gt;&amp;nbsp;and able to execute "charge a credit card" successfully. Can you debug in visual studio and see why it is null OR send me the zip file of your sample-code you are using.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Bhavana&lt;/P&gt;</description>
      <pubDate>Thu, 28 Dec 2017 23:27:35 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Use-Try-It-Tab-for-testing-APIs-on-sandbox/m-p/61024#M35531</guid>
      <dc:creator>bhav</dc:creator>
      <dc:date>2017-12-28T23:27:35Z</dc:date>
    </item>
    <item>
      <title>Re: Use Try It Tab for testing APIs  on sandbox</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Use-Try-It-Tab-for-testing-APIs-on-sandbox/m-p/61025#M35532</link>
      <description>&lt;P&gt;I've stepped through the code multipel times. Returning null is difficult to debug. I'll reinstall Fiddler and see if I can get more, but as I said I used the code basically as is. I only changed it to take inputs from a form.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As it's public code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ApiOperationBase&amp;lt;ANetApiRequest, ANetApiResponse&amp;gt;.RunEnvironment = AuthorizeNet.Environment.SANDBOX;&lt;/P&gt;&lt;P&gt;ApiOperationBase&amp;lt;ANetApiRequest, ANetApiResponse&amp;gt;.MerchantAuthentication = new merchantAuthenticationType()&lt;BR /&gt;{&lt;BR /&gt;name = id,&lt;BR /&gt;ItemElementName = ItemChoiceType.transactionKey,&lt;BR /&gt;Item = key,&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;var creditCard = new creditCardType&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;cardNumber = cardNum,&lt;BR /&gt;expirationDate = expire,&lt;BR /&gt;cardCode = ccv&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;var billingAddress = new customerAddressType&lt;BR /&gt;{&lt;BR /&gt;firstName = firstName,&lt;BR /&gt;lastName = lastName,&lt;BR /&gt;address = address,&lt;BR /&gt;city = city,&lt;BR /&gt;zip = zip,&lt;BR /&gt;state = state&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;//standard api call to retrieve response&lt;BR /&gt;var paymentType = new paymentType { Item = creditCard };&lt;/P&gt;&lt;P&gt;// Add line Items&lt;BR /&gt;var lineItems = new lineItemType[1];&lt;BR /&gt;lineItems[0] = new lineItemType { itemId = "1", name = "Membership", quantity = 1, unitPrice = new Decimal(20.00) };&lt;/P&gt;&lt;P&gt;var transactionRequest = new transactionRequestType&lt;BR /&gt;{&lt;BR /&gt;transactionType = transactionTypeEnum.authCaptureTransaction.ToString(), // charge the card&lt;/P&gt;&lt;P&gt;amount = charge,&lt;BR /&gt;payment = paymentType,&lt;BR /&gt;billTo = billingAddress,&lt;BR /&gt;lineItems = lineItems&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;var request = new createTransactionRequest { transactionRequest = transactionRequest };&lt;/P&gt;&lt;P&gt;// instantiate the controller that will call the service&lt;BR /&gt;var controller = new createTransactionController(request);&lt;BR /&gt;controller.Execute();&lt;/P&gt;&lt;P&gt;// get the response from the service (errors contained if any)&lt;BR /&gt;var response = controller.GetApiResponse();&lt;/P&gt;&lt;P&gt;// validate response&lt;BR /&gt;if (response != null &amp;amp;&amp;amp; response.messages.resultCode == messageTypeEnum.Ok)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;returnModel.Code = response.transactionResponse.responseCode;&lt;BR /&gt;returnModel.Authorization = response.transactionResponse.authCode;&lt;BR /&gt;returnModel.AvsResponse = response.transactionResponse.avsResultCode;&lt;BR /&gt;returnModel.Reason = response.transactionResponse.messages[0].description;&lt;BR /&gt;returnModel.Transaction = response.transactionResponse.messages[0].code;&lt;BR /&gt;returnModel.TransactionId = response.transactionResponse.transId;&lt;/P&gt;&lt;P&gt;var user = await AddZineUserAsync(await UserManager.FindByNameAsync(User.Identity.Name));&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;returnModel = new CardModel&lt;BR /&gt;{&lt;BR /&gt;Reason = response != null ? response.transactionResponse.errors[0].errorCode : "-1",&lt;BR /&gt;Transaction = response != null ? response.transactionResponse.errors[0].errorText : "The error was not correctly returned. Please try again. Your card was not charged.",&lt;BR /&gt;};&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Thu, 28 Dec 2017 23:31:57 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Use-Try-It-Tab-for-testing-APIs-on-sandbox/m-p/61025#M35532</guid>
      <dc:creator>BaronMatrix1</dc:creator>
      <dc:date>2017-12-28T23:31:57Z</dc:date>
    </item>
  </channel>
</rss>

