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:

Using Gradle

In build.gradle app level (usually app/build.gradle).

dependencies {
implementation("vn.teko.android.payment:payment-ui:$version")
}

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.

  1. Setup Payment serviceon Terra Dashboard
    • Step1: Go to your project on terra
    • Step2: Open Payment Service and add your urls callback into callback.success and callback.cancel
  2. Setup in AndroidManifest
    • Step1: Go to AndroidManifest(app) in your project
    • Step2 : Add intent filters for incoming links as below
....
<activity android:name="vn.teko.android.payment.ui.PaymentActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="your_domain" // for ex: payment.teko.vn
android:path="your_path" // optional
android:scheme="https" />
</intent-filter>
</activity>
...

Notes: Make sure the urls callback is same between Payment service on Terra config and AndroidManifest

Dependency#