Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to get subscription information of chargify using .net

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 466
    Comment on it

    First we add dll of chargify

    using ChargifyNET;
    

    Create the object of subscription

    ISubscription newSubscription;
    newSubscription = new ChargifyNET.Subscription();
    

    Connect to the chargify by giving URL,apikey and password

    ChargifyConnect objChargifyConnect = new ChargifyNET.ChargifyConnect(URL, apiKey, apiPassword);
    

    Create the customer obect

    ICustomer chargifyCustomer = new Customer();
    

    load customer

    chargifyCustomer= objChargifyConnect.LoadCustomer(customerid );
    

    load subscription

     newSubscription objChargifyConnect.LoadSubscription(subscription_id);

    Now we get the subscription information by using following properties

    DateTime ActivatedAt=newSubscription.ActivatedAt;//Get date when subscription is activated
    double balanceamount=newSubscription.Balance; //Get Balance
    DateTime CanceledAt= newSubscription.CanceledAt; //Get date when subscription is cancelled
     string cancellationmessage=newSubscription.CancellationMessage; //Get cancellation message
     DateTime CurrentPeriodEndsAt= newSubscription.CurrentPeriodEndsAt; //Get date when current period ends
    DateTime CurrentPeriodStartedAt=newSubscription.CurrentPeriodStartedAt; //Get date when current period starts 
    string customer= newSubscription.Customer; //Get customer
    DateTime ExpiresAt= newSubscription.ExpiresAt; //Get date  when subscription expires  
    DateTime LastUpdated=  newSubscription.LastUpdated; //Get last updated date
    string productname= newSubscription.Product.Name; //Get the name of product

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: