iOS SDK
Prerequisites
You’ll need to create an ephemeral key to initialize the Omni object.
Then, you’ll create a TransactionRequest that holds all the necessary data to take a payment.
Finally, you’ll ask Omni to take the payment by calling the takeMobileReaderPayment() method, passing in the TransactionRequest and a block to run once the payment is complete.
Requirements
- iOS 13+
- API key or an ephemeral token
Setting up your Mobile Reader
Installation
Use CocoaPods to install the Fattmerchant iOS SDK.
- Install CocoaPods.
- Add pod 'Fattmerchant' to your Podfile.
- Run pod install.
You can install beta versions directly from GitHub. Modify your Podfile and use the :git and :branch parameters to set your exact value.
- Setup Info.plist.
- To build and run with the Card-Present functionality, you must include the following in your project’s Info.plist:
NSBluetoothAlwaysUsageDescription: Provide a value here to let your users know why Bluetooth access is required
UISupportedExternalAccessoryProtocols:com.idtechproducts.neo
Note: UISupportedExternalAccessoryProtocols:com.idtechproducts.neo is required for VP3550 mobile readers. You can omit this line if you are not using the IDTech VP3550 mobile reader.
Initialize
- Create an instance of InitParams
var initParams = Omni.InitParams(appId: "fmiossample", apiKey: apiKey, environment: Environment.LIVE)
- Pass the initParams to Omni.initialize(...), along with a completion block and an error bloc
omni = Omni()
log("Attempting initalization...")
// Initialize Omni
omni?.initialize(params: initParams, completion: {
// Initialized!
}) { (error) in
}
RequiredApple requires information about the software/hardware of systems using their payment system. Please contact your Account Manager so we can add your device and software to acceptable applications. Please provide:
- Version & Build Number
- Bundle ID
- Name of the app on the store
- Short description of your application
Updated 7 months ago