GithubHelp home page GithubHelp logo

ingenico-epayments / connect-sdk-go Goto Github PK

View Code? Open in Web Editor NEW
8.0 11.0 6.0 566 KB

Ingenico Connect Go Server SDK

Home Page: https://docs.connect.worldline-solutions.com/documentation/sdk/server/go/

License: Other

Go 100.00%
go-sdk ingenico globalcollect ingenico-connect

connect-sdk-go's Introduction

Ingenico Connect Go SDK

This SDK has been rebranded to Worldline. As part of the rebranding the SDK has moved to https://github.com/Worldline-Global-Collect/connect-sdk-go.

Introduction

The Go SDK helps you to communicate with the Ingenico Connect Server API. Its primary features are:

  • convenient go wrapper around the API calls and responses
    • marshalls Go request structs to HTTP requests
    • unmarshalls HTTP responses to Go response structs or Go exceptions
  • handling of all the details concerning authentication
  • handling of required meta data

Its use is demonstrated by an example for each possible call. The examples execute a call using the provided API keys.

See the Ingenico Connect Developer Hub for more information on how to use the SDK.

Requirements

Go version 1.11 or higher is required. No additional packages are required.

Examples

This repository also contains some example code. This code is contained in the examples folder.

Installation

Source

To install the latest version of this repository, run the following command from a terminal:

go get github.com/Ingenico-ePayments/connect-sdk-go

Release

Go 1.11 added module support and with that support for versions in go get. This means that, if your project uses modules, you can add @version to the go get command to get a specific version. For example, go get github.com/Ingenico-ePayments/[email protected] will download version 2.9.0 of the SDK. See the releases page for an overview of available releases.

If your project does not use modules yet, you will need to use the instructions above to install from source. Note that new major versions may introduce breaking changes. We therefore recommend using modules in your project. See Migrating to Go Modules for more information.

Running tests

There are two types of tests: unit tests and integration tests. The unit tests will work out-of-the-box; for the integration tests some configuration is required. First, some environment variables need to be set:

  • connect.api.apiKeyId for the API key id to use. This can be retrieved from the Configuration Center.
  • connect.api.secretApiKey for the secret API key to use. This can be retrieved from the Configuration Center.
  • connect.api.merchantId for your merchant ID.
  • connect.api.proxyUrl for the URL to the proxy to use (optional). If set, it should be in the form scheme://[userinfo@]host[:port]. Examples: http://proxy.example.org, http://user:[email protected], http://proxy.example.org:3128.

The following commands can now be executed from the root directory of the SDK folder to execute the tests:

  • Unit tests:

    go test ./...
    
  • Both unit and integration tests:

    go test -tags=integration  ./...
    

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.