Getting Started
#
RequirementApplication has been integrated with Terra
. If not, please follow this Terra integration instruction.
#
InstallationFirstly please refer to Teko repository access guide for instruction to setup the environment.
When the environment is ready, add the below code to import:
- iOS
- Android
- Flutter
#
Flutter sideFor detail installation, please refer Payment installation
#
AndroidOpen the android project inside the android
folder of your project in Android studio
.
#
1. Add token to get Terra librariesAdd TekoGoogleRegistryToken to the local.properties
file (contact trung.cs@teko.vn to get
the token).
In project build.grade
(android/build.gralde
file). Add the following code:
#
2. Enable dataBinding and multiDex for the app moduleAdd some line below to the build.gradle
of app module (android/app/build.gradle
file).
#
3. Set up callback urls for paymentAfter payment through banks app or payment app's 3rd, these app will call the success url to inform the result to Payment SDK. In this case we need the application to config the callback urls.
- Set up
Payment service
onTerra Dashboard
- Step 1: Go to your project on terra
- Step 2: Open Payment Service and add your urls callback into
callback.success
andcallback.cancel
- Set up
AndroidManifest
file.- Step 1: Go to
AndroidManifest
in your project. - Step 2: Add intent filters for incoming links as below.
- Step 1: Go to
Notes: Make sure the urls
callback is same between Payment service on Terra
config and AndroidManifest
.
#
4. Add VNPay e-wallet to app module (if your app uses VNPay e-wallet)Please follow the instruction in this page: https://demomb.vnpay.vn:20157/sdk/sdkwallet/index.html. Please contact Terra team if you have any concerns.
Note: Currently, sdkwallet only runs on real device.
#
iOSOpen the ios
project insdie the android folder of your project in xcode
.
#
1. Setup github access token for accessing Teko iOS frameworksPlease contact trung.cs@teko.vn to get the token
Add new environment variable to your computer with the following key: GITHUB_USER_TOKEN
.
#
2. Set up the Podfile- At the beginning of your Podfile, define the source:
- Configure targets for frameworks
Normally, in the Podfile
there is the following code:
In this case, we update the existing code to:
Note: please do not commit <your_token_secret> to github or it will be revoked
#
4. Set up callback urls for paymentAdd URL Schemes for handle result. App scheme must match callbackURL field value in Terra dashboard.
#
3. Add UINavigation to your iOS app- Open the
AppDelegate.swift
file.
#
4. Add VNPay e-wallet to main bundle (if your app uses VNPay e-wallet)Copy bundle resource VnpayWalletSDKBundleResouce.bundle
(in this page) to main bundle.
Please contact Terra team if you have any concerns.
Note: Currently, sdkwallet only runs on real device.
Using CocoaPods
Add MinervaUI
pod to your Podfile
Add URL Schemes for handle result. App scheme must match callbackURL field value in Terra dashboard.
Using Gradle
In build.gradle app level (usually app/build.gradle
).
After payment through banks app or payment app's 3rd, It will be call success url as inform result to Payment Service. In that case we expected the main app(applied PaymentSDK) will be show as default after that. That's why we need config deep link callback.
- Setup
Payment service
onTerra Dashboard
- Step1: Go to your project on terra
- Step2: Open Payment Service and add your urls callback into
callback.success
andcallback.cancel
- Setup in
AndroidManifest
- Step1: Go to
AndroidManifest
(app) in your project - Step2 : Add intent filters for incoming links as below
- Step1: Go to
Notes: Make sure the urls
callback is same between Payment service on Terra
config and AndroidManifest
#
Dependency- iOS
- Android
- Flutter