<?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 Getting E00059 while trying to cancel a subscription in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Getting-E00059-while-trying-to-cancel-a-subscription/m-p/49781#M25317</link>
    <description>&lt;P&gt;I am currently working on subscription integration with Authorize.Net using their ARB service. I am able to create a subscription without any issues. However; when I try to cancel the newly created subscription I get &amp;nbsp;the E00059 error : The authentication type is not allowed for this method call. Both the create and cancel functions use the same authenticate function. So I am confused why one works but the other doesnt.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am currently using the SDK in C#.Net to create the request scripts. I've been stumped for this issue for about a day now so any help would be greatly appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Wed, 25 Feb 2015 22:11:12 GMT</pubDate>
    <dc:creator>brog</dc:creator>
    <dc:date>2015-02-25T22:11:12Z</dc:date>
    <item>
      <title>Getting E00059 while trying to cancel a subscription</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Getting-E00059-while-trying-to-cancel-a-subscription/m-p/49781#M25317</link>
      <description>&lt;P&gt;I am currently working on subscription integration with Authorize.Net using their ARB service. I am able to create a subscription without any issues. However; when I try to cancel the newly created subscription I get &amp;nbsp;the E00059 error : The authentication type is not allowed for this method call. Both the create and cancel functions use the same authenticate function. So I am confused why one works but the other doesnt.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am currently using the SDK in C#.Net to create the request scripts. I've been stumped for this issue for about a day now so any help would be greatly appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 25 Feb 2015 22:11:12 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Getting-E00059-while-trying-to-cancel-a-subscription/m-p/49781#M25317</guid>
      <dc:creator>brog</dc:creator>
      <dc:date>2015-02-25T22:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: Getting E00059 while trying to cancel a subscription</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Getting-E00059-while-trying-to-cancel-a-subscription/m-p/49789#M25323</link>
      <description>&lt;P&gt;There are 2 way to connect on the SDKs. one use the XML, the other is the API controller.&lt;/P&gt;&lt;P&gt;Which one are you using?&lt;/P&gt;&lt;P&gt;Can you post your code?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Feb 2015 12:12:22 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Getting-E00059-while-trying-to-cancel-a-subscription/m-p/49789#M25323</guid>
      <dc:creator>RaynorC1emen7</dc:creator>
      <dc:date>2015-02-26T12:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: Getting E00059 while trying to cancel a subscription</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Getting-E00059-while-trying-to-cancel-a-subscription/m-p/49795#M25329</link>
      <description>&lt;P&gt;I am connecting using the XML method. I did not see an API controller so I am wonder if the SDK I refereced may be outdated. Below is my code for the cancel:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;public void CancelSubscription(ref String result, String SubscriptionID)
        {
            ARBCancelSubscriptionRequest cancelSubscriptionRequest = new ARBCancelSubscriptionRequest();

            //Populate Request with SubscriptionID &amp;amp; Merchant Authentication
            cancelSubscriptionRequest.subscriptionId = SubscriptionID;
            PopulateMerchantAuthentication(cancelSubscriptionRequest);

            bool bResult = true;
            object response = null;
            XmlDocument xmldoc = null;
            //Post Cancel Request
            bResult = PostRequest(cancelSubscriptionRequest, out xmldoc);

            //Process Response
            if (bResult) bResult = ProcessXmlResponse(xmldoc, out response);
            if (bResult) ProcessResponse(response);

            ANetApiResponse baseResponse = (ANetApiResponse)response;

            if (baseResponse.messages.resultCode == messageTypeEnum.Ok)
            {
                //Subscription canceled
                result = "Success";
            }
            else
            {
                result = "Error";
                for (int i = 0; i &amp;lt; baseResponse.messages.message.Length; i++)
                {
                    result += "[" + baseResponse.messages.message[i].code + "]" + baseResponse.messages.message[i].text + "&amp;lt;br/&amp;gt;";
                }
            }
        }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;private void PopulateMerchantAuthentication(ANetApiRequest request)
        {
            request.merchantAuthentication = new merchantAuthenticationType();
            request.merchantAuthentication.name = LoginID;
            request.merchantAuthentication.Item = TransactionKey;
            request.merchantAuthentication.ItemElementName = ItemChoiceType.transactionKey;
        }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;public bool PostRequest(object apiRequest, out XmlDocument xmldoc)
        {
            bool bResult = false;
            XmlSerializer serializer;
            string _apiUrl = @"https://api.authorize.net/xml/v1/request.api ";

            xmldoc = null;

            try
            {
                HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(_apiUrl);
                webRequest.Method = "POST";
                webRequest.ContentType = "text/xml";
                webRequest.KeepAlive = true;

                // Serialize the request
                serializer = new XmlSerializer(apiRequest.GetType());
                XmlWriter writer = new XmlTextWriter(webRequest.GetRequestStream(), Encoding.UTF8);
                serializer.Serialize(writer, apiRequest);
                writer.Close();

                // Get the response
                WebResponse webResponse = webRequest.GetResponse();

                // Load the response from the API server into an XmlDocument.
                xmldoc = new XmlDocument();
                xmldoc.Load(XmlReader.Create(webResponse.GetResponseStream()));

                bResult = true;
            }
            catch (Exception ex)
            {
                bResult = false;
            }

            return bResult;
        }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Please let me know if there is any additional information I can provide.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your time.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Feb 2015 17:25:47 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Getting-E00059-while-trying-to-cancel-a-subscription/m-p/49795#M25329</guid>
      <dc:creator>brog</dc:creator>
      <dc:date>2015-02-26T17:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: Getting E00059 while trying to cancel a subscription</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Getting-E00059-while-trying-to-cancel-a-subscription/m-p/49801#M25335</link>
      <description>&lt;P&gt;The code look ok. might have to debug it to see if it got the correct value.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Feb 2015 20:36:43 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Getting-E00059-while-trying-to-cancel-a-subscription/m-p/49801#M25335</guid>
      <dc:creator>RaynorC1emen7</dc:creator>
      <dc:date>2015-02-26T20:36:43Z</dc:date>
    </item>
  </channel>
</rss>

