Giter Club home page Giter Club logo

banwire-java-client's Introduction

Banwire Java Client

Java Client for Banwire's payments platforms API

Supported operations

  • ✅ Tokenise card (⚠️ this call must not be used in production environments since it will increase your PCI scope)
  • ✅ Purchase
  • ❌ Refund

Installation

TODO: complete once published in MVN Central

Usage

Initialisation

BanwireClient banwire = new BanwireClient(HOST, USER);

Tokenise a new card

 Map<String, Object> parameters = new HashMap<>();
 parameters.put("number", "5134422031476272");
 parameters.put("exp_month", 12);
 parameters.put("exp_year", 19);
 parameters.put("cvv", 162);
 parameters.put("name", "Test Test");
 parameters.put("address", "123, Valhalla Lane");
 parameters.put("postal_code", 12345);
 parameters.put("email", "[email protected]");
 parameters.put("phone", "+1 987654321");

 TokenisedCard cardToken = banwire.tokenise(parameters);

Tokenise a card that already exists in Banwire

banwire.tokenise(parameters, true);

Purchase

Map<String, Object> parameters = new HashMap<>();
parameters.put("reference", "MY-ORDER-12345");
parameters.put("token", "crd.1jJckdSrFY3uAVZecM1voax1gLhv");
parameters.put("amount", 100);

Purchase cardToken = banwire.purchase(parameters);

banwire-java-client's People

Contributors

agseco avatar

Watchers

 avatar  avatar  avatar

banwire-java-client's Issues

Handle responses with error

E.g.:

{"error":{"code":"410","detail":"Por el momento no es posible procesar la transacción, favor de intentar mas tarde.","message":"code_unknown"}}

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.