bitpagos ruby gem
TRANSCRIPT
Bitpagos GemOmbuLabs, January 2016
Bitpagos API docsBitpagos offers *some* documentation for their API:
http://docs.bitpagos.net/en/transaction-status/
API Endpoints3 main endpoints:
- Authentication (already tackled by github.com/etagwerker/omniauth-bitpagos)
- Checkout- Transaction
API Endpoints3 main endpoints:
- GET /oauth2/authorize- POST /oauth2/access_token- POST /checkout- GET /transaction
API EndpointsOnly the Transaction endpoint has been covered by the gem so far, which allows you to grab (GET) the transactions in your Bitpagos account.
Where’s the gem?github.com/ombulabs/bitpagos
rubygems.org/gems/bitpagos
Problems while implementing the gem
Poor API documentation:
- Undocumented parameters (transaction status, limit, offset)
- Not so accurate return values in the documentation examples
Problems while implementing the gem
RestClient was chosen after looking up a few other payment APIs done using Ruby.
It’s not very intuitive to send both params and headers in a GET request [1]
RestClient.get(url, headers: {myheader: 'bar', params: {foo: 'bar'}})➔ GET http://example.com/resource?foo=bar
[1] github.com/rest-client/rest-client#passing-advanced-options
What’s the gem missing?
- Pagination feature- Usage instructions- Checkout endpoint implementation- Better separation, it’s mostly one big
Bitpagos::Client class
Is it production ready?
NO. Only after the pagination feature is developed and merged to master. Then it should be good to go!
THANK YOU!questions?