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

Running Demo Code in Sandbox

Take the JAVA demo code that uses MD5 signature algorithm as an example.

Import the demo code project into your IDE tool, like Eclipse, then run:

Running Demo Code in Sandbox

Click payment button to pay, then you will see the following QR code for payment. You can customize the front end display for the following QR in a more user-friendly way. For example, the QR code can be shown in a similar way in the User Experience page.


hkqrcode.png

After scanning the QR code, you can see the following information with payment details:

Running Demo Code in Sandbox

Confirm to pay and the payment password might be needed:

Running Demo Code in Sandbox

If the payment succeeds, the following page is to be shown:

Running Demo Code in Sandbox

Note:

After the payment succeeds, the QR code will be refreshed again. If you scan the QR code, you will see the following error message:

Running Demo Code in Sandbox