Giter Club home page Giter Club logo

braintree_perl's People

Contributors

ayanonagon avatar braintreeps avatar dr-kd avatar jtdowney avatar manwar avatar robkinyon avatar tony-o avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

braintree_perl's Issues

Missing Dependency

Installing from cpan fails requiring Moose::Role.
Installing Moose::Role before WebService::Braintree is a suitable workaround.

Moose -> Moo

Would you consider moving from Moose to Moo? I tried doing that, there are not that many issues. The only problem is with AdvancedSearchFields package.

Or simply would you accept a PR? :)

testing fails under Test::Pod 1.40

t/unit/pod.t ................................. 1/209 
#   Failed test 'blib/lib/WebService/Braintree/Configuration.pm'
#   at /home/jwright/perl5/lib/perl5/Test/Pod.pm line 219.
# blib/lib/WebService/Braintree/Configuration.pm (32): L<text|scheme:...> is invalid according to perlpod
t/unit/pod.t ................................. 149/209 # Looks like you failed 1 test of 209.
t/unit/pod.t ................................. Dubious, test returned 1 (wstat 256, 0x100)

Inconsistent find() behavior

In WebService::Braintree::Customer, both create() and find() are supposed to return a Result object with the customer() method available, according to the POD. create() does this as expected, but find() returns the actual customer object instead.

Looking through the various Gateway modules, most of the find() methods return a Result object, but three don't:

  • CustomerGateway
  • MerchantAccountGateway
  • SubscriptionGateway

Changing these three to match the rest will break existing code, but that probably makes more sense than having some modules work one way and some another (which is how I found the inconsistency). The fix is to remove the ->customer or equivalent call after _make_request in each module's find() method.

Moo versions before 1.00600 cause test failures

Moo before 1.00600 lacks the 'coerce => 1' feature for attributes

t/unit/00-load.t ............................. 1/? Bailout called.  Further testing stopped:  

#   Failed test 'use WebService::Braintree;'
#   at t/unit/00-load.t line 11.
#     Tried to use 'WebService::Braintree'.
#     Error:  Invalid coerce '1' for WebService::Braintree::_::AmexExpressCheckoutCard->subscriptions not a coderef or code-convertible object at /home/perl/perl5/lib/perl5/Method/Generate/Accessor.pm line 642.

Braintree's sandbox no longer sending a Content-Length header

In HTTP.pm, it checks for the Content-Length header to see if we have a valid response, but Braintree recently made a change in their sandbox to not send that header anymore.

Their python module checks for the length of the body instead, and the attached patch does the same (in addition to checking for the header).

https://github.com/braintree/braintree_python/blob/master/braintree/util/http.py#L80

WebService-Braintree_check_content_length.txt

FTBFS: missing dependency DateTime/Format/RFC3339

#   Failed test 'use WebService::Braintree;'
#   at t/00-load.t line 6.
#     Tried to use 'WebService::Braintree'.
#     Error:  Can't locate DateTime/Format/RFC3339.pm in @INC

Error happened in CentOS v7 when I attempted to install WebService::Braintree by using cpanm.

Transaction->submit_for_settlement broken by validation added in 1.3

I'm getting an ArgumentError when calling:

WebService::Braintree::Transaction->submit_for_settlement($order_id, $amount);

The code in that module sets $params->{'amount'} to $amount, and then calls the equivalently-named method in WebService::Braintree::TransactionGateway. That method has a new verify_params call that doesn't have "amount" on its whitelist, which appears to be causing the failure.

On a related note, all three of submit_for_settlement, update_details, and submit_for_partial_settlement have "description" in their whitelist, whereas Braintree appears to be expecting "descriptor" (based on looking at the API docs and the equivalent Ruby gem -- I haven't actually tried using these fields).

Initialising using Object Notation

When trying to use object notation (as per perldoc), Gateway tries to call WebService::Braintree::Config instead of WebService::Braintree::Configuration. (Fails, unable to find new).

Line 46 on Gateway.pm states:

        config => WebService::Braintree::Config->new( $args ),

Should read:

        config => WebService::Braintree::Configuration->new( $args ),

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.