Jump to content

velaware

Alpha Developers
  • Posts

    346
  • Joined

  • Last visited

  • Days Won

    8

Posts posted by velaware

  1. Don't know why I didn't see your posts earlier Cody & Cubic.

     

    @Cody: I'm starting to do the README more often.  As for a LICENSE, do you guys have a specific license you wish to support (Apache 2, MIT, LGPL, etc...), or is it up to the developer?

     

    @Cubic: I can do that, but I'd rather wait until I can use my desktop, lol.  Right now I'm locked down to my netbook and it is a pain in the tushy to work with to say the least for things like that.

  2. I made a thread on this elsewhere but since I did a bit of a major overhaul, enough to warrant basically a 2.0 of it.

     

    This differs in very, very big ways.  The biggest is that this supports ORM now.

     

    Instead of manually calling APIs via doing this:

    from blesta_api import *
    
    api = BlestaAPI(...)
    api.get("ApiKeys", "getList")
    
    

    You can do it this way:

    from blesta_api import *
    
    api = BlestaAPI(...)
    
    # Get list of API keys
    api.models.ApiKeys.getList()
    
    # Use my API Helper's test module
    api.plugins.apihelper.test(str="Returning this string")
    

    This makes the code easier and more pleasant to read.

     

    It should be noted that both methods are supported, and for ORM to work the API Helper plugin needs to be installed.  Otherwise this won't work (Blesta doesn't offer a native way to get all available API calls).

     

    All api.models calls are found in /blesta/app/models while api.plugins reads all plugins that have a public model in the /blesta/plugins directory.

     

    Source: https://github.com/anzenehansen/Blesta-Goodies/blob/master/api/blesta_api.py

    API Helper tarball: https://github.com/anzenehansen/Blesta-Goodies/raw/master/apihelper_plugin.tar.gz

     

    INSTALL

    Use as you would any other Python script.  The only thing you have to actually import is BlestaAPI, so from blesta_api import BlestaAPI is fine too.

     

    TODO

    • Create a way to determine HTTP method for each API call (currently only GET is supported)

    CHANGE LOG

    v2.0.0 - 01/28/2014

    • Initial release
  3. I think he means a single user/pass to login to a different account across multiple companies.

     

    For example, you have Company A and Company B. Client can use the same credentials to login to each.

     

    We've considered this scenario, and it probably wouldn't be too much work but it hasn't been heavily requested. Essentially, we would have to ask the customer what account they want to access upon login if the user had access to more than one account.

    Maybe another plugin for me to make?  All would have to happen is hook into the users.login event essentially.

  4. It will be nice to be able to create one contact that will have access to multiple client account.

     

    For example, here, we have a user that manage multiple company and we need to create different login to make a difference between each company...

    I'm not sure if you're using Blesta properly then for this model?  I mean, a single login can have multiple types of contacts but logins typically are based on people needing a login for their whole company, not to manage subdivisions.

  5. According to the docs, you could create payment accounts without using javascript (as we've done with Stripe), using their PHP library. BTW, this appears to be a shameless copy of Stripe. :D

    The backers for Stripe also back Balanced or something like that.  But the problem with doing it via PHP is that you have to be PCI compliant at that stage because personal data is being sent to the servers.  The point of this is to circumvent PCI compliance by using their JavaScript library. ;)

  6. This plugin is really named API Helper but the title is/was a little misleading.

     

    The plugin extends the functionality of Blesta's API by allowing you to retrieve all the callable methods for API calls as well as provides a simple method to make sure you have your API set up properly.

     

    Source code: https://github.com/anzenehansen/Blesta-Goodies/tree/master/plugins/apihelper

    Tarball download: https://github.com/anzenehansen/Blesta-Goodies/raw/master/apihelper_plugin.tar.gz

     

    This works the same as every other API, but the README provides more details on how it works.

     

    I created this because there was no ability in the current API to retrieve current calls.  I do plan on fixing this up a bit to only use plugins that are installed (simple change just wanted to put out version 1.0.0 for now).

     

    INSTALL

     

    Simply place the folder apihelper into your plugins directory then install it via Blesta.  There's no management or feature set to worry about, its basically set it and forget it.

     

    CHANGE LOG

     

    v1.0.1 - 01/28/2014

    • Retrieves only installed plugins for the company ID (ID retrieved via Configure::get())

    v1.0.0 - 01/28/2014

    • Initial release
  7. Blesta's work is heavily based on PHP.  However, Python is my go-to language of choice.  So, I decided to take Blesta's publicly available API SDK and convert it to Python using standard Python libraries (so no special pip commands needed!).

     

    Here's the link: https://github.com/anzenehansen/Blesta-Goodies/tree/master/api

     

    Right now it works just the same as the PHP version (I basically mirrored it to Python) but soon I plan on making it more Pythonic (hate that word but best way to describe it).  I love ORM style solutions so that is one of the first things I'm going to turn it into.

     

    Its by default 755 if you git it, that was simply due to testing.

  8. We've been looking into this for a while. I wish it were as simple as including javascript, but it's really much more than that. The gateway system would need to be able to interject into the add payment account / process payment in order to fetch related payment information (such as last 4 of card, first/last name, address, etc.) from one or more provided custom fields, which is needed to add a payment account or process one-time payment.

     

    Of course the more gateways we can sample from that support this capability the better/smarter/more confident we can be in our design of such a setup. As for now, I'm only aware of Stripe that does this.

    Balanced does this as well.  Which, i was really hoping to write a plugin for it for Blesta but because of this issue I can't.

  9. Some (a lot?) of merchant gateways use custom code such as via JavaScript to circumvent PCI compliance issues.  From chat with Paul in the forum's chat system, Blesta currently only akllows inserting HTML into the order process for nonmerchants like the PayPal button.

     

    To be more available to other payment solutions, I'm requesting that this same option be available to merchant gateways as well.

  10. Just upgraded. Testing, looks good for now. Do you plan to support any open source control panel?

    I'm working on a way to support i-MSCP since they offer limited support via Remote Bridge plugin.  Others shouldn't be difficult.

  11. There are minute differences, mostly internal, the biggest being that the WidgetClient doesn't support tabs. Aside from that they're pretty much identical.

    That works for me, lol.

     

    Wondering, how do I display text on a widget?  I have this codei n my AdminMain controller's index function:

    $e = "test";
    $d = "bob";
    
    $this->set(compact("e", "d"));
    
    return $this->renderAjaxWidgetIfAsync(false);

    In the view file I have this:

    <?php echo($e . "=" . $d); ?>

    The code in the vie wfile makes the widget not render at all.

  12. This plugin gives insigt to those who want to authenticate users with something other than MySQL (though this can be used along with).  It does require editing some core files, however, which I'm going to test against vQmod so this isn't necessary just haven't gotten around to it today.

     

    Installing this plugin is easy, just place it in the plugin folder.  It also comes with a readme file to go over some things such as what needs to be edited and how.

     

    Some LDAP servers require TLS support to perform actions like updating records, so this plugin offers this feature in the form of a switch.  This plugin also supports multi-company environments by having the admin creating the profile choose the company to select.

     

    Change Log

    v0.0.1-a

    • Initial release
    • Allows only authentication (i.e.: does not add user to LDAP server)
    • Detects if account is staff or client (not heavily tested so please post any issues)

     

    GitHub repo: https://github.com/anzenehansen/Blesta-Goodies/tree/master/plugins/ldap_auth

    Download: https://github.com/anzenehansen/Blesta-Goodies/raw/master/ldapauth_plugin.tar.gz

  13. While I'm waiting for some answers on my database manager plugin I've decided to work on an authentication plugin that, while requires slight modifications to core code, is a lot more convienent than the original method that required putting in a lot of hacked code in the core.  This is minimal and I feel will solve an issue Blesta might have in implementing a custom authentication system.

  14. This is part of my database manager plugin.  I'm trying to create a widget that shows on a client's profile when a staff member goes to view it.  Here's the files in question: https://gist.github.com/anzenehansen/eb26e30a8c1f8169bc66

     

    The widget code is a simple boiler template that just has

    <?php
    $this->Widget->clear();
    $this->Widget->create("Database Manager");
    ?>
    <div class="inner">Tester</div>
    <?php $this->Widget->end(); ?>

    Nothing fancy yet so I'm not sure why this isn't displaying.  I've also tried:

    $this->Widget->create(null, "Database Manager");

    Still nothing is rendered.  The page loads fine otherwise, however.

×
×
  • Create New...