1. Install the Android SDK For WeChat Pay

1.1 Config gradle :

dependencies {
    compile 'com.tencent.mm.opensdk:wechat-sdk-android-with-mta:+'
}

1.2 Android Java:

class MyPayActivity {
    private IWXAPI api;
    
    private initWechatPay(String appId) {
        api = WXAPIFactory.createWXAPI(getApplicationContext(), appId);
    }
}

2. Install the Android SDK For Alipay

2.1. Install the Alipay SDK from here

2.2. Add the Alipay SDK to your project libs directory

2.3. Config your project build.gradle

allprojects {

    repositories {
        flatDir {
            dirs 'libs'
        }

        google()
        jcenter()

    }
}

2.4. Config your app module build.gradle

Notice: The SDK name varies depending on the version.

dependencies {

        compile (name: 'alipaySdk-15.6.0-20190226104053', ext: 'aar')

}

2.5. Application for Runtime Permissions in AndroidManifest.xml

        android.permission.INTERNET
        android.permission.ACCESS_NETWORK_STATE
        android.permission.ACCESS_WIFI_STATE
        android.permission.READ_PHONE_STATE
        android.permission.WRITE_EXTERNAL_STORAGE

If your targetsdk version is above 23 , you need to apply to the user for the following permissions at runtime

    WRITE_EXTERNAL_STORAGE
    READ_PHONE_STATE

3. What you need to develop with our API is to

  1. Query your app paychannels using (PayTools.json API)
  2. Init each paychannel with the result in step 1
  3. Display the paychannel in the cashier page
  4. Create pay order for the channel using (CreateOrder.json API)
  5. Invoke the payment API
  6. Query the pay result and display the result page (QueryOrder.json API)