github.com/Ingenico-ePayments/connect-sdk-go@v0.0.0-20240318153750-1f8cd329b9c9/README.md (about)

     1  # Ingenico Connect Go SDK
     2  
     3  **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.**
     4  
     5  ## Introduction
     6  
     7  The Go SDK helps you to communicate with the [Ingenico Connect](https://epayments.developer-ingenico.com/) Server API. Its primary features are:
     8  
     9  * convenient go wrapper around the API calls and responses
    10      * marshalls Go request structs to HTTP requests
    11      * unmarshalls HTTP responses to Go response structs or Go exceptions
    12  * handling of all the details concerning authentication
    13  * handling of required meta data
    14  
    15  Its use is demonstrated by an example for each possible call. The examples execute a call using the provided API keys.
    16  
    17  See the [Ingenico Connect Developer Hub](https://epayments.developer-ingenico.com/documentation/sdk/server/go/) for more information on how to use the SDK.
    18  
    19  ## Requirements
    20  
    21  Go version 1.11 or higher is required. No additional packages are required.
    22  
    23  ## Examples
    24  
    25  This repository also contains some example code. This code is contained in the examples folder.
    26  
    27  ## Installation
    28  
    29  ### Source
    30  
    31  To install the latest version of this repository, run the following command from a terminal:
    32  
    33      go get github.com/Ingenico-ePayments/connect-sdk-go
    34  
    35  ### Release
    36  
    37  Go 1.11 added [module support](https://blog.golang.org/using-go-modules) 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/connect-sdk-go@2.9.0` will download version 2.9.0 of the SDK. See the releases page for an overview of available releases.
    38  
    39  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](https://blog.golang.org/migrating-to-go-modules) for more information.
    40  
    41  ## Running tests
    42  
    43  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:
    44  
    45  * `connect.api.apiKeyId` for the API key id to use. This can be retrieved from the Configuration Center.
    46  * `connect.api.secretApiKey` for the secret API key to use. This can be retrieved from the Configuration Center.
    47  * `connect.api.merchantId` for your merchant ID.
    48  * `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:pass@proxy.example.org`, `http://proxy.example.org:3128`.
    49  
    50  The following commands can now be executed from the root directory of the SDK folder to execute the tests:
    51  
    52  * Unit tests:
    53      
    54      ```
    55      go test ./...
    56      ```
    57  *  Both unit and integration tests:
    58      
    59      ```
    60      go test -tags=integration  ./...
    61      ```