Need experienced amember programmer too help with http call

Discussion in '3rd Party Service Providers' started by drmartinjr3i3, Feb 7, 2011.

  1. drmartinjr3i3

    drmartinjr3i3 aMember Pro Customer

    Joined:
    Nov 21, 2010
    Messages:
    65
    need help with simple http call with amember

    Looking for experienced programmer too help asap

    Can use paypal or elance for payment for services

    Once a product is purchased whether free whatever and confirmed as paid/active in amember - then if applicable (see additional field 1 below) then it will generate a unique url and post to that url behind the scenes so my license server will email them (license server fully operational just need this feature in amember)

    Add 2 fields in product setup/edit product admin section in amember

    Additional Field 1: Integrate With License Server (checkbox) - default unchecked - checked means do integrate
    Additional Field 2: License Server Moducle Name (text box) (not required unless additional field 1 is checked


    Example order placed in: https://apexinvesting.net/amember/signup.php?price_group=-500

    once confirmed active/paid then does post to link on license server

    The name and email address of the customer will be sent to the financial algo server for being able to later look up the key etc... (meaning it will attach the customer info the key when pulling/activatin it)

    License Server Information
    License server need to be called with a HTTP GET request, in response to a valid query it will answer with a license key

    Sample HTTP Call
    http://license.fin-alg.info/Service...ference=&comments=&saleChannel=&expiryDays=30

    NOTE: I will need to know what file this is located in so I can update the web address if needed
    note vendor code = username I will need to define once setup
    note password = password I will need to define once setup

    (Ideally on a plugin page the above three settings could be updated
    basic weburl : http://license.fin-alg
    vendor code: vendor
    vewndor password: vendor

    module name - this is where the Additional Field 2 comes into place
    Will need sale date (date where it was activated)
    Customer name - from amember
    customer email from amember - my license server will automatically email them their license key with this email put in place
    Make expirydays to 10000 - as I will manually do cancellations
    (The other information is not important and does not need to be sent like in the example above)

    when posted to the url you get this:

    Answer
    c952bf3e-8321-45e2-bb98-208e0bde3525

    All this needs to happen in the background on the server so it will just send them the email


    Most of the parameters are optional, the code that parse the parameters is below see it easier to see the parameters name and format

    string vendorCode = context.Request.Params["vendorCode"];
    string password = context.Request.Params["password"];
    string moduleName = context.Request.Params["moduleName"];
    string customerEmail = context.Request.Params["customerEmail"];
    string customerName = context.Request.Params["customerName"];
    string customerEmail2 = context.Request.Params["customerEmail2"];
    string customerAddress = context.Request.Params["customerAddress"];
    DateTime saleDate = DateTime.ParseExact(context.Request.Params["saleDate"], "yyyyMMdd", CultureInfo.InvariantCulture);
    decimal price = Convert.ToDecimal(context.Request.Params["price"]);
    decimal commision = Convert.ToDecimal(context.Request.Params["commision"]);
    decimal commision2 = Convert.ToDecimal(context.Request.Params["commision2"]);
    string reference = context.Request.Params["reference"];
    string comments = context.Request.Params["comments"];
    string saleChannel = context.Request.Params["saleChannel"];
    int expiryDays = Convert.ToInt32(context.Request.Params["expiryDays"]);


    My skype is darrellmartin3
  2. drmartinjr3i3

    drmartinjr3i3 aMember Pro Customer

    Joined:
    Nov 21, 2010
    Messages:
    65

Share This Page