GopayAPI 0.1.1

GopayAPI 0.1.1

Maintained by Kevin Fleming.



 
Depends on:
PromiseKit~> 6.5.2
Alamofire~> 4.7.3
 

GopayAPI 0.1.1

  • By
  • David Ye and Kevin Fleming

Gopay API Swift SDK

Version License Platform

Requirements

The Gopay API Swift SDK is compatible with iOS apps supporting iOS 10.1 and above. It requires Xcode 8.0+ to build the source.

Installation

  1. If you haven't already, install the latest version of CocoaPods.

  2. Add the following line to your Podfile:

    pod "Gopay"
  3. Run the following command:

    pod install
  4. Don't forget to use the .xcworkspace file to open your project in Xcode, instead of the .xcodeproj file, from here on out.

  5. In the future, to update to the latest version of the SDK, just run:

    pod update Gopay

Getting Started

Configuring your app to use our SDK

  1. Add the following to your list of imports:

    import GopayAPI
  2. Create an instance of the API client. You must specify the API endpoint to connect to and the origin header to use when making requests, and can optionally specify an App ID and secret to use when making requests.

    let sdk: GopayAPIClient = GopayAPIClient(options: GopayAPIOptions(endpoint: "http://localhost:9000", origin: "http://localhost:9000", apiId: "APPTOKEN", secret: "APPTOKENSECRET"))
  3. Start using the API client to manage your transactions. Every request made through the SDK will return a Promise from PromiseKit.

    Example: Get a list of stores

    let data: StoreListRequestData = StoreListRequestData(search: "test")
    sdk.storeResource.list(data: data).done { stores in
        print(stores.items)
    })

For more information please check out our full reference guide.

Author

UNIVA Paycast

License

GyronPay is available under the MIT license. See the LICENSE file for more info.