button / button-client-ruby Goto Github PK
View Code? Open in Web Editor NEWruby client for the Button Order API
License: MIT License
ruby client for the Button Order API
License: MIT License
I am currently trying to write a merchant integration using this gem, but having trouble authenticating to the button api. We have a demo account that has been setup, and I am able to create orders in the button dashboard via curl using the same api key we are using in our rails project. When I attempt to create an order running locally, I am getting this error:
Errno::ECONNREFUSED - Failed to open TCP connection to api.usebutton.com:80
This is what the client setup looks like:
@client = Button::Client.new(ENV["BUTTON_API_KEY"], { secure: Rails.env.production? })
And this is what the client resource looks like:
#<Button::Accounts:0x00007fae0794d498
@api_key="the_actual_api_key_read_from_the_env_variable",
@config=
{:secure=>false,
:timeout=>nil,
:hostname=>"api.usebutton.com",
:port=>80,
:api_version=>nil},
@http=#<Net::HTTP api.usebutton.com:80 open=false>>
Any idea what I am doing wrong? I wrote a similar style integration a while back and this was working fine locally for me, but now it is not. I am on the 2.5 version of the gem.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.