Giter VIP home page Giter VIP logo

Comments (8)

tuurbo avatar tuurbo commented on July 24, 2024 1

@lasergoat https://docs.spreedly.com/guides/debugging/#timeouts

from spreedly.

tuurbo avatar tuurbo commented on July 24, 2024

You can override the default timeouts in the config.

$config = [
    'key' => '', // Environment key
    'secret' => '', // Signing Secret
    'gateway' => '', // Default gateway
    'timeout' => 123, // Default 15
    'connect_timeout' => 456 // Default 10
];

http://docs.guzzlephp.org/en/latest/request-options.html#timeout
http://docs.guzzlephp.org/en/latest/request-options.html#connect-timeout

from spreedly.

simplenotezy avatar simplenotezy commented on July 24, 2024

So the timeout Spreedly is talking about, is that timeout, or connect_timeout?

And shouldn't the default be 64 as recommended by Spreedly?

from spreedly.

tuurbo avatar tuurbo commented on July 24, 2024

I believe connect_timeout is the time it takes to connect to Spreedly and timeout is the time it takes after the connection is made to Spreedly. So the 64 seconds Spreedly was referring to would be timeout. I have no plans to change the default, but I'm considering adding a timeout method that could be used override the timeout for specific api calls, Spreedly::timeout(64)->payment('sfds3gh41287dhfui')->purchase(1098)

from spreedly.

simplenotezy avatar simplenotezy commented on July 24, 2024

I am curious. Why not just add the recommended timeout settings to provide a stable experience?

They recommend having it to 64 secs as per their docs.

from spreedly.

tuurbo avatar tuurbo commented on July 24, 2024

After thinking about it more, you right. So i set the default to 64 seconds and added a new method to override api calls like Spreedly::timeout(15)->payment('sfds3gh41287dhfui')->get() that don't need 64 seconds.

https://github.com/tuurbo/spreedly#changelog

from spreedly.

lasergoat avatar lasergoat commented on July 24, 2024

How do you know which calls need 15 and which need 64? Is it calls that reach to a gateway that need the 64?

from spreedly.

tuurbo avatar tuurbo commented on July 24, 2024

@lasergoat Going from memory, up to 15 secs to connect to spreedly and up to 64 secs for spreedly to connect to the gateway.

from spreedly.

Related Issues (15)

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.