Alipay+Alipay+

Quickstart

This topic introduces how to quickly set up Alipay+ MPP Android SDK.

Before you begin

Before you get started, ensure that the following requirements are met:

  • Install or update Android Studio to a working version.
  • Use target API level 15 (ICE_CREAM_SANDWICH_MR1) or higher.
  • Use Gradle 4.1 or higher.
  • Set up a physical device or use an emulator to run your app.

Get started

Step 1. Add SDK to your project

  1. Contact your Alipay+ Solution Architect (SA) to obtain the Alipay+ SDK binaries as a package. You can also obtain the source code if you need to review or customize the SDK source code.

The following table lists the SDK packages that are required for different Alipay+ payment products:

Product

Merchant-presented Mode Payment

Auto Debit

aar

foundational

  • sdk-alipayplus.aar
  • iaptinylog.aar

product-specific

  • sdk-mpm.aar
  • sdk-autodebit.aar
  1. Add the SDK binaries (the .arr files) to the libs folder of your project.
  2. Add the following code to the build.gradle file of your module.
copy
dependencies {

    implementation fileTree(dir: "libs", include: ["*.jar", "*.aar"])
   
}

Step 2. Set up the SDK before using other APIs

Configure the following parameters to set up the SDK before you use other APIs provided by the SDK.

copy
Configuration configuration = new Configuration();
configuration.envType = "PROD";
configuration.clientId = "XXX";
AlipayPlusClient.getInstance().setConfiguration(configuration);

Next steps

After you have integrated the SDK, you can move on to use the SDK in different payment scenarios.

For more information about how to use the SDK in Merchant-presented Mode Payment, see Merchant-presented Mode Payment integration.

For more information about how to use the SDK in Auto Debit, see Auto Debit integration.