Skip to main content

Alipay

Step 1. Preparation

You need a merchant account at Alipay Open Platform.

Before accessing the Alipay, there are some preparations that need to be done.

See preparation before access.

1.1 Get APPID

Login the Alipay Open Platform Console and create an application.

How to get the APPID : Alipay APPID Query Guide

1.2 Configure Cert

Generate an RSA2 certificate per the Alipay doc to obtain appPrivateKey.txt and appPublicKey.txt.

Upload the certificate to the application and download three files: alipayRootCert.crt, appCertPublicKey.crt, alipayCertPublicKey.crt.

Create a Cert named App Cert in Casdoor:

CasdoorValue
TypePayment (x509)
Certificatecontent of appCertPublicKey.crt
Private keycontent of appPrivateKey.txt

alipay app cert

Create a Cert named Root Cert in Casdoor:

CasdoorValue
TypePayment (x509)
Certificatecontent of alipayCertPublicKey.crt
Private keycontent of alipayRootCert.crt

alipay root cert

Step 2. Create an Alipay Payment provider

Next, create an Alipay Payment provider in Casdoor by filling in the necessary information.

CasdoorValue
CategoryPayment
TypeAlipay
Client IDAPPID from step 1.1
CertApp Cert from step 1.2
Root CertRoot Cert from step 1.2

alipay provider

Step 3. Add the Alipay Pay Payment provider for your product

Finally, add the Alipay Payment provider for your product so that users can purchase the product using Alipay.

Currency Requirement

Alipay only supports transactions in Chinese Yuan (CNY). When adding Alipay as a payment provider, ensure your product's currency is set to CNY. Products with other currencies will be rejected during creation or update to prevent payment failures.

add wechat pay payment provider for product