Getting Started
Requirement#
Application has been integrated with Terra. If not, please follow this Terra integration instruction.
Installation#
Firstly 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 side#
For detail installation, please refer Payment installation
Android#
Open the android project inside the android folder of your project in Android studio.
1. Add token to get Terra libraries#
Add 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 module#
Add some line below to the build.gradle of app module (android/app/build.gradle file).
3. Set up callback urls for payment#
After 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 serviceonTerra Dashboard- Step 1: Go to your project on terra
- Step 2: Open Payment Service and add your urls callback into callback.successandcallback.cancel
 
- Set up AndroidManifestfile.- Step 1: Go to AndroidManifestin 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.
iOS#
Open the ios project insdie the android folder of your project in xcode.
1. Setup github access token for accessing Teko iOS frameworks#
Please 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 payment#
Add 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.swiftfile.
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 serviceonTerra Dashboard- Step1: Go to your project on terra
- Step2: Open Payment Service and add your urls callback into callback.successandcallback.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