Skip to content

Releases: Pacific3/SwiftyOpenPay

SwiftyOpenPay v0.4

22 Mar 22:06
Compare
Choose a tag to compare

Compile with Xcode 7.3 & Swift 2.2

SwiftyOpenPay v0.3

16 Feb 21:56
Compare
Choose a tag to compare

SwiftyOpenPay v0.3 updates underlying dependencies, adds values to Card types.

SwiftyOpenPay v0.2.3

18 Jan 23:12
Compare
Choose a tag to compare

Solves bug generating production and sandbox URLs.

SwiftyOpenPay v0.2.2

18 Jan 22:08
Compare
Choose a tag to compare

This release changes minimum deployment target to iOS 9.0

SwiftyOpenPay v0.2.1

15 Jan 21:34
Compare
Choose a tag to compare

This release introduces new SwiftyOpenPay.Configuration.

SwiftyOpenPay v0.2

15 Jan 20:37
Compare
Choose a tag to compare

This release includes major improvements to the reliability of the framework.

This update is critical!

SwiftyOpenPay v0.1.1

15 Jan 18:15
Compare
Choose a tag to compare

This release fixes internal validation errors, adds some tests.

Some minor changes to the API.

SwiftyOpenPay v0.1

13 Jan 18:51
Compare
Choose a tag to compare

This is the initial release for SwiftyOpenPay.

SwiftyOpenPay is an _unofficial_ OpenPay API client for iOS written in Swift.

Use at your own risk.

Installation

SwiftyOpenPay can be installed using Carthage.

In your Cartfile, include SwiftyOpenPay:

github "Pacific3/SwiftyOpenPay" ~> 0.1

Usage

import SwiftyOpenPay

let myAddress = Address(
    line1: "1 Infinite Loop",
    city: "Cupertino",
    state: "California",
    countryCode: "US",
    postalCode: "95014"
)

let myCard = Card(
    holderName: "John Doe",
    expirationMonth: "12",
    expirationYear: "19",
    address: myAddress,
    number: "XXXXXXXXXXXX"
)

let openPay = SwiftyOpenPay(merchantId: "MyMerchantId", apiKey: "MyAPIKey")

do {
    try openPay.createTokenWithCard(myCard,
        completion: {token in
            print(token.id)
        },
        error: {error in
            print(error)
        }
    )
} catch {
    print(error)
}

Disclaimer

SwiftyOpenPay is not an oficial Openpay product. Openpay is not responsible for either this code or what you use it for.
The use of SwiftyOpenPay is your and only your responsability.

Openpay does provide an officially supported version of their iOS API client, which can be found over at their GitHub page.

Refer to Openpay's Privacy Notice and Terms of Service.