cancel
Showing results for 
Search instead for 
Did you mean: 

var test = sub.GetSubscriptionStatus("8825220"); always shows Active

 

var sub = new SubscriptionGateway("APILOGIN", "TRANSACTIONKEY", ServiceMode.Live);
var test = sub.GetSubscriptionStatus("8825220");
Console.WriteLine("{0}",  test.ToString());

C#

 

Always shows active for any Subscription ID I put in that is valid even though online it will say Terminated.

 

What is the problem?

mjcpp
Member
3 REPLIES 3

Hey there,

 

The C# SDK doesn't alter the response in any way, so if the call returned "Active" that's what you would see. Can you provide more info so we can look into this further? Like the full call and the full response?

 

Thanks,

 

MIchelle

Developer Community Manager

Michelle
All Star

I've been experiencing the same problem. The SDK works well creating, modifying and cancelling ARB subscriptions but continues to return "Active" for all cancelled and suspended requests (both in test and live environments).

To check subscriptions I'm using the C# SDK directly in my project like so:

 

PublicSharedFunction OpenGateway() AsSubscriptionGateway'pretend this is injected with IoC

 

        Dim login As String = ConfigurationManager.AppSettings("ANetAPILoginID")

        Dim transactionKey As String = ConfigurationManager.AppSettings("ANetAPITransactionKey")

 

        Return New SubscriptionGateway(login, transactionKey, AuthorizeNet.ServiceMode.Live)

 

EndFunction

 

Public Shared Function CheckANetSubscriptionStatus(ByVal SubscriberID As String) As ARBSubscriptionStatusEnum

 

        Dim gate As SubscriptionGateway = OpenGateway()

 

        Dim response As ARBSubscriptionStatusEnum = gate.GetSubscriptionStatus(SubscriberID)

 

        Return response

 

End Function

Any advice you could provide would be much appreciated! 

 

I modified the SDK to give me the raw XML response data and it gave me this (the response indicates the correct status of the particular subscription queried):

<?xml version="1.0" encoding="utf-8"?>

<ARBGetSubscriptionStatusResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">

<messages>

<resultCode>Ok</resultCode>

<message>

<code>I00001</code>

<text>Successful.</text>

</message>

</messages>

<Status>suspended</Status>

</ARBGetSubscriptionStatusResponse> 

Now I'll have to figure out why the SDK is incorrectly serializing this response...