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

Test wallet

Alipay provides a test wallet app to help you with end-to-end testing during your integration process. This topic gives an introduction to how to download and use the test wallet app.

Download the test wallet app

In the sandbox mode, download a test digital wallet to simulate the process of making a payment. Test wallets are provided for iOS and Android systems respectively.

For the Android system:

Download the test wallet and start using it for testing.

For the iOS system:

Follow these steps to download the test wallet:

  1. Install TestFlight from App Store.
  2. Use an iPhone browser to open this link: https://testflight.apple.com/join/r1wEDEAS.
  3. Click 开始测试 to start testing.
  4. Install IAP_Wallet in TestFlight.

image

Use the test wallet

As a merchant, you can use the following test accounts for the test wallet:

Account

Password

amsmerchant01@163.com

Alipay123

amsmerchant02@163.com

Alipay123

amsmerchant03@163.com

Alipay123

Table 1. Test accounts

This section provides information about how to use the test wallet:

Log in and log out

Use the above test accounts to log in on the following page:

image

After a successful login, the following page will be presented:

image

To log out, click the Log Out button and you will be logged out and redirected to the login page. If you leave the test wallet idle around 30 minutes, you will be logged out automatically.

image

Set up the environment

To use the test wallet app, select the target wallet you want to test with and specify the test environment. Follow these steps to complete the configuration:

  1. Select Emulator Setting to enter the setup page:

image

  1. Select the wallet you want to test with in the Psp Setting field. The default wallet to test with is GCASH.

image

  1. For the Env Setting, select PROD. The default environment is PROD.

image

Test the payment product

After setting up the environment, you can start testing the payment products. Select Start Testing to see the capability options:

image

For different payment products, you need to use different capability options to test.

Cashier Payment

To test a transaction that uses Cashier Payment, this test wallet app will be automatically triggered after you call the pay (Cashier Payment) API successfully. Then, you can get the value of redirectActionForm.redirectUrl in the response of the API call. By using the value of redirectActionForm.redirectUrl, the test wallet app will be automatically triggered and a cashier page will be opened. After completing the payment successfully, the page will be redirected to the merchant page.

Process of testing a transaction that uses Cashier Payment:

  1. Select the goods and place an order on the merchant page. Specify the redirection method. This page should be designed and developed by the merchant. A demo of the testing process is provided in the following graphic.
  2. Get redirectActionForm.redirectUrl in the pay API calling's response.
  3. The test wallet is triggered automatically by redirectActionForm.redirectUrl and a cashier page is opened.
  4. Complete the payment.
  5. Click Go back to merchant to return to the merchant page.
  6. The payment result is displayed.

The following graphic shows the process of using the test wallet to complete a payment:

image

Auto Debit

To test the authorization process of the Auto Debit product, this test wallet app will be automatically triggered after you call the pay (Auto Debit) API successfully. Then, you can get the value of redirectActionForm.redirectUrl in the response of the API call. By using the value of redirectActionForm.redirectUrl, the test wallet app will be automatically triggered and a page for auto debit will be opened. After completing the payment successfully, the page will be redirected to the merchant page.

Process of testing a transaction that uses Auto Debit:

  1. Select a wallet for authorization and specify the redirection method. This page should be designed and developed by the merchant. A demo of the testing process is provided in the following graphic.
  2. Get redirectActionForm.redirectUrl in the pay API calling's response.
  3. The test wallet is triggered and the page for auto debit authorization is opened.
  4. Complete the authorization.
  5. Click Go back to merchant to return to the merchant page.
  6. The authorization result is displayed.

The following graphic shows the process of using the test wallet to complete an authorization:

image

User-Presented Mode Payment

To test a transaction that uses the User-Presented Mode Payment product, follow these steps:

  1. Click the B Scan C button, enter the testing page for User-Presented Mode Payment.
  2. Change the region/country setting by clicking on the country code located in the top-right corner if necessary. The corresponding payment code will be generated and displayed according to each region/country's standards.

image

  1. Use a scanner to scan the payment code and get a payment code value.
  2. Use the payment code value as the value of the paymentMethod.paymentMethodId field in the pay (User-Presented Mode Payment) request and sent the pay request. The ellipsis (...) button on the upper right corner enables you to refresh and copy the payment code value.

image

Merchant-Presented Mode Payment (Order Code Payment, Entry Code Payment)

To test a transaction that uses a Merchant-Presented Mode Payment product, follow these steps:

  1. Send the pay request of an Order Code Payment product or Entry Code Payment product.
  2. After the pay request call succeeds, the value of orderCodeForm.codeDetails.codeValue in the response will be returned. Generate a QR code for the value of orderCodeForm.codeDetails.codeValue.
  3. Click the C Scan B button to activate the phone's scanning function.
  4. Use the phone to scan the merchant's QR code to collect payment.

image

Check the transaction history

Click Transaction History, enter the page that displays transactions details. All the transactions (payment, refund, and cancellation) processed by the wallet's test account will be displayed.

image