This repository demonstrates how to integrate Inai’s iOS Framework into your project.
- Make a payment with variety of payment methods
- Save a payment method
- Pay with Saved Payment Method
- Pay with Apple Pay (iOS) - Setup Instructions
- File : ApplePayViewController.swift
- Validate Fields
- Get Card Info
- Make a payment using Inai's Checkout Interface
- To begin, you will require the client username and client password values. Instructions to get this can be found here
- Make sure the following steps are completed in the merchant dashboard,
iOS 9, Swift 5.x
To start the backend NodeJS server:
- Navigate to the ./server folder at the root level.
- Run command
npm install
to install the dependency packages. - Update the following environment variables in the
./server/.env
file. This can be accessed from inai's merchant dashboard underSettings > Credentials
- client_username
- client_password
variables | description |
---|---|
client_username | client username under Settings > Credentials in dashboard |
client_password | client password under Settings > Credentials in dashboard |
- Run command
npm start
to start the nodejs backend server
To setup the inai sample app for iOS, follow the steps below:
git clone https://github.com/inaitech/inai-ios-sample-integration
- Navigate to ./config.plist fileupdate the following values :
- Client Username
- Base URL // backend api server url eg: http://localhost:5009. If you are using a simulator, please replace localhost with the system IP address.
- Run command
pod install
at the root level of the project to install the CocoaPods dependencies. - Open the workspace file
inai-ios-sample-integration.xcworkspace
, build and run the project. - In
DemoConstants.swift
, replaceamount
,currency
&country
as required.
Inai ios sdk reference docs available here. If you found a bug or want to suggest a new [feature/use case/sample], please contact customer support.