Coder Social home page Coder Social logo

meo-wallet's Introduction

meo-wallet

Node wrapper for MEO Wallet API https://developers.wallet.pt/

Usage

var wallet = require('meo-wallet');

wallet.checkout.create({
  "client": {
    "name": "some name",
    "email": "[email protected]",
    "address": {
      "country": "pt",
      "address":"some street",
      "city": "lisboa",
      "postalcode": "1100-000"
    }
  },
  "amount":10,
  "currency": "EUR",
  "items":[{
    "ref":123,
    "name":"Livro",
    "descr":"Um livro",
  "qt":1
  }]
}, function(error, checkout) {
  if(error) {
    console.log(error);
  }
  console.log(checkout);
});

wallet.checkout.get('153ea3e1-6fce-4e86-9c80-1169c00eae9c', function(error, checkout) {
  if(error) {
    console.log(error);
  }
  console.log(checkout);
});

wallet.checkout.delete('153ea3e1-6fce-4e86-9c80-1169c00eae9c', function(error, checkout) {
  if(error) {
    console.log(error);
  }
  console.log(checkout);
});

wallet.operations.getOperations('limit=3', function(error, operations) {
  if(error) {
    console.log(error);
  }
  console.log(operations);
});

wallet.operations.getOperation('45ff577f-3e40-5598-5eab-c235f9bb832d', function(error, operation) {
  if(error) {
    console.log(error);
  }
  console.log(operation);
});

wallet.operations.refund('45ff577f-3e40-5598-5eab-c235f9bb832d', 'full', function(error, operation) {
  if(error) {
    console.log(error);
  }
  console.log(operation);
});

meo-wallet's People

Contributors

fbaiodias avatar davidslv avatar

Stargazers

Josué Almeida avatar

Watchers

vascop avatar James Cloos avatar  avatar

Forkers

zettacristiano

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.