Code Monkey home page Code Monkey logo

maksekeskus's Introduction

Maksekeskus

Build Status

Configuration

Maksekeskus::Config.url = ENV.fetch('URL')
Maksekeskus::Config.shop_id = ENV.fetch('SHOP_ID')
Maksekeskus::Config.api_key = ENV.fetch('API_KEY')
Maksekeskus::Config.secret_key = ENV.fetch('SECRET_KEY')
Maksekeskus::Config.logger = Logger.new(STDOUT)

You may override configuration params localy:

Maksekeskus::Cli.new(url: 'https://api-test.maksekeskus.ee/v1/')

Shop

cli = Maksekeskus::Cli.new
cli.shop.info.json
cli.shop.configuration.json
cli.shop.accountstatements(since: '2017-08-09').json
cli.shop.fees(since: '2017-07-09').json

Transaction

cli = Maksekeskus::Cli.new
cli.transaction.create(transaction: {amount: 5, currency: 'EUR', reference: '123abc'}, customer: {email: '[email protected]', ip: '80.235.22.114'}).json
cli.transaction.get('a6182c9f-d7e6-4420-8706-acbc3179f137').json
cli.transaction.list(since: '2017-08-09').json

Validating the response

cli = Maksekeskus::Cli.new
mac = cli.mac({"shop":"f7741ab2-7445-45f9-9af4-0d0408ef1e4c","amount":"12.95","reference":"123abc","country":"ee","locale":"et"})
mac.composed #=> "F7A5FC0AF516FE4F48E61290CF8F47909D348FC8878CE5B003E7A104DFB38FD4E24E5EE5668057CC9495320432F20528FFE040FCC75617B574D0E40443C1EF00"

maksekeskus's People

Contributors

shlima avatar

Watchers

 avatar

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.