Giter VIP home page Giter VIP logo

ctct_php_library's People

Contributors

ctctsupport avatar dsjellz avatar focorunner avatar polyfractal avatar purdy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ctct_php_library's Issues

Subclassing CTCTDataStore causes invalid token error

I've used your library and can successfully use the OAuth2 server flow to access the CTCT API and retrieve data. I've subclassed CTCTDataStore to store access credentials in database instead of a specific user session, but find I find CTCTDataStore is being called anyway and not by subclass. This causes the API request to fail since the session data doesn't contain current credentials.

Should I be registering my subclass somewhere? Do you have an example of using your library where CTCTDataStore is reimplemented?

SSL version may need to be explicitly set

This script will not work on debian wheezy when it comes out (php5.4/curl 7.26) because the CTCT servers will reject the connection (as an added bonus, the process ties down the entire server for 30 seconds or so). For my configuration, this was fixed by adding the following to line 1117 of Authentication.php

curl_setopt($curl, CURLOPT_SSLVERSION,3);

I do not know what effects this might have on other configurations.

OAuthException namespacing

I don't know if this should be classified as a true issue or not, but the OAuthException class in Authentication.php collides with the predefined OAuthException class included with the default php installation, at least on Amazon Web Services.

Proposal: Code clean-up, refactoring, unit tests, etc.

Hi!

I'd like to propose that this Constant Contact PHP library be completely refactored to include the following:

  • Unit test coverage
  • Travis-CI integration
  • Proper autoloading
  • PSR0 compliance
  • Proper coding standards (PSR1/PSR2)
  • Composer/Packagist support

The current Constant Contact PHP library is unusable for many large companies who cannot use third party code that is not properly tested.

I have started this refactoring in my feature/refactoring branch on my fork. Any feedback would be welcome.

makeRequest effectively ignores error responses.

    } catch(CTCTException $e) {
        $e->generateError();
    }
    return $return;

Right at the end of Authentication.php. Errors aren't thrown up the stack, so if anything goes wrong an error is generated but the library goes on acting if nothing happened. As of right now, this means if someone submits incorrect authentication information it's impossible to do anything without simplexml_load_xml($response['xml']) throwing an error - there's no way to tell whether or not a user's actually authenticated! This carries over to if anything goes wrong - it gets passed back as if it's valid information and there's no way for a developer to verify whether or not a call executed successfully.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.