Alipay, China's leading third-party online payment solutionAlipay, China's leading third-party online payment solution

Integration process

Overall integration flow

Follow the steps below to complete the integration process:

S2.jpg

Step 1: Preparation

The first step is the preparation phase where we collect necessary information from you and complete any pre-development setup for your application. In this phase, you need to complete the following tasks:

  • Provide the information needed for API/SDK provision.
  • Generate your own public/private key pair for payload encryption or SDK registration.
  • Specify the detailed requirements about customization if any.

Public/Private key pair

A public/private key pair of your own is required to work together with DWS's public key for the encryption process during integration.

Integration process

Generate your own key pair

If you already have a public/private key pair, you may skip this step. Otherwise, you can generate the key pair by using the commands below:

copy
# Generate the private key
openssl genrsa -out client_private_key_php_dotnet.pem

# You need to convert the private key to PKC8 format if you're using Java
openssl pkcs8 -topk8 -inform PEM -in client_private_key_php_dotnet.pem -outform PEM -nocrypt -out client_private_key_pkcs8.pem 

# Generate the public key
openssl rsa -in client_private_key_php_dotnet.pem -pubout -out client_public_key_php_dotnet.pem 

# Generate the private key for Java
cat client_private_key_pkcs8.pem | grep -v "^\-" | tr -d "\n" | sed 's/%$//' > client_private_key_java.pem

# Generate the public key for Java
cat client_public_key_php_dotnet.pem | grep -v "^\-" | tr -d "\n" | sed 's/%$//' > client_public_key_java.pem

After executing the commands successfully, you can see the following files in the current directory:

  • client_private_key_java.pem: private key applicable to Java application
  • client_private_key_php_dotnet.pem: private key applicable to PHP/.NET application
  • client_private_key_pkcs8.pem: private key of pkcs8 format
  • client_public_key_java.pem: public key applicable to Java application
  • client_public_key_php_dotnet.pem: public key applicable to PHP/.NET application

Note: The key file is to be exchanged with DWS.

Apply for a Client ID

A Client ID is a unique authentication ID that is required when your application tries to connect through DWS's gateway.

Exchange the public keys

After obtaining a Client ID, you will need to upload your public key and download DWS's public key.

Step 2: Integration

After you have prepared the necessary information and received your Client ID, you can start to integrate our digital wallet into your application. DWS offers a well-design solution that consists of two parts:

  • API Integration: This enables your application to directly interact with DWS's APIs through direct HTTP requests or a server-side SDK. This solution allows great flexibility for your own backend structure and UI/UX customization.
  • Mobile Security SDK: This is integrated into your iOS/Android application to secure the digital wallet from unauthenticated transactions.

To know more about the details of these two solutions, please refer to Integration Solution.

Step 3: Test in sandbox

After the integration is completed, you can verify the integration result and execute test cases in the sandbox environment provided by us to see whether the services work as expected.

Step 4: Acceptance

After you have verified that the entire integration functions are defect-free in the sandbox, you can start to migrate from the sandbox environment to the production environment by updating the API/URL paths and other necessary information. At this point, DWS will lead a User Acceptance Test (UAT) schedule and provide test scripts to help you conduct a pilot test.

Go live

Congratulations! You have completed the integration and testing, and your application is all ready to go live.