Releases: Pacific3/SwiftyOpenPay
SwiftyOpenPay v0.4
Compile with Xcode 7.3 & Swift 2.2
SwiftyOpenPay v0.3
SwiftyOpenPay v0.3 updates underlying dependencies, adds values to Card types.
SwiftyOpenPay v0.2.3
Solves bug generating production and sandbox URLs.
SwiftyOpenPay v0.2.2
This release changes minimum deployment target to iOS 9.0
SwiftyOpenPay v0.2.1
This release introduces new SwiftyOpenPay.Configuration
.
SwiftyOpenPay v0.2
This release includes major improvements to the reliability of the framework.
This update is critical!
SwiftyOpenPay v0.1.1
This release fixes internal validation errors, adds some tests.
Some minor changes to the API.
SwiftyOpenPay v0.1
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.