Giter VIP home page Giter VIP logo

mangopay2-go-sdk's Introduction

GoDoc

Purpose

This project is a Go implementation of the MangoPay HTTP REST api version 2.

Installation

Use the api with

$ go get github.com/gotsunami/mangopay2-go-sdk

A command line tool is also available for testing the MangoPay service easily:

$ go install github.com/gotsunami/mangopay2-go-sdk/cmd/[email protected]

Before using it, you must fill a JSON config file with your client credentials (get your sandbox environment credentials):

{
    "ClientId":"myclientid",
    "Name":"Your company name",
    "Email":"contact@company.com",
    "Passphrase":"AlOnGpAsSpHrAsE",
    "Env":"sandbox"
}

Now run mangopay from a terminal to get the list of supported actions:

Usage: ./mangopay [options] action configfile
 
where action is one of: 
  conf              show config
  events            list all events (PayIns, PayOuts, Transfers)
  users             list all users
  user*             fetch a user (natural or legal)

  addnatuser*       create a natural user
  editnatuser*      update natural user info
  natuser*          fetch natural user info

  addlegaluser*     create a legal user
  editlegaluser*    update legal user info
  legaluser*        fetch legal user info

  addwallet*        create a new wallet
  editwallet*       update wallet info
  trwallet*         fetch all wallet's transactions
  wallet*           fetch wallet info
  wallets*          list all user's wallet

  addtransfer*      create a new tranfer
  transfer*         fetch transfer info
  transfers*        list all user's transactions

  addwebpayin*      create a payIn through web interface
  adddirectpayin*   create a direct payIn (with tokenized card)
  payin*            fetch a payIn

  addcard*          register a credit card
  card*             fetch a credit card
  cards*            list all user's cards

  addrefund*        refund a payment (provide TransferId or PayInId)
  refund*           fetch a refund (transfer or payin)

  addaccount*       create an IBAN bank account
  account*          fetch a user's bank account
  accounts*         list all user's bank accounts

  addpayout*        create a bank wire
  payout*           fetch a bank wire

Actions with an asterisk(*) require input JSON data (-d).

Options:
  -d="": JSON data part of the HTTP request
  -v=0: Verbosity level (1 for debug)

API Docs

The API is available on GoDoc.

License

MIT, see LICENSE.

mangopay2-go-sdk's People

Contributors

aboutofpluto avatar ernado avatar greenpart avatar holovkov avatar kirill-a-belov avatar matm avatar olehgol260 avatar sevlyar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mangopay2-go-sdk's Issues

Use Go modules

  • Convert to using Go modules
  • Fix couple of UTs
  • Update README

Card registration process : card registration process not initialized

Hello !

I'm having some problems to register a new credit card.
I follow the process you explain here (https://godoc.org/github.com/gotsunami/mangopay2-go-sdk#MangoPay.NewCardRegistration)

I first perform a Init(), successfully, then the client fill the form and get a token from the external banking service.
Then, I have to call register on the same CardRegistration object, the problem is that I lose it because it's instantiated during the first request (before the form filling). If I create a new CardRegistration object, I get this error : "card registration process not initialized. Did you call Init() first?"

So my question is : how should I keep the CardRegistration object during all the process ?

Thanks in advance

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.