This repository demonstrates how to integrate Inai’s Android Framework into your project.
- Make a payment with variety of payment methods
- Save a payment method
- Save a payment method as you pay
- Pay with a saved payment method
- Validate Fields
- Get Card Info
- File : GetCardInfoFragment.kt
- Pay with Google Pay (Android)
- File : GooglePayActivity.kt
- Make a payment using Inai's Checkout Interface
- File : PresentCheckoutFragment.kt
- 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,
- Android Lollipop Api 21
- Android Studio Chipmunk 2021.2.1
- Kotlin Android Version 1.6.10
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
.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 Android, follow the steps below,
git clone https://github.com/inaitech/inai-android-sample-integration
- Navigate to /app/build.gradle file and update the following values :
- Inai Token
- Base Url // backend api server url eg: http://localhost:5999. If you are using a emulator, please replace localhost with the system IP address.
- Navigate to Config.kt file and update the following values :
- Country
- Amount // for order creation
- Currency // for order creation
- Click on Run in Android Studio to install the app.
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.