Android APP SDK / 使用說明

Android SDK使用說明

適用於前端Android App,提供特店站內付2.0金流功能。Android SDK詳細的安裝方式與範例程式請參閱 GitHub

支援

  • Android Gradle Plugin 3.6.3
  • minSdkVersion 21 (Android 5.0)
  • targetSdkVersion 30 (Android 11.0)

安裝

  • ECPay Payment SDK公開於Maven Central來源庫。請於app/build.gradle檔案加上dataBinding設定
				
					android {
    dataBinding {
        enabled = true
    }
}
				
			
  • app/build.gradle 檔案新增dependencies
				
					dependencies {
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'com.google.android.material:material:1.1.0'
    implementation 'com.google.code.gson:gson:2.8.5'
    implementation 'com.google.zxing:core:3.3.0'
    implementation 'com.squareup.okhttp3:okhttp:4.6.0'
    implementation 'com.squareup.okhttp3:logging-interceptor:4.6.0'
    implementation 'com.squareup.retrofit2:retrofit:2.8.1'
    implementation 'com.squareup.retrofit2:converter-gson:2.8.1'

    // ECPay Payment SDK
    implementation 'tw.com.ecpay:ECPayPaymentGatewayKit:1.2.1'

    if (JavaVersion.current().ordinal() >= JavaVersion.VERSION_1_9.ordinal()) 
    {
        annotationProcessor 'javax.xml.bind:jaxb-api:2.3.1'
        annotationProcessor 'com.sun.xml.bind:jaxb-core:3.0.2'
        annotationProcessor 'com.sun.xml.bind:jaxb-impl:2.3.6'
        annotationProcessor 'javax.activation:activation:1.1.1'
    }
}
				
			
				
					buildscript {
    repositories {
        mavenCentral()
    }
}
				
			

Copyright © Green World FinTech Service Co., Ltd. All rights reserved.

綠界官方網站