2. Bitpagos API docs
Bitpagos offers *some* documentation for their API:
http://docs.bitpagos.net/en/transaction-status/
3. API Endpoints
3 main endpoints:
- Authentication (already tackled by
github.com/etagwerker/omniauth-bitpagos)
- Checkout
- Transaction
4. API Endpoints
3 main endpoints:
- GET /oauth2/authorize
- POST /oauth2/access_token
- POST /checkout
- GET /transaction
5. API Endpoints
Only the Transaction endpoint has been covered by the
gem so far, which allows you to grab (GET) the
transactions in your Bitpagos account.
7. Problems while implementing the gem
Poor API documentation:
- Undocumented parameters (transaction status, limit,
offset)
- Not so accurate return values in the documentation
examples
8. 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
9. What’s the gem missing?
- Pagination feature
- Usage instructions
- Checkout endpoint implementation
- Better separation, it’s mostly one big
Bitpagos::Client class
10. Is it production ready?
NO. Only after the pagination feature is developed and
merged to master. Then it should be good to go!