Giter Site home page Giter Site logo

Comments (2)

raymondberg avatar raymondberg commented on June 3, 2024

Thanks for the suggestion, @marotti! If I understand you, you'd like to tighten up the timeout to something below 60 seconds (as the gateway will timeout anything over 60 seconds). You're right, this would be really handy in the Java library. We'll look at what it will take to get this implemented. We'll let you know when we have updates.

from braintree_java.

omgrr avatar omgrr commented on June 3, 2024

We just released a new version of the library where you can set the timeout. Keep in mind when setting the timeout that the Braintree gateway currently has a timeout of 60 seconds to accomadate long requests. However, if you set the timeout for less than 60 seconds you may not see the result.

For example, if you set the server SDK timeout to 10 seconds and the request successfully charges the customer at the processor after 19 seconds, then the customer will be charged for the transaction and you will not be notified of this. You will need to check the state of the transaction in the gateway to verify whether the transaction was successful or not.

private static BraintreeGateway gateway = new BraintreeGateway(
  Environment.SANDBOX,
  "your_merchant_id",
  "your_public_key",
  "your_private_key"
);
gateway.configuration.setTimeout(10000);

If you have any issues please feel free to reach out to us, thanks again for bringing this up!

from braintree_java.

Related Issues (20)

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.