To run the example project, clone the repo, and run pod install from the Example directory first. Then input your LeatherBack public key to be able to test
Requirements
Xcode 11.0 or greater
iOS 10 or greater
Installation
LAAS is available through CocoaPods. To install
it, simply add the following line to your Podfile:
pod 'LAAS'
Manual
Get the latest version of LAAS via SPM.
Go to File -> Swift Packages -> Add Package Dependency…
Then enter the URL for this package https://github.com/leatherback01/AaaS_iOS_SDK.git and select the most recent version.
To receive events from the LeatherBackViewController your presenting viewcontroller will need to conform to the LeatherBackDelegate
class ViewController: UIViewController, LeatherBackDelegate {
func onLeatherBackError(error: LeatherBackErrorResponse) {
print("error \(error.localizedDescription)")
}
func onLeatherBackSuccess(response: LeatherBackResponse) {
//Use this reference to verify payment/transaction with LeatherBack
print("success \(response.reference)")
}
func onLeatherBackDimissal() {
print("dismissed")
}
}
LeatherBackTransactionParam
if showPersonalInformation is set to false, merchants are to provide the Customer’s Name and Email address but if showPersonalInformation is set to true, LeatherBack will collect this information from the customer during checkout.
if reference is set to an empty string, it defaults to nil but onLeatherBackSuccess delegate method will return a reference that can be used for verifying transaction/payment
if isProducEnv is set to true, it you are to pass the production key while if it is set false, you are to pass the test keys
if channels is set to nil, the checkout will return all payment collection options
LAAS
Example
To run the example project, clone the repo, and run
pod install
from the Example directory first. Then input your LeatherBack public key to be able to testRequirements
Installation
LAAS is available through CocoaPods. To install it, simply add the following line to your Podfile:
Manual
Get the latest version of LAAS via SPM.
Go to File -> Swift Packages -> Add Package Dependency…
Then enter the URL for this package
https://github.com/leatherback01/AaaS_iOS_SDK.git
and select the most recent version.Usage
Import LAAS
To receive events from the
LeatherBackViewController
your presenting viewcontroller will need to conform to theLeatherBackDelegate
LeatherBackTransactionParam
if
showPersonalInformation
is set tofalse
, merchants are to provide the Customer’s Name and Email address but ifshowPersonalInformation
is set totrue
, LeatherBack will collect this information from the customer during checkout.if
reference
is set to an empty string, it defaults tonil
butonLeatherBackSuccess delegate method
will return a reference that can be used for verifying transaction/paymentif
isProducEnv
is set to true, it you are to pass the production key while if it is set false, you are to pass the test keysif
channels
is set to nil, the checkout will return all payment collection optionsLicense
LAAS is available under the MIT license. See the LICENSE file for more info.